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#28814: [BUMP, PATCH] (26.0.90; When *xref* window is needed, original window-switching intent is lost ) Date: Wed, 25 Oct 2017 16:27:13 +0100 Message-ID: <87k1zjs0xa.fsf@gmail.com> References: <87infjm3p3.fsf@gmail.com> <871slyi3lk.fsf_-_@gmail.com> <87lgk22ryu.fsf@gmail.com> <87fua91vis.fsf@gmail.com> <13af136e-12fb-4e8d-81ff-63424b1e1943@yandex.ru> <83inf38dq2.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1508945307 12274 195.159.176.226 (25 Oct 2017 15:28:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Oct 2017 15:28:27 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: 28814@debbugs.gnu.org, Dmitry Gutov To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 25 17:28:24 2017 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 1e7NbF-0001I9-Hv for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Oct 2017 17:28:09 +0200 Original-Received: from localhost ([::1]:48794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7NbM-0002IW-Q4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Oct 2017 11:28:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7NbC-0002Fj-9G for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 11:28:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7Nb8-0003Md-49 for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 11:28:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53037) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7Nb7-0003M8-VA for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 11:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e7Nb7-00035L-Je for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 11:28:01 -0400 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: Wed, 25 Oct 2017 15:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28814 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28814-submit@debbugs.gnu.org id=B28814.150894524511810 (code B ref 28814); Wed, 25 Oct 2017 15:28:01 +0000 Original-Received: (at 28814) by debbugs.gnu.org; 25 Oct 2017 15:27:25 +0000 Original-Received: from localhost ([127.0.0.1]:33485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7NaX-00034Q-Ce for submit@debbugs.gnu.org; Wed, 25 Oct 2017 11:27:25 -0400 Original-Received: from mail-wr0-f180.google.com ([209.85.128.180]:50693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7NaV-00034A-9g for 28814@debbugs.gnu.org; Wed, 25 Oct 2017 11:27:23 -0400 Original-Received: by mail-wr0-f180.google.com with SMTP id p96so376695wrb.7 for <28814@debbugs.gnu.org>; Wed, 25 Oct 2017 08:27:23 -0700 (PDT) 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=fl/TsnGNtHA7ih+gq9A3EXcSjXZXnI9dwVyTwhVU1JI=; b=q9Z+wUxWfcGwRgliqFdfeDEREHNF6Cyn4oja0f/SigGCxxM+AorsDZuyzJcE7hD6xa z+r0hxYR0AsNhSAZnMc2dKsDeg0Gw4TGrbylnGKHRO8QjwHxTujCOFOQP0xxtXQOH3em kkKWVCdTGW4HR53ZiJpu6OfQyfzYH0siLdkkTkV+7jjlLXSiIfJ5cqCa7Q5N9GaBOe94 OrXnCa1YZgfumPT63GDDS++BnyLatfKzh4R1LVaPWR2eQ4kZSZ5u9YGi4n6+7b794GaX r4kL0NiHM3NEIlrXaeE+5aiftYtGJRVqIQRLJScDvB1uSL4mbdp+bCqQK/tuqdbcFkHI yKtA== 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=fl/TsnGNtHA7ih+gq9A3EXcSjXZXnI9dwVyTwhVU1JI=; b=kdBlyguQfBI0JHOVWHGT3pC1axZR5Sy7JHZMw0azS4rgw25V7r0KD4r2IeF3NGU69v K1COVf8+DS4PrZodWjtgzHm7+6B++LRAvQMyjdjdGGcVR+1ebMQWwJWxQs9T+pRL64Hh c1lda/NMeKbHuZJs43HuxuNe/COv0nWIaELcjC/7ipQ4tuk+eke+gzUIQLfH9VmtVplg hWPuqIfxkTRZ6Pglb7kvmL5ud5kqc2BL/1S6gXNUuoRl2NDdcv4JHcFpHsFOafGtfyFN UH0SrusL2FXuskFf8s9/1xkDG5yb8woCabBv7v0G6ZW6lB6Va83ph+whRRexcQqQyFoJ i6Jw== X-Gm-Message-State: AMCzsaXS67VEkG7+JuZOpdpRKjWd8NTy1Y4dxMfTfcw+mwCmMAWFhNPC mN58fvh7swGHQxSHXoN3Kpkitr5R X-Google-Smtp-Source: ABhQp+Rx/yMZvhT7/zBk8uulC7LG49L4UsrCedk3NdQkkhKAjKWKVqN174MkSJKsNQD2tQZWUuYcxA== X-Received: by 10.223.153.234 with SMTP id y97mr2604798wrb.165.1508945237252; Wed, 25 Oct 2017 08:27:17 -0700 (PDT) Original-Received: from lolita.yourcompany.com ([88.157.205.17]) by smtp.gmail.com with ESMTPSA id x189sm2359498wmf.10.2017.10.25.08.27.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Oct 2017 08:27:16 -0700 (PDT) In-Reply-To: <83inf38dq2.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Oct 2017 18:11:01 +0300") 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:138967 Archived-At: Eli Zaretskii writes: > I understand that the motivation for changing the existing solution > for the "disappearing XREF buffer" was the unexpected or even > incorrect behavior when the "C-x 4" variety of the commands is > invoked. That is, the existing code would display the definition in > the original window, not in "the other" window (which is taken by the > XREF buffer). And the original solution was to display the definition > in the window where the XREF buffer was displayed, thus making it > "disappear". Is that correct? More or less. You are 90% correct. I wouldn=E2=80=99t link unexpected behav= iour with the "disappear XREF buffer" because they can be seen as independent issues, though closely related. Anyway, it=E2=80=99s OK because the fix you propose further below is exactly the current one I propose (minus some subtleties for when we "can=E2=80=99t" pop a new window because of insufici= ent window dimensions). > If so, then the easiest solution IMO would be to pop up one more > window, i.e. behave as if the window displaying the XREF buffer didn't > exist. That would both keep the contract of "C-x 4" and leave the > XREF buffer visible. Yes, this is the default behaviour in the current patches. > As for quitting the XREF buffer when it's no longer needed: how about > 'q', like other similar modes do, or some variety thereof? "C-u RET" > is too odd, almost outlandish in Emacs. =E2=80=99q=E2=80=99 is already taken by =E2=80=99quit-window=E2=80=99 in *x= ref* buffers. It quits the window and does nothing else. I=E2=80=99m looking for a command that quits = *and* goes to the target. If done in this order, it has the nice benefit that the window thus immediately released is available for showing the cross reference (in the C-x 4 case, that is) If no suitable key for this command can be found (=E2=80=99a=E2=80=99, =E2= =80=99o=E2=80=99 would perhaps be nice), then let=E2=80=99s make an unbound command that I can bound to RE= T. Then let=E2=80=99s open a separate discussion on whether that behaviour sho= uld become the default (I think it should). > If the above solves the remaining issues, and if you have no other > problems, can we have patches to that effect? Sure, as soon as you (or we) decide on one of the following: * C-u RET (for completeness sake, you seem to be against this one) * =E2=80=99a=E2=80=99 bound to a new command xref-quit-and-goto-xref * =E2=80=99o=E2=80=99 bound to a new command xref-quit-and-goto-xref * a new unbound command xref-quit-and-goto-xref > And then the next question would be: what branch to install this on? It=E2=80=99s a bugfix, so emacs-26.