From: martin rudalics <rudalics@gmx.at>
To: Dmitry Gutov <dgutov@yandex.ru>, 36161@debbugs.gnu.org
Subject: bug#36161: 27.0.50; display-buffer-in-previous-window might choose not to use PREVIOUS-WINDOW
Date: Thu, 13 Jun 2019 10:43:56 +0200 [thread overview]
Message-ID: <e909627d-1c11-0ad4-c3b9-dc5918ea4182@gmx.at> (raw)
In-Reply-To: <3415bbc7-54fd-111e-a18b-0a927d93a7b2@yandex.ru>
> > I would have to understand first why one and the same buffer was
> > displayed in different windows previously.
>
> Not sure what answer you're looking for. Suppose a user used switch-to-buffer sometime in the past to show it there?
>
> I think the question is, if the caller supplies the `previous-window' cons in ALIST, is there a point in second-guessing its choice?
>
> FWIW, I've only found one user of this function that does that, and it's `debug'. Which behavior do you think that command would prefer?
'display-buffer-in-previous-window' was added to fix a problem with
the debugger buffer (Bug#8789). The idea behind it is that once a
buffer was shown in a specific window and that window still exists, it
would support the principle of least surprise to show it there again.
And to _not_ have this function do anything when a window showing that
buffer was just ephemeral and got deleted in between. In that latter
case a more deterministic function (like below-selected, at-bottom)
should take over.
'display-buffer-in-previous-window' will work well if it is
exclusively used for showing a buffer a second time (maybe together
with 'prev-buffer' and 'next-buffer'). It's behavior deteriorates as
soon as a user switches to that buffer in some arbitrary fashion.
Hence it's more suitable for buffers popping up in special occasions
(like, for example, when a bug occurred and the debugger should be
entered) and less suitable for buffer editing.
A 'previous-window' ALIST entry should continue to support the
principle of least surprise by allowing to choose a non-selected
window that never showed the buffer before. The selected window,
however, should be always either chosen or excluded from choice by
special means - either via 'display-buffer-same-window' or using an
'inhibit-same-window' entry.
martin
next prev parent reply other threads:[~2019-06-13 8:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 20:29 bug#36161: 27.0.50; display-buffer-in-previous-window might choose not to use PREVIOUS-WINDOW Dmitry Gutov
2019-06-11 8:16 ` martin rudalics
2019-06-11 13:01 ` Dmitry Gutov
2019-06-12 9:18 ` martin rudalics
2019-06-12 13:31 ` Dmitry Gutov
2019-06-13 8:43 ` martin rudalics [this message]
2019-06-16 0:47 ` Dmitry Gutov
2019-06-16 8:16 ` martin rudalics
2019-06-19 1:37 ` Dmitry Gutov
2019-06-19 9:15 ` martin rudalics
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e909627d-1c11-0ad4-c3b9-dc5918ea4182@gmx.at \
--to=rudalics@gmx.at \
--cc=36161@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.