From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#74361: [PATCH] New option xref-navigation-display-window-action Date: Sat, 07 Dec 2024 19:18:34 +0200 Organization: LINKOV.NET Message-ID: <877c8bwhd9.fsf@mail.linkov.net> References: <78a96965-31c1-4688-b808-2de09d1832c4@gmx.at> <878qt9pz4w.fsf@mail.linkov.net> <05452bef-dd2e-4e93-abdd-6eb391027197@gmx.at> <87y118cyyk.fsf@mail.linkov.net> <871pyzp6br.fsf@mail.linkov.net> <25443bb1-788a-4f06-9350-5d2c666f6795@gmx.at> <32b8cc56-afa1-40f6-933f-6de0df2b9f63@gutov.dev> <688d5119-0900-46a4-86c7-32a9b06cc349@gmx.at> <87ed2v1aec.fsf@mail.linkov.net> <19124901-e749-4daa-bf47-27e12ea619aa@gutov.dev> <87mshbj4lk.fsf@mail.linkov.net> <4a81429a-ef9e-473c-989f-cff1314f5633@gmx.at> <8734j3l69p.fsf@mail.linkov.net> <87o71qghzf.fsf@mail.linkov.net> <0e432e8e-c17c-4408-8f0d-1236b60e4879@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25571"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: Dmitry Gutov , 74361@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 07 18:20:12 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tJyTU-0006Vs-Mg for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Dec 2024 18:20:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJyTO-0003h2-3X; Sat, 07 Dec 2024 12:20:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJyTK-0003eC-T4 for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 12:20:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tJyTK-0004N9-JA for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 12:20:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=64KgeL6ABkSuwPiU5xGh8wCUWTeQYSlDefVGrITABoQ=; b=S5uJCuXb44PglVjVfTHMENThikb/PKmJxhoN0kbx0nc2xVJ1ieeyZWm4UBBmIxDSHl/KA4FmOa3zrBDfLw4V4++8xdLPuf0791LeunXNUynrQLopNIvtuzho3NJJQfTrUrTLiiP3WjEC656iFMd0tJs0WHdtxQThFAptYcyx6SY6axTKRBfYFKv8xbBUcyswRGOSbQaqc012upN+OmYBb6SHOcgM1WH3KR4UtncHi/ZOu4Xbb708mScOYqnCR879ZbSyGhFDVLDpRiInHtS+YL3wRKFVM92ypZ702Ro95f0c2mTx1bAPYyNKGDs1CcUZu27sbuF7SdlstpSick7jNw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tJyTK-0000D0-DC for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 12:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Dec 2024 17:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74361 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74361-submit@debbugs.gnu.org id=B74361.1733591971725 (code B ref 74361); Sat, 07 Dec 2024 17:20:02 +0000 Original-Received: (at 74361) by debbugs.gnu.org; 7 Dec 2024 17:19:31 +0000 Original-Received: from localhost ([127.0.0.1]:48364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJySp-0000Bd-Ao for submit@debbugs.gnu.org; Sat, 07 Dec 2024 12:19:31 -0500 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:37001) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJySm-0000BE-Hu for 74361@debbugs.gnu.org; Sat, 07 Dec 2024 12:19:29 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id D2A7E20002; Sat, 7 Dec 2024 17:19:01 +0000 (UTC) In-Reply-To: <0e432e8e-c17c-4408-8f0d-1236b60e4879@gmx.at> (martin rudalics's message of "Fri, 6 Dec 2024 09:31:28 +0100") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296584 Archived-At: >>>> (with-current-buffer buffer >>>> (setq-local display-buffer-previous-window (selected-window))))) >>> >>> This relies on 'ofun' selecting a window and would not work for plain >>> 'display-buffer'. Right? >> >> It should work for plain 'display-buffer' because of using 'with-current-buffer'. > > 'display-buffer' per se doesn't care about the current buffer. The > assumption that the selected window also holds the current buffer is > nowhere guaranteed. Just think of 'display-buffer' running from a > timer. I meant the buffer that was current at the beginning of the command: (window-buffer (old-selected-window)).