I have been getting an error when trying to commit using magit. I stage my change with a
, then on commit cc
I get the message:
Opening output file: No such file or directory, c:/Users/myuname/.emacs.d/server/server
If I ignore the message and attempt the commit cc
again I get the message:
There was a problem with the editor '"c:/ProgramData/chocolately/lib/emacs64/tools/emacs/bin/emacsclient.exe"'. ... [Hit $ to see buffer magit-process: .emacs.d for details]
After pressing $
I see the magit process buffer containing:
1 C:/ProgramData/chocolately/lib/emacs64/tools/emacs/bin/emacsclient.exe ... "commit" "--"
error: There was a problem with the editor '"c:/ProgramData/chocolately/lib/emacs64/tools/emacs/bin/emacsclient.exe"'. Please suply the message using either -m or -F option.
I've found similar problems around the web (such as this one) but they usually state that it is a bug which has been fixed in more recent versions of emacs/magit. I'm running versions that are more recent than when these answers were posted, so they haven't been helpful to me.
My current system is:
- Windows 10
- GNU Emacs 25.3.1 (x86_64-mingw32) of 2017-09-13 (emacs64 package from chocolatey)
- Magit 20180517.1345, Git 2.17.0.windows.1, Emacs 25.2.1, windows-nt
Please let me know if there is any other useful information that I can provide. I'm not very experienced with debugging in emacs, so please excuse anything basic that I've overlooked.
EDIT
Here is the with-editor-debug buffer:
with-editor: c:/Users/jrm978/.emacs.d/elpa/with-editor-20180414.757/with-editor.el
emacs: c:/ProgramData/chocolatey/lib/emacs64/tools/emacs/bin/emacs (25.3.1)
system:
system-type: windows-nt
system-configuration: x86_64-w64-mingw32
system-configuration-options: --prefix=/tmp/emacs --without-imagemagick --without-dbus --with-modules 'CFLAGS=-O2 -g0'
server:
server-running-p: nil
server-process: #<process server>
server-use-tcp: t
server-name: server
server-socket-dir: nil
WARNING: not an accessible directory
server-auth-dir: ~\.emacs.d\server\
ERROR: not an accessible directory
with-editor-emacsclient-executable:
value: c:/ProgramData/chocolatey/lib/emacs64/tools/emacs/bin/emacsclient.exe (25.3)
default: c:/ProgramData/chocolatey/lib/emacs64/tools/emacs/bin/emacsclient.exe (25.3)
funcall: c:/ProgramData/chocolatey/lib/emacs64/tools/emacs/bin/emacsclient.exe (25.3)
path:
$PATH: "C:\\Program Files\\ImageMagick-7.0.7-Q16;C:\\Program Files\\Microsoft HPC Pack 2008 R2\\Bin\\;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;;C:\\Program Files\\Tcl\\bin;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files (x86)\\vim\\vim80;C:\\tools\\miniconda3;C:\\tools\\miniconda3\\Scripts;C:\\Program Files\\OpenSees;C:\\ProgramData\\chocolatey\\lib\\mpv.install\\tools;C:\\Program Files\\Git\\cmd;C:\\SIMULIA\\Abaqus\\Commands;C:\\Strawberry\\c\\bin;C:\\Strawberry\\perl\\site\\bin;C:\\Strawberry\\perl\\bin;C:\\Users\\jrm978\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\jrm978\\AppData\\Local\\Pandoc\\;C:\\Users\\jrm978\\hunspell\\bin;C:\\Program Files\\Oracle\\VirtualBox;;C:\\Program Files (x86)\\clisp-2.49"
exec-path: (c:/Program Files/ImageMagick-7.0.7-Q16 C:/Program Files/Microsoft HPC Pack 2008 R2/Bin/ C:/Program Files (x86)/Common Files/Oracle/Java/javapath . C:/Program Files/Tcl/bin C:/ProgramData/Oracle/Java/javapath C:/WINDOWS/system32 C:/WINDOWS C:/WINDOWS/System32/Wbem C:/WINDOWS/System32/WindowsPowerShell/v1.0/ C:/Program Files/MiKTeX 2.9/miktex/bin/x64/ C:/ProgramData/chocolatey/bin C:/Program Files (x86)/vim/vim80 C:/tools/miniconda3 C:/tools/miniconda3/Scripts C:/Program Files/OpenSees C:/ProgramData/chocolatey/lib/mpv.install/tools C:/Program Files/Git/cmd C:/SIMULIA/Abaqus/Commands C:/Strawberry/c/bin C:/Strawberry/perl/site/bin C:/Strawberry/perl/bin C:/Users/jrm978/AppData/Local/Microsoft/WindowsApps C:/Users/jrm978/AppData/Local/Pandoc/ C:/Users/jrm978/hunspell/bin C:/Program Files/Oracle/VirtualBox . C:/Program Files (x86)/clisp-2.49 c:/ProgramData/chocolatey/lib/emacs64/tools/emacs/libexec/emacs/25.3/x86_64-w64-mingw32)
with-editor-emacsclient-path:
c:/ProgramData/chocolatey/lib/emacs64/tools/emacs/bin (t)
c:/ProgramData/chocolatey/lib/emacs64/tools/emacs/bin/emacsclient.exe (25.3)
c:/Program Files/ImageMagick-7.0.7-Q16 (t)
C:/Program Files/Microsoft HPC Pack 2008 R2/Bin/ (t)
C:/Program Files (x86)/Common Files/Oracle/Java/javapath (t)
C:/Program Files/Tcl/bin (t)
C:/ProgramData/Oracle/Java/javapath (t)
C:/WINDOWS/system32 (t)
C:/WINDOWS (t)
C:/WINDOWS/System32/Wbem (t)
C:/WINDOWS/System32/WindowsPowerShell/v1.0/ (t)
C:/Program Files/MiKTeX 2.9/miktex/bin/x64/ (t)
C:/ProgramData/chocolatey/bin (t)
C:/ProgramData/chocolatey/bin/emacsclient.exe (25.3)
C:/Program Files (x86)/vim/vim80 (t)
C:/tools/miniconda3 (t)
C:/tools/miniconda3/Scripts (t)
C:/Program Files/OpenSees (t)
C:/ProgramData/chocolatey/lib/mpv.install/tools (t)
C:/Program Files/Git/cmd (t)
C:/SIMULIA/Abaqus/Commands (t)
C:/Strawberry/c/bin (t)
C:/Strawberry/perl/site/bin (t)
C:/Strawberry/perl/bin (t)
C:/Users/jrm978/AppData/Local/Microsoft/WindowsApps (t)
C:/Users/jrm978/AppData/Local/Pandoc/ (t)
C:/Users/jrm978/hunspell/bin (t)
C:/Program Files/Oracle/VirtualBox (t)
. (t)
C:/Program Files (x86)/clisp-2.49 (t)
c:/ProgramData/chocolatey/lib/emacs64/tools/emacs/libexec/emacs/25.3/x86_64-w64-mingw32 (t)
With M-x toggle-debug-on-error
nothing happens.
Regarding the different versions, I added the magit package when using 25.2.1, but after hitting this problem updated first emacs and then the magit package. I just removed and reinstalled magit. M-x magit-version
now gives:
- Magit 20180517.1345, Git 2.17.0.windows.1, Emacs 25.3.1, windows-nt
But the problem persists.
M-x with-editor-debug
could be helpful. I notice that you list your Emacs version as 25.3, but your magit version listing says Emacs 25.2 (not sure if that is significant, but it seems like something worth poking at). If you runM-x toggle-debug-on-error
before committing, do you get a backtrace?with-editor-debug
buffer:server-auth-dir: ~.emacs.dserver
(with no slashes)?