I am trying to use Emacs 25.1.1 (graphical version, Windows 10) as both the primary editor and the editor for git operations.
In my workflow, I invoke git through M-x shell-command.
I tried the following two options so far:
git config --global core.editor "emacs -Q"With this,
M-x shell-command RET git commitworks just fine, as a new light-weight instance of emacs is used.Downside: Completion with
M-/akadabbrev-expandis less useful than it could be.git config --global core.editor "emacsclient --no-wait --create-frame"With this setting, trying to execute git synchrnously as
M-x shell-command RET git commiton the other hand causes theemacsclientand serveremacsprocesses to hang indefinitely, until `emacsclient is killed, while the asynchrnous invocationM-x shell-command RET git commit &works, but this setup is too brittle, as forgetting the & causes Emacs to all but crash.
Is there some way to use emacsclient as git editor, that is compatible with M-x shell-command?