GNU bug report logs - #74361
[PATCH] New option xref-navigation-display-window-action

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dmitry <at> gutov.dev>

Date: Thu, 14 Nov 2024 22:30:02 UTC

Severity: wishlist

Tags: patch

Fixed in version 31.1

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Dmitry Gutov <dmitry <at> gutov.dev>, Juri Linkov <juri <at> linkov.net>
Cc: 74361 <at> debbugs.gnu.org
Subject: bug#74361: [PATCH] New option xref-navigation-display-window-action
Date: Wed, 20 Nov 2024 09:37:52 +0100
> 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




This bug report was last modified 171 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.