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: Thu, 04 Apr 2019 23:49:27 +0300 Organization: LINKOV.NET Message-ID: <87o95l4ht4.fsf@mail.linkov.net> References: <87muoe7jrs.fsf@mail.linkov.net> <87a7hp43a5.fsf@mail.linkov.net> <205acda7-07a3-d85c-378c-c178f9f76b55@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="141492"; 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 Thu Apr 04 23:21:49 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 1hC9nw-000aeX-2T for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Apr 2019 23:21:48 +0200 Original-Received: from localhost ([127.0.0.1]:59940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hC9nu-0005OD-Uv for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Apr 2019 17:21:47 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hC9nc-00053w-UT for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2019 17:21:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hC9Zh-0004cx-Uw for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2019 17:07:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59439) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hC9Ze-0004WD-Gt for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2019 17:07:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hC9Ze-00038q-5U for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2019 17:07: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: Thu, 04 Apr 2019 21:07: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.155441199812038 (code B ref 33992); Thu, 04 Apr 2019 21:07:02 +0000 Original-Received: (at 33992) by debbugs.gnu.org; 4 Apr 2019 21:06:38 +0000 Original-Received: from localhost ([127.0.0.1]:44750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hC9ZF-000386-Kn for submit@debbugs.gnu.org; Thu, 04 Apr 2019 17:06:37 -0400 Original-Received: from indri.birch.relay.mailchannels.net ([23.83.209.92]:5347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hC9ZD-00037p-LI for 33992@debbugs.gnu.org; Thu, 04 Apr 2019 17:06:36 -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 63F946A207A; Thu, 4 Apr 2019 21:06:29 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a31.g.dreamhost.com (100-96-7-52.trex.outbound.svc.cluster.local [100.96.7.52]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id A03EE6A1F6B; Thu, 4 Apr 2019 21:06:26 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a31.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); Thu, 04 Apr 2019 21:06:29 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Ski-Grain: 72676cba69f7074f_1554411987047_2397886376 X-MC-Loop-Signature: 1554411987046:3989711819 X-MC-Ingress-Time: 1554411987046 Original-Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 1AFC983C91; Thu, 4 Apr 2019 14:06:20 -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:content-transfer-encoding; s=linkov.net; bh=hrLQLi bkx9VJSUfkVqMgYnwwwa8=; b=zRrbnvojjekkW79v8xfLC3O9zjMFfZuA2r7PI1 dVHbpICY+lEnS1nhBpqYi2MOMwSk2lQD7KTc0CW7KKQYAaSCDM5GxR2WmMn5nq0h 6+fWEZoyQKy7/HwlLrt4P69+pNojK2CO9nOdAn3Iz2RxAmxr5rg06R/jpM4tYNve SwTCM= 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-a31.g.dreamhost.com (Postfix) with ESMTPSA id BD6F983C81; Thu, 4 Apr 2019 14:06:15 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 In-Reply-To: <205acda7-07a3-d85c-378c-c178f9f76b55@yandex.ru> (Dmitry Gutov's message of "Thu, 4 Apr 2019 03:02:33 +0300") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrtdehgdduheeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtredunecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleelrddvtddvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleelrddvtddvpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepughguhhtohhvseihrghnuggvgidrrhhunecuvehluhhsthgvrhfuihiivgeptd 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:157179 Archived-At: >> The problem with xref-find-definitions is its unexpected outcome: >> sometimes it pops up a window, sometimes doesn't. > > Imagine the process of code completion. > > Sometimes you press TAB (or C-M-i) and it completes to the symbol you > wanted. Sometimes it pops up a window with all matching > completions instead. > > Does it feel the same way to you? The difference is that completions pop up in a small unobtrusive window. But this should be easy to do in xref now too. Thanks to Jo=E3o, we now have configurable window management in xref, so I tried different customizations, and one of the most appealing is this: (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)))) (setq display-buffer-alist '((display-buffer-condition-xref display-buffer-in-direction (direction . below) (window-height . fit-window-to-buffer)))) (with-eval-after-load 'xref (define-key xref--button-map [(control ?m)] #'xref-quit-and-goto-xref= )) How do you like that?