> I suppose that to some degree [*] the main benefit of this patch is that > it offers an option that calls quit-restore-window. Yes, I agree with this. Setting org-src-window-setup to other-window was almost good enough for me -- it even respected display-buffer-base-action -- except that it wouldn't close the popped up window. > And that makes me think that the current options that go through a > simple display-buffer-based call (current-window and other-window) would > benefit from calling quit-restore-window like your `plain` option does. > If you agree, perhaps it's worth adding another patch on top that does > that. I agree other-window would benefit from quit-restore-window, it makes sense to close the existing window if it's been popped up. I'm less sure about current-window. We could certainly call quit-restore-window here, but I'm not sure there's any benefit, as it shouldn't open new windows that need to be closed (unless you're modifying display-buffer-alist, in which case the `plain' option should be preferred anyways). I'm also hesitant because Samuel relies on this option for accessibility reasons, and if I accidentally introduced a bug, I might not immediately notice, since I don't use this option. I've attached a patch on top of my previous one, calling quit-restore-window when using other-window, but leaving current-window alone. > Hmm, weird. I tried again (Emacs 26.3, vanilla config) and still see > the behavior I reported. Oh well. I tested again, with "emacs -q" this time, and got the behavior you reported. So it must be something with my config.