all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Trevor Jim <tjim@mac.com>
Cc: 18181@debbugs.gnu.org
Subject: bug#18181: bug in display-buffer-below-selected
Date: Tue, 05 Aug 2014 10:36:09 +0200	[thread overview]
Message-ID: <53E09779.6000005@gmx.at> (raw)
In-Reply-To: <bc67d4ee-6262-4593-8212-0d45cfd02a12@me.com>

 >> This is the intended behavior
 >
 > OK.

I'm afraid you don't like it.  But let me explain why it's this way: As
a first step, `display-buffer' usually searches all windows whether the
buffer is already displayed.  This search doesn't come without any cost
because we have to check whether the selected window or another frame
are eligible.  Hence, it makes sense to do that search in the separate
action function `display-buffer-reuse-window'.  Usually, that function
is the very first tried by `display-buffer'.

The remaining action functions have been written based on the idea that
`display-buffer-reuse-window' already failed to find a suitable window
and either a new window or one that doesn't display the buffer already
has to be provided.

 > Just FYI however, there has been a change in behavior. It's possible that other software has been affected by the change. For example, the reason I used display-buffer-below-selected was because I saw it used in rmail.  You might want to make sure that rmail is still working correctly.

Can you elaborate how rmail might be affected by this?

 > I'm not sure how it corresponds to bzr but you can see the git commit here:
 >
 > http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=6a5d9e9a3247566bf69575444e2a1f75f5b3e021
 >
 > With that commit I see the new behavior.  Before that commit, all the way up to 24.3 at least, I see the old behavior.

I understand what you mean now.  That indeed changed the behavior for
the "frame has more than one window" case.  Though IIRC its intention
was to handle the case where the buffer is _not_ displayed yet, a fact
`display-buffer-reuse-window' should have implicitly checked before.

 > Also: I have to say that looking at the documentation it is hard to say what the intended behavior is.

As a rule: The idea is that an application should always try
`display-buffer-reuse-window' first unless the intended behavior is to
strictly use a new window or one that displays another buffer.  If you
(or anyone else) have any good ideas how to change the documentation
such that this idea becomes immediately evident, please don't hesitate
to propose the necessary change.  I have not written the present
documentation and my English probably isn't well enough to do the job.

Thanks, martin





  reply	other threads:[~2014-08-05  8:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-03 10:59 bug#18181: bug in display-buffer-below-selected Trevor Jim
2014-08-04 17:22 ` martin rudalics
2014-08-04 23:58   ` Juri Linkov
2014-08-04 17:53 ` Trevor Jim
2014-08-05  8:36   ` martin rudalics [this message]
2014-08-05 14:07 ` Trevor Jim
2014-08-09 17:04   ` martin rudalics
2014-08-09 23:49     ` Juri Linkov
2014-08-29 10:47     ` 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=53E09779.6000005@gmx.at \
    --to=rudalics@gmx.at \
    --cc=18181@debbugs.gnu.org \
    --cc=tjim@mac.com \
    /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.