From ef6f3433f2b6e9436d94edbc2e0fb4da25255ded Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Tue, 7 Apr 2020 12:27:12 -0400 Subject: [PATCH] Improve magit alias/function to always create a new frame --- .aliases/command-specific/emacsclient | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.aliases/command-specific/emacsclient b/.aliases/command-specific/emacsclient index 9929af9..6f86af3 100644 --- a/.aliases/command-specific/emacsclient +++ b/.aliases/command-specific/emacsclient @@ -6,5 +6,7 @@ alias ec="e -c" alias ecn="ec -n" function magit() { - en -e "(progn (cd \"$(realpath ${1-.})\") (magit-status))" + ecn -e '(progn (let ((old-frame (selected-frame))) + (magit-status "'"$(realpath ${1-.})"'") + (delete-frame old-frame)))' }