From: martin rudalics <rudalics@gmx.at>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: 15189@debbugs.gnu.org
Subject: bug#15189: 24.3.50; display-buffer does not work well with custom frames.
Date: Mon, 26 Aug 2013 18:34:33 +0200 [thread overview]
Message-ID: <521B8399.8000907@gmx.at> (raw)
In-Reply-To: <742F02FA-4469-4BCA-94A5-D8A7A679B52B@lawlist.com>
Please keep 15189@debbugs.gnu.org CCed so others can read your mails
too.
> Yes, that works now if we also add the following line to the end of
> lawlist-display-buffer-function: (switch-to-buffer (get-file-buffer
> buffer-filename))
I'm still not quite sure whether I understand what you want to do.
An idiom like
(display-buffer
(find-file buffer-filename))
is practically always wrong because it usually will (1) display the
buffer via `find-file' which calls `switch-to-buffer' which bypasses
`display-buffer' by calling `set-window-buffer' directly and (2) display
the buffer a second time which might result in reusing the window used
in (1) but may also use another window according to your buffer display
settings. In any case, a doc-string like
"Locate or create a specific frame, and then open the file."
is inappropriate because the function nowhere does what you say here.
> I expected display-buffer to execute the display-buffer-function first
> in time (e.g., before executing find-file), but that is not the case.
I'm afraid you're confusing things here. `display-buffer' does execute
`display-buffer-function' first but its arguments get evaluated before
its body. This is something you certainly want too because how would
`display-buffer' otherwise know the buffer it is supposed to display?
> If the purpose of display-buffer is not to execute the
> display-buffer-function first in time (e.g., before executing
> find-file), then I made an erroneous assumption regarding the reason
> for using display-buffer.
I suppose you made the erroneous assumption that `find-file' does not
display the file's buffer. That's why I suggested to use
`find-file-noselect' instead. Anyway, using `display-buffer-function'
is deprecated since Emacs 24.3 and was hardly used in previous versions.
What you probably want to do is to customize `display-buffer-alist'
instead.
martin
next prev parent reply other threads:[~2013-08-26 16:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 0:50 bug#15189: 24.3.50; display-buffer does not work well with custom frames Keith David Bershatsky
2013-08-26 13:06 ` martin rudalics
[not found] ` <4066A3F6-AB96-43EE-B8F4-E3DF2F73CBD2@lawlist.com>
2013-08-26 15:01 ` martin rudalics
[not found] ` <521B6B84.5060106@gmx.at>
[not found] ` <742F02FA-4469-4BCA-94A5-D8A7A679B52B@lawlist.com>
2013-08-26 16:34 ` martin rudalics [this message]
2013-08-26 20:15 ` Keith David Bershatsky
2013-08-27 6:47 ` martin rudalics
2013-08-28 3:59 ` Kevin Rodgers
2013-08-28 16:35 ` Keith David Bershatsky
2013-08-29 0:21 ` Keith David Bershatsky
2013-08-27 22:30 ` Keith David Bershatsky
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=521B8399.8000907@gmx.at \
--to=rudalics@gmx.at \
--cc=15189@debbugs.gnu.org \
--cc=esq@lawlist.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).