When I try to commit C-c C-c with magit, I get this error:

There was a problem with the editor '/snap/emacs/1459/usr/bin/emacsclient --socket-name=/run/user/5019/emacs/server'. ... [Hit $ to see buffer magit-process: research for details]

When I hit $

hint: Waiting for your editor to close the file...
/snap/emacs/1459/usr/bin/emacsclient --socket-name=/run/user/5019/emacs/server: 1: /snap/emacs/1459/usr/bin/emacsclient: not found
error: There was a problem with the editor '/snap/emacs/1459/usr/bin/emacsclient --socket-name=/run/user/5019/emacs/server'.
Please supply the message using either -m or -F option.

I don't see this file open anywhere. How do I make emacs close whatever file is open that is preventing it from committing or rendering the commit message buffer?

2 Answers 2


The real error is this part:

/snap/emacs/1459/usr/bin/emacsclient: not found

Looks like emacsclient is missing in your snap?

  • I've had the same snap installation for 2 years, never seen this message before. Commented Apr 8, 2022 at 20:28
  • 1
    That doesn’t tell you if if the file exists or not.
    – db48x
    Commented Apr 8, 2022 at 21:07
  • @Mittenchops, I have a recollection that "snap" installs of Emacs used to be broken, so if you've had the same install for two years then it wouldn't surprise me if there were problems with it. I think the problems got fixed, but I don't know for sure. Consider installing Emacs in another way if you can't get this working.
    – phils
    Commented May 8, 2022 at 23:13
  • In my case, I had kept snap emacs opened for a long time on server. Later snap must have updated emacs and its path causing the magit commit to throw the above error. Commented Nov 1, 2022 at 7:08

I had the same problem after an update, "solved" by doing this:

  1. Remove ~/.emacs.d/.
  2. Reinstall emacs snap

Not very detailed solution but worked in my case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.