From: Klaus Berndl <klaus.berndl@sdm.de>
Subject: How to best use the display-buffer-function?
Date: 05 Feb 2004 08:50:10 +0100 [thread overview]
Message-ID: <uk732yngt.fsf@sdm.de> (raw)
Suppose i want to some checks before `display-buffer'. If the checks are true
then i always want to display the buffer in a special window at my frame, if
the checks fail i want to proceed with standard display-buffer, i.e.
`display-buffer' should choose the window according to all its rules.
Currently i have something like (simplified):
(defun my-display-buffer-function (buffer not-this-window)
(if (my-pre-checks)
;; then display the BUFFER in a special window at the frame
(my-display-buffer-in-special-window buffer)
;; otherwise delegate the buffer-display to the original `display-buffer'
(let ((display-buffer-function nil))
(display-buffer buffer not-this-window))))
(setq display-buffer-function my-display-buffer-function)
Is this a good way to do this?
Another question: Why a display-buffer-function gets only two args and not
three like the `display-buffer'?
Thanks for comments, hints and help,
Klaus
--
Klaus Berndl mailto: klaus.berndl@sdm.de
sd&m AG http://www.sdm.de
software design & management
Carl-Wery-Str. 42, 81739 Muenchen, Germany
Tel +49 89 63812-392, Fax -220
reply other threads:[~2004-02-05 7:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=uk732yngt.fsf@sdm.de \
--to=klaus.berndl@sdm.de \
/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.
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).