From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 70949@debbugs.gnu.org
Subject: bug#70949: display-buffer-choose-some-window
Date: Thu, 30 May 2024 10:54:35 +0200 [thread overview]
Message-ID: <becd5819-6b15-422a-ba4f-106c03a04bbd@gmx.at> (raw)
In-Reply-To: <86ed9jhkox.fsf@mail.linkov.net>
> Sorry, I don't understand why the design should be limited to
> compile-goto-error/next-error only.
That's what I keep saying here all the time.
> As a unified framework we could provide a new defcustom with a list
> of categories for which display-buffer will set a buffer-local variable
> or the window parameter 'previous-window', then the next invocations
> of the same command will reuse it.
I don't think that one defcustom will do. And if we try building on
what 'next-error' finds for us, buffer-local variables won't help
either.
The common underlying principle is that a user starts an operation to
display several file-visiting buffers in a row triggered by some sort of
operation on these files like a compilation, grep, or version control
action. That action usually produces a buffer I call "results buffer"
and sequentially scanning that buffer will produce "file buffers" that
should be handled in a specific way. So we need:
- A method for extracting a list of file names from the results buffer
(not needed if the results buffer contains them already but in my
experience these file names are often relative only). Obviously, this
is already done for each of the contexts we want to address but it
would be nice to have some unified approach here: A list of absolute
file names and a pointer to which is the one to be displayed next.
- A method for displaying the first file buffer. It will decide whether
the file buffer replaces the results buffer in its window, uses some
other window on the same frame or even another frame... And it will
set up the '...-previous-window' variable specifying the window that
should be used for displaying the remaining file buffers.
- Key-bindings for displaying the next and previous file buffers from
_any_ window selected. Ideally, these would be M-n and M-p.
- A method for quitting. Deleting the file buffer window (or frame) is
one way to do that. Invoking M-n with the last file buffer current
could be another way - possibly after a 'quit' prompt. Otherwise,
'quit-window' and the 'quit-restore' parameter should handle that,
where the latter would have to be set up when displaying the first
file buffer.
The major customizable thing I see here is the method for displaying the
first file buffer and I think that that should be done for each type of
results buffer separately.
martin
next prev parent reply other threads:[~2024-05-30 8:54 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-14 16:56 bug#70949: display-buffer-choose-some-window Juri Linkov
2024-05-15 8:06 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-15 16:49 ` Juri Linkov
2024-05-16 8:20 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-17 6:40 ` Juri Linkov
2024-05-18 9:21 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-20 6:15 ` Juri Linkov
2024-05-20 8:01 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-20 16:54 ` Juri Linkov
2024-05-21 8:21 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-21 17:18 ` Juri Linkov
2024-05-22 7:39 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-23 6:16 ` Juri Linkov
2024-05-23 7:22 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-23 17:27 ` Juri Linkov
2024-05-24 9:32 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-24 17:38 ` Juri Linkov
2024-05-26 8:54 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-27 17:52 ` Juri Linkov
2024-05-28 8:05 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-28 16:19 ` Juri Linkov
2024-05-29 8:49 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-30 6:34 ` Juri Linkov
2024-05-30 8:54 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-05-31 6:18 ` Juri Linkov
2024-05-31 9:45 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-02 6:39 ` Juri Linkov
2024-06-04 8:20 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-04 16:43 ` Juri Linkov
2024-06-05 8:46 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-05 16:48 ` Juri Linkov
2024-06-06 9:19 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-07 6:37 ` Juri Linkov
2024-06-07 8:23 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-07 16:45 ` Juri Linkov
2024-06-08 9:12 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-09 17:04 ` 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=becd5819-6b15-422a-ba4f-106c03a04bbd@gmx.at \
--to=bug-gnu-emacs@gnu.org \
--cc=70949@debbugs.gnu.org \
--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).