reddit / emacs

[Org] org-open-at-point always makes a new window. Can I get it to reuse the 'other' window if I have one open?

DO_NOT_PRESS_6 · 2022-06-28 20:40
I often have two windows open in emacs, vertically split. \`org-open-at-point\` on a local link, or \`find-file-other-window\` tend to create yet another split, and I end up with an unusable frame setup. I wonder if someone here knows of a strategy for keeping window splits sane, perhaps by designating a window for visiting these sorts of things, or by limiting the number/width of windows in a frame. Emacs being what it is, I'm \*sure\* a solution has been invented, but I haven't been able to find it in my searching so far.
yantar92 · 2022-06-29 01:23
You probably need to customize `org-link-frame-setup`
DO_NOT_PRESS_6 · 2022-06-29 13:50
Okay, thanks. I didn't know about that. It doesn't look like it quite has the level of semantics that I vaguely sketched out above, but I'll play with it some.
yantar92 · 2022-06-29 13:55
I am not 100% sure what level of semantics you are looking for. Emacs provides plenty of functions to display new buffer. See the docstring of `display-buffer`.
DO_NOT_PRESS_6 · 2022-06-29 13:59
I think I was just being a lazy emacser, coddled by packages that take a high-level concept and expose a pile of rich semantics around it. I think maybe I was expecting someone to point me to painless-windows.el or something :)
WallyMetropolis · 2022-06-29 15:04
You mean ... like Hyperbole? (I kid, figuring out everything Hyperbole can do is far from painless. But I bet it can do this.)
rswgnu · 2022-06-30 05:31
Wally is indeed right that Hyperbole’s hpath:where setting let’s you choose where to display link referents easily, much simpler than the options available with display-buffer. Hyperbole can open org links as well.