From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#33992: 27.0.50; xref-find-definitions wastes too much space Date: Wed, 15 May 2019 23:57:07 +0300 Organization: LINKOV.NET Message-ID: <87ftpfqvvg.fsf@mail.linkov.net> References: <87muoe7jrs.fsf@mail.linkov.net> <87a7hp43a5.fsf@mail.linkov.net> <205acda7-07a3-d85c-378c-c178f9f76b55@yandex.ru> <87o95l4ht4.fsf@mail.linkov.net> <64f42172-460f-a633-1c80-23d34b5c0d07@yandex.ru> <87lg0m96bm.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="162073"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 33992@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 15 23:55:16 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hR1rm-000g0X-PU for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 May 2019 23:55:15 +0200 Original-Received: from localhost ([127.0.0.1]:43264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hR1rl-0005EH-Q6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 May 2019 17:55:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hR1re-0005D7-5o for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 17:55:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hR1rc-0007nl-7U for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 17:55:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39999) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hR1ra-0007k0-Gr for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 17:55:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hR1ra-0002z8-CQ for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 17:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 May 2019 21:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33992 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33992-submit@debbugs.gnu.org id=B33992.155795728511420 (code B ref 33992); Wed, 15 May 2019 21:55:02 +0000 Original-Received: (at 33992) by debbugs.gnu.org; 15 May 2019 21:54:45 +0000 Original-Received: from localhost ([127.0.0.1]:53537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hR1rJ-0002y8-0w for submit@debbugs.gnu.org; Wed, 15 May 2019 17:54:45 -0400 Original-Received: from goldenrod.birch.relay.mailchannels.net ([23.83.209.74]:37557) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hR1rG-0002xw-4p for 33992@debbugs.gnu.org; Wed, 15 May 2019 17:54:43 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 986852C21AE; Wed, 15 May 2019 21:54:40 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a19.g.dreamhost.com (100-96-3-22.trex.outbound.svc.cluster.local [100.96.3.22]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 0446F2C2729; Wed, 15 May 2019 21:54:40 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a19.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Wed, 15 May 2019 21:54:40 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Decisive-Spill: 66484485591995e4_1557957280416_2256688060 X-MC-Loop-Signature: 1557957280416:952627905 X-MC-Ingress-Time: 1557957280415 Original-Received: from pdx1-sub0-mail-a19.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a19.g.dreamhost.com (Postfix) with ESMTP id C07FB815F2; Wed, 15 May 2019 14:54:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=2qrc/4SvCDRXmGL+tvvKhCQpbT8=; b= OL2SzLuyzmr16zJXgWlQ9foqCxHqP5rq/WlAMXr/+GjB77x6FOx7DK3HYvq6KPKx 8HNIzPPPOG6emfr+IsLtI3kNeUL/RAOhqs8jUlIKhTom+p8EzTkae6IJ6gFmmNsW AvUBbPJKTCT+nDxHsV0P/b5zS+hD8zR2zsHAB16z/6g= Original-Received: from mail.jurta.org (m91-129-96-230.cust.tele2.ee [91.129.96.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a19.g.dreamhost.com (Postfix) with ESMTPSA id 1594B80AF2; Wed, 15 May 2019 14:54:31 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a19 In-Reply-To: (Dmitry Gutov's message of "Fri, 3 May 2019 02:05:55 +0300") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrleelgddtudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddvfedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleeirddvfedtpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepughguhhtohhvseihrghnuggvgidrrhhunecuvehluhhsthgvrhfuihiivgeptd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:159360 Archived-At: >>>>> Does it feel the same way to you? >>>> >>>> The difference is that completions pop up in a small unobtrusive window. >>> >>> Small window? I usually have a side-by-side fullscreen split, and if >>> I initiate completion in one of the windows, *Completion* takes up the >>> whole other window. Temporarily, of course. >> >> The key word here is 'Temporarily'. Unlike *Completions*, >> the *xref* buffer doesn't go out easily. > > I can understand that. So yes, I can see myself preferring some different > behavior for a particular command. > >>>> (defun display-buffer-condition-from-xref (_buffer-name _action) >>>> (string-match-p "\\`\\*\\(xref\\)\\*\\(\\|<[0-9]+>\\)\\'" >>>> (buffer-name (current-buffer)))) >>> >>> This function seems unused. >> >> It's unused because it would be useful only in the *xref* buffer >> created by the xref-find-definitions command, so xref needs to >> provide a way to distinguish such case. > > Shouldn't it be referenced somewhere else in your patch as well? A patch is proposed in a separate bug#35737. >>>> (setq display-buffer-alist >>>> '((display-buffer-condition-xref >>>> display-buffer-in-direction >>> >>> And this function is undefined in my Emacs. >> >> This function is implemented by Martin in bug#33870. > > OK, found it, tried it. Seems to work okay-ish for xref-find-definitions, Created a separate bug#35592. > except xref-quit-and-goto-xref doesn't seem to be functioning too well > together with your customization (every other time it seemed to use > a different window to display the location, not the one I called > xref-find-definitions from). Yes, it should change its behavior depending on xref--original-command. >>>> (with-eval-after-load 'xref >>>> (define-key xref--button-map [(control ?m)] #'xref-quit-and-goto-xref)) >>>> >>>> How do you like that? >>> >>> I might, but since I can't really try your customization myself yet, I'll >>> repeat a question you might be familiar with already: >>> >>> Will this also affect xref-find-references and project-find-regexp? >> >> It should not affect them due to (memq this-command '(xref-find-definitions)) >> above. > > It would affect them due to the modification of xref--button-map above, > though. This part I don't like. > >> But also to not affect commands active in the *xref* buffer, >> xref should provide a way to check if the *xref* buffer was created >> by xref-find-definitions. > > Yes, we should retain some extra information, e.g. to support revert-buffer. Created a separate bug#35702.