From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#28814: [BUMP, PATCH] (26.0.90; When *xref* window is needed, original window-switching intent is lost ) Date: Mon, 23 Oct 2017 05:06:37 +0300 Message-ID: References: <87infjm3p3.fsf@gmail.com> <871slyi3lk.fsf_-_@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1508724435 11272 195.159.176.226 (23 Oct 2017 02:07:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 23 Oct 2017 02:07:15 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , 28814@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 23 04:07:11 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 1e6S8x-0001yh-OK for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Oct 2017 04:07:07 +0200 Original-Received: from localhost ([::1]:36527 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6S94-0002WU-Sy for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Oct 2017 22:07:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6S8v-0002WC-M8 for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 22:07:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6S8s-0006Kc-HL for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 22:07:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47753) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e6S8s-0006KY-Cx for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 22:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e6S8s-00066O-5Y for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 22:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Oct 2017 02:07:02 +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.150872440823433 (code B ref 28814); Mon, 23 Oct 2017 02:07:02 +0000 Original-Received: (at 28814) by debbugs.gnu.org; 23 Oct 2017 02:06:48 +0000 Original-Received: from localhost ([127.0.0.1]:56434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6S8e-00065t-7a for submit@debbugs.gnu.org; Sun, 22 Oct 2017 22:06:48 -0400 Original-Received: from mail-wr0-f171.google.com ([209.85.128.171]:48774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6S8c-00065d-EM for 28814@debbugs.gnu.org; Sun, 22 Oct 2017 22:06:46 -0400 Original-Received: by mail-wr0-f171.google.com with SMTP id 15so1972471wrb.5 for <28814@debbugs.gnu.org>; Sun, 22 Oct 2017 19:06:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=SY90l+a7/SbB7MccjJmmx/ecndomD0hfgkr6HJRJX9o=; b=Et3pQmhnwFWxaHvkWf+oC59l0vd3xSPQ49wr4yL43MwMAARbtb7DK2gxssd9LEs5ED PXkdk+0Ox9soNmSAsre/4CMFA+5Ta2LwrZkqL0a4Rshb/k5VUNshyLyEwNpOA9Ffgywp CgF/1eDkC/YQ/rx/BUH8eqPBpFER0Jbwh3yl0DY7VLj47dx39zHBBvyLZIQ8w0zMG/zk iw12A4brlct2g4gEijv/QLJ7jsGPiLTjfr52GqjIqrY/icH7e3a469jmoAkjsKPa9K3b dhvGqtkWutt684nr5pfBHLH/DrecrQaHx1QosT7dAKKgI49SSDcjG56jlmTnGzQ9wyCt 00zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SY90l+a7/SbB7MccjJmmx/ecndomD0hfgkr6HJRJX9o=; b=XrhMRpYZ6TyEmHAJKzddbP2Lb8Trnw/vP0zxhjPm2reQyFh2Alq36XR+2vpu9de4/9 wpyfLkJtr3zD2GwXDxIRV2rKDOyk0zAHz+k+eFoeyVnYiBc5BNkAfJOjXQnuGM7xLhcf desJu+x3K9AYj9exPCISIhBjYhKSu6XalEsHNHkdlitZsJi+xDx0hovLGVgxLYhJmohf 3L995w/Fyvsv1lyNIbW9lJC2I9wGqmVsqN/otczZGfeOSuMtUUjdnqShnvmRtV2t8Yzz OVIzI2yl4MjVzK1XUqwvvZgGqPyiK483Y5DWWQg0/hUD5lZRvstCdA25DHyNh9m48Qxx 82QQ== X-Gm-Message-State: AMCzsaWnjWB7ruBedMZbcoMeNmhLBFCNdTCgH/Of7KY66Td3nlZmH8Ai yaFDPeG+CGLS6WeZqewHC07RBg5v X-Google-Smtp-Source: ABhQp+T97OlYqejOtN43xCD/vwjoJiiz5WM18IOcIkVVjh8s3EA3bDA+kdRXaFa6ZKwbJ8h6nmX7eA== X-Received: by 10.223.171.69 with SMTP id r5mr9901447wrc.112.1508724400591; Sun, 22 Oct 2017 19:06:40 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id u52sm9004701wrb.68.2017.10.22.19.06.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Oct 2017 19:06:39 -0700 (PDT) In-Reply-To: <871slyi3lk.fsf_-_@gmail.com> Content-Language: en-US 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:138875 Archived-At: Hi Joao, On 10/20/17 12:13 PM, João Távora wrote: > Hoping someone can take a look at this bug I reported a week ago. Here > are two very simple Emacs -Q recipes that demonstrate it. You are working on something that I agree is a real problem, but doing this would effectively revert commit 5698947ff9335cf150c73cca257a5e7e5951b045, which was based on a previous discussion (see the link in the commit message), and in particular, would bring back "disappearing *xref* buffer problem", as Eli put it. The essence of the problem is that xref buffers try to serve two related but distinct purposes that the user might be aiming at: - Pick a result from the list and jump to it, forgetting the rest (basically providing a completion interface). - Iterate through results and do something with each of them in turn. Even for xref-find-definitions, we can't rule out the purpose #2. Again, also see the previous discussion. I have a rough idea on how to fix the situation, but nothing even close to an implementation. > emacs -Q > C-x 3 [split-window-right] > C-x 2 [split-window-below] > M-. xref-backend-definitions RET [xref-find-definitions] > C-n [next-line] > RET [xref-goto-xref] > > Expected the definition to be found in the original window where I > pressed M-. but instead it was found in another. Another case: > > emacs -Q > C-x 4 . xref-backend-definitions RET [xref-find-definitions-other-window] > C-n > RET > > Expected the definition to be found in some other window, different from > the one I pressed M-. on. Instead went to the same one. With your patches applied, this example pops a new frame for me if I press 'n' instead of 'C-n'. This is not hugely important in the light of the larger problems above, but demonstrated difficulties with window management when we try to pretend that the xref buffer "was never there". > Also, in both > situations, expected the window configuration to be the same as if I had > searched for, say xref-backend-functions. > > This is fixed by the patches that I reattach after minor tweaks. The > general idea is to have the *xref*, whose sudden appearance is hard to > predict, obtrude as little as possible on the user's window > configuration. If we don't bring back the "disappearing *xref* buffer problem", *xref* has to stay obtrusive. Do you think the rest of your patch will make sense with that change?