When I try to commit using magit I get the following error;
1 git … commit -- Waiting for Emacs... *ERROR*: Wrong type argument: stringp, nil error: There was a problem with the editor '/opt/emacs/bin/emacsclient --socket-name=/tmp/emacs1000/server'. Please supply the message using either -m or -F option.
Here are the versions of software I'm using
Magit 20160814.1615, Git 2.9.0, Emacs 184.108.40.206, gnu/linux (Debian wheezy 7)
I run emacs as a server.
If I type the following into a file within my git project and eval the buffer I get the following;
(with-editor (let ((magit-git-debug t) (process-environment (cons "GIT_EDITOR=printf '[%s]\n' \"$EDITOR\"" process-environment))) (magit-git-insert "commit")))[/opt/emacs/bin/emacsclient --socket-name=/tmp/emacs1000/server] [/home/map7/code/testproject/.git/COMMIT_EDITMSG]
On the command line if I do the following
$ export GIT_TRACE=1 $ export GIT_EDITOR='printf "[%s]\n" "$EDITOR"' $ git commit 10:48:43.558746 git.c:350 trace: built-in: git 'commit' 10:48:43.561811 run-command.c:336 trace: run_command: '.git/hooks/pre-commit' 10:48:43.563366 run-command.c:336 trace: run_command: 'status' '--porcelain' 10:48:43.563595 exec_cmd.c:120 trace: exec: 'git' 'status' '--porcelain' 10:48:43.564766 git.c:350 trace: built-in: git 'status' '--porcelain' 10:48:43.574334 run-command.c:336 trace: run_command: 'printf "[%s]\n" "$EDITOR"' '/home/map7/code/testproject/.git/COMM IT_EDITMSG' 10:48:43.574637 run-command.c:195 trace: exec: '/bin/sh' '-c' 'printf "[%s]\n" "$EDITOR" "$@"' 'printf "[%s]\n" " $EDITOR"' '/home/map7/code/testproject/.git/COMMIT_EDITMSG' [emacs -nw -q] [/home/map7/code/testproject/.git/COMMIT_EDITMSG] Aborting commit due to empty commit message. 10:48:43.581313 git.c:350 trace: built-in: git 'config' '--get' 'oh-my-zsh.hide-dirty'
I just restarted emacs and now I can commit again, but I don't know for how long.
I can re-enact a similar problem if I do the following
- Stage my changes in magit using 's' on a file
- Go to commit hitting 'c c'
- Cancel the commit 'C-c C-k'
Now I get the same error as I was getting before, when trying to commit.
UPDATE: error in Backtrace
Debugger entered--Lisp error: (wrong-type-argument stringp nil) isearch-done(t) isearch-cancel() server-goto-toplevel(#<process server <24>>) server-process-filter(#<process server <24>> "-dir /home/map7/code/angularjs_nested_routes/ -current-frame -tty /dev/pts/31 dumb -file /home/map7/code/angularjs_nested_routes/.git/COMMIT_EDITMSG \n")
I've been busy testing my configuration by remarking parts out as suggested. I recently had the same error, but manage to fix the error by killing off some of my buffers. I didn't take note of which buffers, but I will next time. This may suggest that it's a certain state instead of configuration?