unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>, Juri Linkov <juri@linkov.net>
Cc: 74361@debbugs.gnu.org
Subject: bug#74361: [PATCH] New option xref-navigation-display-window-action
Date: Fri, 22 Nov 2024 10:22:05 +0100	[thread overview]
Message-ID: <e740a50f-ab57-4155-a011-053c3f203841@gmx.at> (raw)
In-Reply-To: <f6fbc018-84e0-4137-8c83-0477ee47beff@gutov.dev>

 >> I think that the most important improvement of "category" should be to
 >> override "lru".
 >
 > The customization capability, you mean? Nice to have indeed.

What I meant was the following: Calling 'get-lru-window' in
'display-buffer-use-some-window' is a heritage from the times when
'display-buffer' was implemented in C.  It was hard-coded there and
could not be customized.  And it conceptually made sense with multiple
windows because the lru window should be the one whose contents a user
could most likely dispense with.  And it can even work when multiple
'display-buffer' calls are invoked in one and the same command.

The idea misfires in one case: When a user wants one and the same window
display several buffers in sequence.  These buffers could represent
images resulting from browsing an image directory or files containing
grep or xref hits or sources of compile errors.  Anything a user might
want to browse sequentially or, with other words, things a user might
not want to look at at the same time.

In these cases, the lru window will change continuously when multiple
windows are present.  Now if these related buffers were made subject of
a common category and that category were passed as argument to
'display-buffer-use-some-window', the latter could decide - if a window
showing a buffer belonging to the same category existed already - to use
that window instead of the lru one.

Obviously, someone has to decide on setting up the name of the category.
This is the task of the caller of 'display-buffer' - 'image', 'xref',
'grep', 'compile', 'comint' or 'tex' - and would have to be done in a
coordinated fashion so the same category is used twice iff that's really
intended.

In either case, 'display-buffer' would look whether an appropriate
window exists and use that window, maybe also ignoring certain aspects
(dedicatedness, minimum size) that would otherwise prevent its use.

An orthogonal issue is whether an initial command expresses the desire
to show the buffer in "another" window or on "another" frame.  My
suggestion would be to have these suppress any 'category' argument and
have 'display-buffer' proceed as usual, that is use the lru window on
the specified frame , pop up a new frame ...

martin





  reply	other threads:[~2024-11-22  9:22 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14 22:29 bug#74361: [PATCH] New option xref-navigation-display-window-action Dmitry Gutov
2024-11-15  0:50 ` Dmitry Gutov
2024-11-15  7:49 ` Juri Linkov
2024-11-15 19:05   ` Dmitry Gutov
2024-11-16 19:12     ` Juri Linkov
2024-11-18  1:28       ` Dmitry Gutov
2024-11-19 18:33         ` Juri Linkov
2024-11-19 19:43           ` Dmitry Gutov
2024-11-20  7:11             ` Juri Linkov
2024-11-20 19:12               ` Dmitry Gutov
2024-11-21  7:34                 ` Juri Linkov
2024-11-20  8:37             ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-20 17:31               ` Juri Linkov
2024-11-20 19:10                 ` Dmitry Gutov
2024-11-21  7:29                   ` Juri Linkov
2024-11-20 19:08               ` Dmitry Gutov
2024-11-22  9:22                 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-11-23  9:35                   ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-23 18:45                     ` Juri Linkov
2024-11-23 19:16                       ` Juri Linkov
2024-11-20  8:36           ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-15 12:13 ` Eli Zaretskii
2024-11-15 17:20   ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-15 19:10   ` Dmitry Gutov
2024-11-16  8:43     ` Eli Zaretskii
2024-11-18  1:42       ` Dmitry Gutov
2024-11-18 12:25         ` Eli Zaretskii
2024-11-18 16:10           ` Dmitry Gutov
2024-11-18 17:03             ` Eli Zaretskii
2024-11-19  1:21               ` Dmitry Gutov
2024-11-19 15:33                 ` Eli Zaretskii
2024-11-19 19:51                   ` Dmitry Gutov
2024-11-20 12:54                     ` Eli Zaretskii
2024-11-21 10:37                   ` Eli Zaretskii
2024-11-21 18:01                     ` Juri Linkov
2024-11-21 19:16                       ` Eli Zaretskii
2024-11-21 19:39                         ` Juri Linkov
2024-11-21 19:56                           ` Eli Zaretskii
2024-11-22  7:29                             ` Juri Linkov
2024-11-22  8:20                               ` Eli Zaretskii
2024-11-23 18:25                                 ` Juri Linkov
2024-11-23 18:53                                   ` Eli Zaretskii
2024-11-23 19:14                                     ` Juri Linkov
2024-11-23 19:36                                       ` Eli Zaretskii
2024-11-19 18:36         ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e740a50f-ab57-4155-a011-053c3f203841@gmx.at \
    --to=bug-gnu-emacs@gnu.org \
    --cc=74361@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=juri@linkov.net \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).