Create a gist now

Instantly share code, notes, and snippets.

Re-use buffers across visible frames

By default, popwin pops up a window in the current frame only. This is fine, but if I have a multi-monitor setup, I want the secondary monitor to have these secondary buffers (e.g. test or grep output, magit).

Using display-buffer-alist, I can activate popwin only when the buffer isn’t already there. I hope this doesn’t break other stuff!

(setq display-buffer-alist
      '((popwin:display-buffer-condition (display-buffer-reuse-window
                                          popwin:display-buffer-action)
                                         (reusable-frames . visible))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment