Chris Stryczynski

Software Developer / Consultant

Open Emacs magit from command line

Posted on: 25/06/2018

emacs --eval '(let ((display-buffer-alist `(("^\\*magit: " display-buffer-same-window) ,display-buffer-alist))) (magit-status))'

Or with emacs client:

emacsclient -c --eval '(let ((display-buffer-alist `(("^\\*magit: " display-buffer-same-window) ,display-buffer-alist))) (magit-status))'

I’ve setup a handy mg alias to open magit in command line + client mode via:

alias mg='emacsclient -nw -c --eval '"'"'(progn (let ((display-buffer-alist `(("^\\*magit: " display-buffer-same-window) ,display-buffer-alist))) (magit-status)) (delete-other-windows))'"' "

Found this posted here:


No comments, yet!

Submit a comment