unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: Does display-buffer display the buffer or not?
Date: Fri, 24 Dec 2010 09:15:15 +0100	[thread overview]
Message-ID: <87r5d7bn8s.fsf@member.fsf.org> (raw)
In-Reply-To: <AANLkTi=CxxL5KV=1yq4z9U7xT5ySLeXJRFXCe9HTyJL5@mail.gmail.com> (Lennart Borgman's message of "Fri, 24 Dec 2010 06:01:00 +0100")

Lennart Borgman <lennart.borgman@gmail.com> writes:

Hi Lennart,

> The doc string for displayb buffer begins like this:
>
>   Make buffer BUFFER-OR-NAME appear in some window but don't select it.
>   BUFFER-OR-NAME must be a buffer or the name of an existing
>   buffer.  Return the window chosen to display BUFFER-OR-NAME or
>   nil if no such window is found.
>
> I do not understand the last sentence. Could it happen that the buffer
> is not displayed? In that case, should not that be an error?

My first idea was that when you say NOT-THIS-WINDOW (t) and the current
FRAME (nil), but the current frame has only one window and is only of
minimal size, so no split can be done, then it must return nil and do
nothing.  Unfortunately, testing that situation with

  (display-buffer "*info*" t nil)

pops up a completely new frame showing *info*.  Reading the docs a bit
further, there is

,----[ C-h f display-buffer RET ]
| [...]
| 
| nil - consider windows on the selected frame (actually the
| last non-minibuffer frame) only.  If, however, either
| `display-buffer-reuse-frames' or `pop-up-frames' is non-nil
| (non-nil and not graphic-only on a text-only terminal),
| consider all visible or iconified frames.
`----

Unfortunately, both `display-buffer-reuse-frames' and `pop-up-frames'
are nil, here.

I do think that creating a new frame is appropriate in the situation
above, but the docs should make that clear.  Currently, they don't match
the implemented behavior.

Bye,
Tassilo



  reply	other threads:[~2010-12-24  8:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-24  5:01 Does display-buffer display the buffer or not? Lennart Borgman
2010-12-24  8:15 ` Tassilo Horn [this message]
2010-12-24  9:31   ` martin rudalics
2010-12-24 10:22     ` Tassilo Horn
2010-12-24 11:13       ` martin rudalics
2010-12-24 11:26         ` Lennart Borgman
2010-12-24 11:49           ` martin rudalics
2010-12-24 12:06             ` Lennart Borgman
2010-12-24 14:41               ` martin rudalics
2010-12-24 15:43                 ` Lennart Borgman
2010-12-24 17:57                   ` martin rudalics
2010-12-24 11:44       ` Eli Zaretskii
2010-12-24 14:50         ` Tassilo Horn
2010-12-24 15:04           ` martin rudalics
2010-12-24 16:14             ` Eli Zaretskii
2010-12-24  9:31 ` martin rudalics
2010-12-24  9:58   ` Lennart Borgman
2010-12-24 10:27     ` 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

  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=87r5d7bn8s.fsf@member.fsf.org \
    --to=tassilo@member.fsf.org \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.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 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).