I'm curious, then, why would what I've done in Test 2 nor corral it? (add-to-list 'display-buffer-alist '("\\*CAPTURE*" (display-buffer-same-window)))
On Sun, Sep 22, 2024 at 12:00 PM Ihor Radchenko <yanta...@posteo.net> wrote: > Amol Vaidya <amolvaidy...@gmail.com> writes: > > > Thank you for your clarification. Just a minor point: my concern is that > > org-capture is not adhering to general display-buffer settings rather > than > > specifically display-buffer-alist. In my case display-buffer-alist is nil > > when I run emacs -q, but according to section 29.13.1 of the Elisp > manual, > > if display-buffer-alist is nil, then display-buffer should consult the > > display-buffer-base-action user option to decide where to display a > buffer. > > I see. > I think that you misunderstood what `display-buffer-base-action' is for. > It is only used when the Emacs package that is displaying the buffer > does not specify how to display it (in other words, calling > `display-buffer' without specifying ACTION argument) > > That's not what Org capture do. Org capture does tell Emacs how to > display the buffer. Only when the user explicitly overrides Org capture > display settings (via `display-buffer-alist' or > `display-buffer-overriding-action'), the default behavior is changed. > > If you look into the docstring of `display-buffer', you will see that > there are a number of user settings with different priorities: > > display-buffer builds a list of action functions and an action > alist by combining any action functions and alists specified by > display-buffer-overriding-action, display-buffer-alist, the > ACTION argument, display-buffer-base-action, and > display-buffer-fallback-action (in order). Then it calls each > function in the combined function list in turn, passing the > buffer as the first argument and the combined action alist as the > second argument, until one of the functions returns non-nil. > > There is no bug in Org capture that we provide ACTION argument to hint > Emacs using what we believe is a better default compared to generic > buffer popups. > > For you, as a user, the right way to configure how Org capture window is > displayed is customizing `display-buffer-alist'. > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at <https://orgmode.org/>. > Support Org development at <https://liberapay.com/org-mode>, > or support my work at <https://liberapay.com/yantar92> >