From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Newsgroups: gmane.emacs.bugs Subject: bug#33870: 27.0.50; xref-goto-xref not configurable Date: Thu, 03 Jan 2019 14:24:15 +0000 Message-ID: References: <87a7ktqqx7.fsf@mail.linkov.net> <9215183d-0a44-88b5-5b3c-d0da31f749ad@yandex.ru> <878t02egph.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1546525410 7048 195.159.176.226 (3 Jan 2019 14:23:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 3 Jan 2019 14:23:30 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (windows-nt) Cc: 33870@debbugs.gnu.org, Dmitry Gutov To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 03 15:23:26 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gf3u9-0001jA-KD for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Jan 2019 15:23:25 +0100 Original-Received: from localhost ([127.0.0.1]:54324 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gf3wG-0006kv-EW for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Jan 2019 09:25:36 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gf3vq-0006Oy-DB for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2019 09:25:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gf3vl-0004yS-Lx for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2019 09:25:09 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56071) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gf3vj-0004x9-Hy for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2019 09:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gf3vj-0003IU-Cm for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2019 09:25:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Jan 2019 14:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33870 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33870-submit@debbugs.gnu.org id=B33870.154652547012595 (code B ref 33870); Thu, 03 Jan 2019 14:25:03 +0000 Original-Received: (at 33870) by debbugs.gnu.org; 3 Jan 2019 14:24:30 +0000 Original-Received: from localhost ([127.0.0.1]:45303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gf3vC-0003H5-9q for submit@debbugs.gnu.org; Thu, 03 Jan 2019 09:24:30 -0500 Original-Received: from mail-wr1-f65.google.com ([209.85.221.65]:45733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gf3vA-0003Gp-2U for 33870@debbugs.gnu.org; Thu, 03 Jan 2019 09:24:28 -0500 Original-Received: by mail-wr1-f65.google.com with SMTP id t6so33710032wrr.12 for <33870@debbugs.gnu.org>; Thu, 03 Jan 2019 06:24:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=Wgw7XbthK1syVUmN9JTuJlMJeonyiVT8RpkQKQWon5k=; b=ckNHAHo/hCU+g+hlLXigQb3IgfhfSw0IC4+CLnciMOqFSM3xth2ntKIoBl/U8ee7Be RxO2a+vxyTkDedkrFE8rz70B2h/8OFfKg/PNZD5RFIwI7jZeyjn80Ca8tQ83wajc8cKb 0OqwJ+HdTNUj7jCur58B6/IcYa0snnm/IUotZOHjUFHWjRf0/1qeNrKCFSWl60OeJnHV ZQvmrXEt6ISd2y79jIHBNQbsygyrf21KMoyTqKzbdI8uAY4NX5Rzy1BwW9oif7UvjJ7h mwilYFNs4nWVFdYy20UgzK89TggfGV80yXA7MPwofl97eD+0WTv9jusIWMQaLcZOOVH2 jhiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=Wgw7XbthK1syVUmN9JTuJlMJeonyiVT8RpkQKQWon5k=; b=qMkgLPZ1Ef0eOaXMAN/x+6xZjXiUAHqQoBp3kIIt/lB8h4HhdjXtOcCNBm97mkGbFS 4YnbNP8+R2jEJNVlQhfsy31c2QwftGgIyc5Tq89pY7bnkf1MDZsko/Um2yW69UL90WBH nWzKajowg3SPWQRpwUNFWtSHKeHPl32AVwbldVM3t6eoPGz2LG2NtncDaZt/3tKWNEn2 1s92OZoIOqE6tm8sdUmNbwSuApG5PII+x7sxd6RYMK4PYRpyFcKfRyDjj6x8A1ylP90G 2Yp/AlDEylRwvna3OjL1ngLeoiKaY6dOeVcgi87H3NCDhNIzxTA30hhksgiWTWdrkLyh 5VaQ== X-Gm-Message-State: AJcUukdAbwu7KbW46Gku3SG7V4tjxVOVp3q24xWHpJOZsqFxOvwqSjE7 oiDipY+AZ21WwWepps0fMpamUG96 X-Google-Smtp-Source: ALg8bN7aIreBK+u495aZYJBXQ+DClWNsOTwsDA7GY+G9nbY+GGN6ioGNyihk1gF759gFMj9CEY1LIg== X-Received: by 2002:a5d:6710:: with SMTP id o16mr42836367wru.152.1546525462067; Thu, 03 Jan 2019 06:24:22 -0800 (PST) Original-Received: from GONDOMAR.yourcompany.com (mail3.siscog.pt. [195.23.29.18]) by smtp.gmail.com with ESMTPSA id g16sm44905253wru.41.2019.01.03.06.24.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Jan 2019 06:24:21 -0800 (PST) In-Reply-To: <878t02egph.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 03 Jan 2019 02:18:50 +0200") X-Antivirus: AVG (VPS 190103-0, 03-01-2019), Outbound message X-Antivirus-Status: Clean 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: 208.118.235.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:154108 Archived-At: Hi Juri, Juri Linkov writes: > 1. simplifies =91xref--show-pos-in-buf=92 ... and considerably complexifies xref--show-xref-buffer (more on that later) > while at the same time preserves the current behavior and respects > user's customization of display actions; That's great! > 2. makes the xref buffer non-obtrusive like *Completions* > in xref--show-xref-buffer; After a brief look, I'm not sure I like the UI change. "not sure" is not an euphemism for "don't like", I'm ust not sold on the idea yet: * Certainly you don't mean non-obtrusive, you mean "less obtrusive" and really it's "slightly less obtrusive". It does use potentially less space and doesn't temporarily use one of your windows if you happen to have several. I agree this is an good advantage. * But by using less space it is also less useful. You don't get to see, at a glance, a great deal of xrefs. And xrefs are different from completions, they're closer to grep hits. You wouldn't put *grep* hits in such a potentially tiny window, would you? Then again, perhaps you would, and the whole point of this patch is to make the UI configurable. If so, I'd make the original UI the default, or at least very very easy to bring back. > 3. turns the existing arg QUIT of xref-goto-xref into a prefix arg, > so a natural key sequence =91C-u RET=92 will quit the window. > This is similar to the prefix arg of quit-window. No problem here I think. > - (display-buffer buf action)) > + `(,(lambda (buf alist) > + (window--display-buffer buf xref--original-window = 'reuse alist))))))) > Using internal "--" symbols from window.el is a temporary solution I hope. > - (pop-to-buffer (current-buffer)) > + (pop-to-buffer > + (current-buffer) > + `((display-buffer--maybe-same-window > + display-buffer-reuse-window > + display-buffer--maybe-pop-up-frame > + display-buffer-below-selected) > + ,(if temp-buffer-resize-mode > + '(window-height . resize-temp-buffer-window) > + '(window-height . fit-window-to-buffer)) > + ,(when temp-buffer-resize-mode > + '(preserve-size . (nil . t))))) Again, too many --, and seems like a lot of repetition from window.el. Perhaps you want window.el to export a function that encapsulates all/some of this cruft to pass as ACTION. Naming that function would be the hardest problem (best I could do is display-buffer-use-completions-like-window). Or maybe put that function in xref.el. But as I said above, I think we also need a function that brings back the current default. Jo=E3o