Closed sebastianpech closed 5 years ago
Yes and yes. It is intended and can be changed. Put the following elisp code in your configuration (to run after window-purpose
was loaded):
(setcdr (assq 'switch-to-buffer purpose-action-sequences)
'(purpose-display-maybe-same-window
purpose-display-reuse-window-buffer
purpose-display-reuse-window-purpose
purpose-display-maybe-other-window
purpose-display-maybe-other-frame
purpose-display-maybe-pop-up-window
purpose-display-maybe-pop-up-frame))
The variable purpose-action-sequences
controls how Purpose tries to display a buffer in different common scenarios, and in what order. By default, purpose-display-maybe-same-window
is lower on the list, but this code puts it higher. Specifically, what you experienced is caused by *-reuse-window-purpose
which by default has a higher priority than *-maybe-same-window
.
Thanks, that solved it!
I haven't found anything concerning the following behavior:
When in window with purpose A, switching buffer to one that also has purpose B, instead of the emacs default behavior the buffer is viewed in the window with purpose B (though not dedicated) instead of in the window that is currently selected.
Is this intended and if yes, is it possible to disable it?