Skip to content

Instantly share code, notes, and snippets.

@antifuchs
Created November 27, 2015 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antifuchs/6943311650b411c015a8 to your computer and use it in GitHub Desktop.
Save antifuchs/6943311650b411c015a8 to your computer and use it in GitHub Desktop.

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