From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?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, 27 Dec 2018 21:49:28 +0000 Message-ID: <87wonufxnb.fsf@gmail.com> References: <87a7ktqqx7.fsf@mail.linkov.net> <9215183d-0a44-88b5-5b3c-d0da31f749ad@yandex.ru> <87imzfkhb4.fsf@mail.linkov.net> <87imzfhm04.fsf@gmail.com> <877efu3bxh.fsf@mail.linkov.net> 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 1545947742 11158 195.159.176.226 (27 Dec 2018 21:55:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 27 Dec 2018 21:55:42 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) 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 Dec 27 22:55:37 2018 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 1gcdcv-0002n0-4d for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Dec 2018 22:55:37 +0100 Original-Received: from localhost ([127.0.0.1]:55406 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcdf1-0001FB-OW for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Dec 2018 16:57:47 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcdel-0000u2-P7 for bug-gnu-emacs@gnu.org; Thu, 27 Dec 2018 16:57:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcdXW-00024W-N8 for bug-gnu-emacs@gnu.org; Thu, 27 Dec 2018 16:50:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gcdXW-00024K-Ja for bug-gnu-emacs@gnu.org; Thu, 27 Dec 2018 16:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gcdXW-0006JW-GH for bug-gnu-emacs@gnu.org; Thu, 27 Dec 2018 16:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?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, 27 Dec 2018 21:50:02 +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.154594737924231 (code B ref 33870); Thu, 27 Dec 2018 21:50:02 +0000 Original-Received: (at 33870) by debbugs.gnu.org; 27 Dec 2018 21:49:39 +0000 Original-Received: from localhost ([127.0.0.1]:39595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcdX8-0006Il-TO for submit@debbugs.gnu.org; Thu, 27 Dec 2018 16:49:39 -0500 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:37734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcdX7-0006IX-5c for 33870@debbugs.gnu.org; Thu, 27 Dec 2018 16:49:37 -0500 Original-Received: by mail-wr1-f46.google.com with SMTP id s12so19416418wrt.4 for <33870@debbugs.gnu.org>; Thu, 27 Dec 2018 13:49:37 -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=p3oM64GUYEU23sPJRCK7OHT2J4KCgYrY66bNVCVosYA=; b=Y3RL4QS9QGYdQDHbhmakCk5i4lfzqbelbCQxDaPSawAXeJIsR7CGmubkDQVUfyyWlK JygDFvo7Js2TRJYcndiO4DlQJvuXk7zOiq+Ow90hbIShutl58VfUH9wiTkeRtlUs7QaX rynGAFv5JyLcTtjt59aZt4wEykvv78XGpRbW2CpmhDJjalNQ1AXALzXy8GOm+B6ENvBa hrwt97D2baG4srNAkf0GXE/J0GPHMi3/ma9erGn62wfU62wnhf3dJMzVsKI1zie2A4s+ Mfq+B8jDHgf/KuHY25s9m37ETnoO8AVX1y6zqyCPbCXKApLR4yFzMw5CoM+2RX3t6Q/+ KV5g== 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=p3oM64GUYEU23sPJRCK7OHT2J4KCgYrY66bNVCVosYA=; b=IXuNzeNV4guHzYP5PFJZxjIe+KzivigRQ+LHsbmFSYUnYgX5E00iggkT3fiRssgVYP vZToFvTJkd6IPopwdW9nYVR0/lJsnYEvu+2ykE7JX2rzu++FcOgz97PK8KOQ6qihpNbu bvphhmN6wZIfRYnJb6WmOWKxUSV6FsmD+R2ktTs9Nrby540bhyzusmDJsC3JzczajeBU vytcpSDkCqu4ZQ21n8eotKfwRWAiVaQxWjwgbi/HUMPri6kPKZGymRJFKgBk3rgXL+5W RRBUE7puxpSRgg36jMakBubgdt6mBPJ38S1o/K3kufdSOWoZDB9IICDGdhn09nQshvK3 n83Q== X-Gm-Message-State: AJcUukefK67Ohg+YkpJGIAHypLSnb/aIC0UCA2qT6EHs8OPAMdJg+ILW U1/J/Govm8BOLJgmiGKON04QmySQ X-Google-Smtp-Source: ALg8bN6Z9wOg/KK2zaA42H2LCqvmijL+CunK/zM3shZTwRvXwpSifsUfJLs4o8YmtPwbEtthnWDb1Q== X-Received: by 2002:adf:a50c:: with SMTP id i12mr22352701wrb.220.1545947371097; Thu, 27 Dec 2018 13:49:31 -0800 (PST) Original-Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id h62sm23623625wmf.11.2018.12.27.13.49.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Dec 2018 13:49:30 -0800 (PST) In-Reply-To: <877efu3bxh.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 27 Dec 2018 23:19:22 +0200") 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:153932 Archived-At: Juri Linkov writes: >> Here are two very simple Emacs -Q recipes that demonstrate [the bug] > > Thanks for the recipes. > >> 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] >>=20=20=20=20=20=20 >> Expected the definition to be found in the original window where I >> pressed M-. but instead it was found in another. Another case: > > It could help to try using 'get-mru-window'. Please ask Martin > if there is a display action that uses 'get-mru-window', or how > to temporarily change the default behavior from 'get-lru-window' > to 'get-mru-window'. There may be a misunderstanding here. Those recipes are for a bug that has already been fixed: this code is now working like it should. Are you saying that you could make the code use other functions to produce the same behaviour, i.e. refactor it? That's fine by me: feel free to try, but I don't see a lot of motivation for it. > >> emacs -Q >> C-x 4 . xref-backend-definitions RET [xref-find-definitions-other= -window] >> C-n >> RET >>=20=20=20=20=20=20 >> Expected the definition to be found in some other window, different >> from the one I pressed M-. on. Instead went to the same one. Also, >> in both situations, expected the window configuration to be the same >> as if I had searched for, say, xref-backend-functions [which only >> has a single definition]. > > This can be configured with the display buffer alist > `(inhibit-same-window . t)'. Same here. I'm not an expert in the `display-buffer-alist' DSL, but I think you are again papering over the fact that between xref-find-definitions-other-window and the final destination buffer there is sometimes an *xref* buffer in its own window. So I don't think 'inhibit-same-window' wouldn't help here. But again, feel free to rework the code to your standards and if it passes these two tests, it's a good start. Jo=C3=A3o