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: Sun, 07 Apr 2019 00:03:09 +0300 Organization: LINKOV.NET Message-ID: <87lg0m96bm.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="31639"; 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 Sat Apr 06 23:48:17 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 1hCtAf-000854-4S for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Apr 2019 23:48:17 +0200 Original-Received: from localhost ([127.0.0.1]:59382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hCtAe-0001xV-1J for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Apr 2019 17:48:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hCtAS-0001wW-7H for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2019 17:48:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hCtAR-0005fD-5f for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2019 17:48:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34009) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hCtAQ-0005ez-TJ for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2019 17:48:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hCtAQ-0005c4-QL for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2019 17:48: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: Sat, 06 Apr 2019 21:48: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.155458722921481 (code B ref 33992); Sat, 06 Apr 2019 21:48:02 +0000 Original-Received: (at 33992) by debbugs.gnu.org; 6 Apr 2019 21:47:09 +0000 Original-Received: from localhost ([127.0.0.1]:47546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hCt9X-0005aO-M8 for submit@debbugs.gnu.org; Sat, 06 Apr 2019 17:47:08 -0400 Original-Received: from cichlid.maple.relay.mailchannels.net ([23.83.214.36]:33213) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hCt9U-0005aE-6v for 33992@debbugs.gnu.org; Sat, 06 Apr 2019 17:47:06 -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 283AF8C0662; Sat, 6 Apr 2019 21:47:03 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a41.g.dreamhost.com (100-96-7-60.trex.outbound.svc.cluster.local [100.96.7.60]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 828DD8C0F7F; Sat, 6 Apr 2019 21:47:02 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a41.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); Sat, 06 Apr 2019 21:47:03 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Minister-Squirrel: 262d4fb83624a6a6_1554587222988_3123383193 X-MC-Loop-Signature: 1554587222988:2116645507 X-MC-Ingress-Time: 1554587222988 Original-Received: from pdx1-sub0-mail-a41.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a41.g.dreamhost.com (Postfix) with ESMTP id 98257800EA; Sat, 6 Apr 2019 14:46:57 -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=WfcOyc69HfM55nhnEQo3/JGRIfg=; b= NAhFg/mpmsFBn+YofPSBK96B33hianh033nPYqS3aBUM0kM9RiAJtk+mvOOAiyWd 6ml367RH6GtiD5fThWUE0T6YvVkGz4fNxL5oB5mF9WrKPfftfc8st0BdWJMQFYSY ZBYN7BnTfHthxAGKBDt4D4h+wVVvDrLzG7BnJDxOMUs= Original-Received: from mail.jurta.org (m91-129-99-202.cust.tele2.ee [91.129.99.202]) (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-a41.g.dreamhost.com (Postfix) with ESMTPSA id 384E6800D9; Sat, 6 Apr 2019 14:46:54 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a41 In-Reply-To: <64f42172-460f-a633-1c80-23d34b5c0d07@yandex.ru> (Dmitry Gutov's message of "Fri, 5 Apr 2019 02:06:57 +0300") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddruddtgddtfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleelrddvtddvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleelrddvtddvpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepughguhhtohhvseihrghnuggvgidrrhhunecuvehluhhsthgvrhfuihiivgepud 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:157289 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. >> (defun display-buffer-condition-xref (buffer-name _action) >> (and (string-match-p "\\`\\*\\(xref\\)\\*\\(\\|<[0-9]+>\\)\\'" >> buffer-name) >> (memq this-command '(xref-find-definitions)))) >> >> (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. >> (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. >> (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. 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.