reddit / emacs

Specify reftex's *toc* buffer placement in display-buffer-alist

ExistingProgram3883 · 2022-09-10 07:09
Hi redditors, I am seeking for a way to specify the placement of the buffer named `*toc*` created by AUCTeX's `reftex-toc`-function in a side-window via `display-buffer-alist`. I tried it as shown below; however, this does not work, unfortunately. ``` (setq display-buffer-alist `( (".*\\*toc\\*.*" ;; reftex-toc (display-buffer-in-side-window) (window-height . 0.25) (side . right) (slot . 0)))) ``` Do you know how I could achieve a specific placement of the `*toc*` buffer?
franburstall · 2022-09-10 09:00
I don't think this can be done. Looking at the code in `retex-toc.el`, you can see that the `*toc*` window is constructed and placed by hand. You can force `display-buffer-alist` to intervene by doing (setq switch-to-buffer-obey-display-actions t) but that still leaves the window that `reftex-toc` already created in view.
ExistingProgram3883 · 2022-09-10 17:08
Thanks. Very unfortunate to hear. Unfortunately, the window construction does not look trivial and easily patchable.