3

How do you tell display-buffer-alist to not display a buffer whose name has a particular string in it? The "Display Action Functions" documentation mentions display-buffer-no-window. However, I don't see this in the list of available functions when trying to customize display-buffer-alist through M-x customize-variable. The options I see are:

0 = --
1 = display-buffer-reuse-window
2 = display-buffer-pop-up-window
3 = display-buffer-same-window
4 = display-buffer-pop-up-frame
5 = display-buffer-use-some-window
6 = Other function

Choosing "Other function" and manually specifying display-buffer-no-window doesn't work either - that function does not exist. I am using emacs 24.3.

7

It was added in Emacs 24.4:

(defun display-buffer-no-window (_buffer alist)
  "Display BUFFER in no window.
If ALIST has a non-nil `allow-no-window' entry, then don't display
a window at all.  This makes possible to override the default action
and avoid displaying the buffer.  It is assumed that when the caller
specifies a non-nil `allow-no-window' then it can handle a nil value
returned from `display-buffer' in this case."
  (when (cdr (assq 'allow-no-window alist))
    'fail))

You should always use the documentation built into Emacs if you want to know about the version you're actually using (and personally I recommend using it regardless). The online documentation is always for the latest release.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.