From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74361: [PATCH] New option xref-navigation-display-window-action Date: Wed, 20 Nov 2024 09:37:52 +0100 Message-ID: <1d08c589-2d0e-4f10-8c2e-e21c206ac118@gmx.at> References: <87msi1ueb0.fsf@mail.linkov.net> <4256f446-e11b-450c-b455-131cb75acab0@gutov.dev> <871pzbj8mq.fsf@mail.linkov.net> <87sernhxoa.fsf@mail.linkov.net> Reply-To: martin rudalics Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38422"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 74361@debbugs.gnu.org To: Dmitry Gutov , Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 20 09:39:18 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 1tDgF3-0009nX-Mm for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Nov 2024 09:39:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDgEr-0006ft-4I; Wed, 20 Nov 2024 03:39:05 -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 1tDgEp-0006fa-0Z for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2024 03:39:03 -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 1tDgEo-00047P-DQ for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2024 03:39:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=LSPvcwT14iSykjvT5SihaYDwMl70Q+s+4DVaYSQgAB0=; b=H0dGKnyrd8Wy04BGPzJflHxl16GnrmctBfi9HsFb0KIIT5eVHSnGxwvMjw/NmMeo8OhuR11HBqvR6LPaJEg7chig8xjG14cIgwrpmhnmcwsAe9LFkEgUiWA9wey+TuEIws/KiRDtN4QHuYetudIhdFEbWZnjeAyv+G28rcvkMlBMReoesyUD/mk3gb9ab1UdswDdrYNR2oLaz7LxDTudpxV8HQuq8dy+/CBHtEQXz20/t1zW0R5eRcHYTF9oZVulYFGMrJ2kh/+00DuUjR9XHa2zVwhf94a5mUjys+f00WYrO9SVR9izkZVU+ElS3INbJvHjGueCLdtn/k4pK45l8A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tDgEo-0007kJ-7c for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2024 03:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Nov 2024 08:39: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.173209188429689 (code B ref 74361); Wed, 20 Nov 2024 08:39:02 +0000 Original-Received: (at 74361) by debbugs.gnu.org; 20 Nov 2024 08:38:04 +0000 Original-Received: from localhost ([127.0.0.1]:45166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDgDs-0007im-CW for submit@debbugs.gnu.org; Wed, 20 Nov 2024 03:38:04 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:44697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDgDp-0007iG-Hk for 74361@debbugs.gnu.org; Wed, 20 Nov 2024 03:38:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1732091873; x=1732696673; i=rudalics@gmx.at; bh=LSPvcwT14iSykjvT5SihaYDwMl70Q+s+4DVaYSQgAB0=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=M4e64rFMq2HH6o+gwd3Gf4fLG9ewPXaGYCqsmHvy5A6C4C5mWIBCczlSGWvEQjKK n1U4AbJiIR7e6htU3cibCIR2sPmmJ5/f92OXjSuPj0nAvZsCc0MfKyykywpimy6bi IH/DQIaOS+ojlQegVEHknW7CWs4nSkUHNee7KGS9mUKYoihzZZCg7V4q9UtFfRctM flWavDQbTwI0IMfqf60L7/9bC4Dnf7GJjcZD+/3WnVrWhIqrYv2gITDL7T2DGXKMt lkEccfDfv2jHuB1/juDT3isDzjwEMt6F/tOSCSVyvpDWxEHF+25kNZ+bshU0J5KkN WYDiwHBPBjUQePsiwQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([212.95.5.223]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Msq2E-1u2CNM3KAa-0137MM; Wed, 20 Nov 2024 09:37:52 +0100 Content-Language: en-US In-Reply-To: X-Provags-ID: V03:K1:QKHA6bewlvelYQMzc1N6o8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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:295671 Archived-At: > display-buffer-same-window *is* the function that's ultimately used by > switch-to-buffer. This does bring some incompatibilities, though, such > as forcung switch-to-buffer-in-dedicated-window to nil, or the use of > display-buffer-alist in the first place (normally configured by > switch-to-buffer-obey-display-actions). The function ultimately used by both is 'set-window-buffer'. One basic feature of 'switch-to-buffer' not shared by 'display-buffer-same-window' is 'switch-to-buffer-preserve-window-point'. And obviously 'switch-to-buffer-obey-display-actions' gives the user the opportunity to override the behavior of 'switch-to-buffer' in an arbitrary way while 'display-buffer-reuse-window' per se cannot be overridden. OTOH the behavior of the latter can be controlled via alist entries. > Yep, even the 'mru' strategy doesn't choose the currently selected > window, so this should also work well, selecting "some window" in a > stable fashion (whereas 'lru' - the default - uses a different window > each time). I think that the most important improvement of "category" should be to override "lru". It might also help with 'image-dired' for Bug#74246. And there should be a convention for setting it up maybe with the help of some sort of sub-categories. IIUC 'comint', 'xref' and 'image' might not be distinctive enough for all purposes. I cannot suggest much here because I do not use either of these. martin