Type error on commit with magit
mattiasb opened this issue · 3 comments
I get the following when trying to commit with magit
since I updated to Fedora 30 (via reinstall) the other day:
1 git … commit --
hint: Waiting for your editor to close the file...
Waiting for Emacs...
*ERROR*: Wrong type argument: stringp, nil
error: There was a problem with the editor '/usr/bin/emacsclient --socket-name=/tmp/emacs1000/main'.
Please supply the message using either -m or -F option.
The one thing that I can think of might have caused this is that the reinstall meant new versions of all packages (incluing magit and with-editor).
My Config (I don't expect you to browse through that, just posting for completeness).
M-x with-editor-debug
gives me:
with-editor: /home/mattiasb/.emacs.d/elpa/with-editor-20190224.931/with-editor.el
emacs: /usr/bin/emacs (26.1)
system:
system-type: gnu/linux
system-configuration: x86_64-redhat-linux-gnu
system-configuration-options: --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=no --with-xwidgets --with-modules build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' LDFLAGS=-Wl,-z,relro PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig
server:
server-running-p: t
server-process: #<process main>
server-use-tcp: nil
server-name: main
server-socket-dir: /tmp/emacs1000
main
server-auth-dir: ~/.emacs.d/server/
WARNING: not an accessible directory
with-editor-emacsclient-executable:
value: /usr/bin/emacsclient (26.1)
default: /usr/bin/emacsclient (26.1)
funcall: /usr/bin/emacsclient (26.1)
path:
$PATH: "/home/mattiasb/.local/bin:/home/mattiasb/.local/share/gem/bin:/home/mattiasb/.cabal/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin"
exec-path: (/home/mattiasb/.local/bin /home/mattiasb/.local/share/gem/bin /home/mattiasb/.cabal/bin /usr/share/Modules/bin /usr/local/bin /usr/local/sbin /usr/bin /usr/sbin /usr/libexec/emacs/26.1/x86_64-redhat-linux-gnu)
with-editor-emacsclient-path:
/home/mattiasb/.local/bin (t)
/home/mattiasb/.local/share/gem/bin (nil)
/home/mattiasb/.cabal/bin (nil)
/usr/share/Modules/bin (t)
/usr/local/bin (t)
/usr/local/sbin (t)
/usr/bin (t)
/usr/bin/emacsclient (26.1)
/usr/sbin (t)
/usr/libexec/emacs/26.1/x86_64-redhat-linux-gnu (t)
My EDITOR
env var is: EDITOR=emacsclient -c -nw -s main
.
Can you try evaluating (setq debug-on-signal t)
just before the comitting. That should cause a *Backtrace*
buffer to pop up with more info on the error.
It didn't (no idea why) however when I looked in *Messages*
I saw something else:
Error enabling Flyspell mode:
(stringp nil)
There's something weird going on with flyspell on my end (even just running flyspell-mode
) fails here so really not a with-editor
problem. Sorry for the noise!
Errors that occur when running git-commit-setup-hook
are now demoted. Might make it harder for users to note that there is an issue but easier to narrow it down. And even if this results in some beloved feature being disable it makes it at least possible to commit without having to debug first.