Skip to main content

Try using the following function as magit-display-buffer-function:

  ;; (require 'magit)

(defun magit-display-buffer-pop-up-frame (buffer)
  (if (with-current-buffer buffer (eq major-mode 'magit-status-mode))
      (display-buffer buffer
                      '((display-buffer-reuse-window
                         display-buffer-pop-up-frame)
                        (reusable-frames . t)))
    (magit-display-buffer-traditional buffer)))

(setq magit-display-buffer-function #'magit-display-buffer-pop-up-frame)

This says, "If the to-be-displayed buffer is a Magit status buffer [1], first try to show a window [3] in any frame [5] that is already displaying that buffer. If that fails, display the buffer in a new frame [4]. For non-status buffers, just use Magit's default behavior [6]."

Kyle Meyer
  • 7.2k
  • 28
  • 22