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 ...
I also had difficulties with managing windows in a large frame, so I wrote this package named Purpose, which uses display-buffer-overriding-action to manage windows instead of display-buffer.
Basically, it adds a "purpose" to buffers and windows, so you can have windows that are used for editing (e.g. for source files), windows for comint-based buffers (e.g....
Sigh. I found a "solution," but it's an ugly one that requires
overwriting an existing org function. I would prefer one that
does not require modifying the org source code, but am putting
the results of my archaeological dig here in case anyone else can
As I've noticed in the past with other org functions,
org-mode is rather opinionated about how ...
While @Drew's solution works as I wanted, I was looking for a generic solution that I can apply to multiple cases; not just to *Messages* buffer.
Step 1: General Setup
Advise display-buffer to not execute if the current buffer is same as the
to-be-displayed buffer if the new ALIST entry inhibit-duplicate-buffer
I recently figured out how to make Org-mode capture in a new frame. Modifying that code to use your function is pretty straightforward. Here's how I'd do it:
(defun my/org-todo-window-advice (orig-fn)
"Advice to fix window placement in `org-fast-todo-selection'."
(let ((override '("\\*Org todo\\*" dan-org-todo-position)))
Here is a simple way to make Emacs show certain buffers in their own frame, by default. (And that frame will be reused when you refer to its buffer.)
Customize option special-display-buffer-names or option special-display-regexps to reflect the names of the buffers you want to display in their own frames.
For example, if all Alchemist buffers start with ...
Citation of my comment:
Did you really try M-x (display-buffer "*Messages*")?? It works for me with your entry in display-buffer-alist and "*flycheck errors*" replaced by "*Messages*"! Could it be that you tried switch-to-buffer instead and expected the same effects as for display-buffer? They behave differently (at least for me).
And @bertfred's answer:
Looking in someone else's config, I found a way to control where *Org Src.* and *Org todo* buffers appear. Now when I hit C-c C-t or C-c ' these buffers display in a new window at the bottom of my current window layout, and selecting a TODO state or hitting C-c ' (org-edit-src-exit) returns my window configuration to its original layout.
This solution ...
(add-to-list 'display-buffer-alist '("*Async Shell Command*" display-buffer-no-window (nil)))
The buffer is still created and it still gets the output of the command (or the error output): it is just not displayed automatically, but you can still get to it to look at what happened with the usual buffer selection mechanisms (C-x b etc).
display-buffer-alist actions can be multiple functions (a list of functions), the first one which returns non nil is used.
So you can use:
(add-to-list 'display-buffer-alist '("*grep" (display-buffer-reuse-window
Emacs manual about ready availabe display-buffer ...
Thanks @Drew for your answer, but it did not work (maybe I did not made it correctly :-)). I tried to add this in my .emacs file:
'("*Help" "*help[R]*" "*Help*"))
but nothing changed. Then, I tried various settings for the variable ess-help-frame-alist, and I did not manage neither...
However, I finally found a ...