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.

1 Answer 1


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))

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 and acknowledge you have read our privacy policy.

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