From 99390edb5ccd4fee72bafe03523a73b506c68fcb Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Tue, 4 Aug 2020 20:55:03 -0400 Subject: [PATCH] Fix `magit-status-no-new-window` failing to open repos by symlink `let`s `default-directory` instead of using the `directory` argument of `magit-status`. This allows it to use it's normal directory handling. --- .emacs.d/init.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 1fa1d89..7f06816 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -480,10 +480,11 @@ :init (defun magit-status-no-new-window (directory) (interactive "D") - (progn (let ((magit-display-buffer-function - '(lambda (buffer) - (display-buffer buffer '(display-buffer-same-window))))) - (magit-status directory))))) + (let ((magit-display-buffer-function + '(lambda (buffer) + (display-buffer buffer '(display-buffer-same-window)))) + (default-directory directory)) + (magit-status)))) (use-package popwin :ensure :disabled