Skip to main content
remove line numbers
Source Link
Kyle Meyer
  • 7.2k
  • 28
  • 22

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]."

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]."

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, first try to show a window in any frame that is already displaying that buffer. If that fails, display the buffer in a new frame. For non-status buffers, just use Magit's default behavior."

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

  ;; (require 'magit)

  (defun magit-display-buffer-pop-up-frame (buffer)
1   (if (with-current-buffer buffer (eq major-mode 'magit-status-mode))
2       (display-buffer buffer
3                       '((display-buffer-reuse-window
4                          display-buffer-pop-up-frame)
5                         (reusable-frames . t)))
6     (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]."

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

  ;; (require 'magit)

  (defun magit-display-buffer-pop-up-frame (buffer)
1   (if (with-current-buffer buffer (eq major-mode 'magit-status-mode))
2       (display-buffer buffer
3                       '((display-buffer-reuse-window
4                          display-buffer-pop-up-frame)
5                         (reusable-frames . t)))
6     (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]."

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]."

Source Link
Kyle Meyer
  • 7.2k
  • 28
  • 22

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

  ;; (require 'magit)

  (defun magit-display-buffer-pop-up-frame (buffer)
1   (if (with-current-buffer buffer (eq major-mode 'magit-status-mode))
2       (display-buffer buffer
3                       '((display-buffer-reuse-window
4                          display-buffer-pop-up-frame)
5                         (reusable-frames . t)))
6     (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]."