I've been using emacsclient for a good while now, and in the past I've always used C-x C-c out of habit. This has never been a problem when using emacsclient -t as my terminal EDITOR for entering git commit messages, for instance.

I'm not sure what's changed, but now when I do, say, git commit, enter a message, save, and then C-x C-c like usual, it now complains

Don’t kill this buffer. Instead cancel using C-c C-k

But, when I use the suggested combination, it exits with status code 1 and git aborts the commit.

I really genuinely do want to kill this buffer and exit normally, so I'm a bit at a loss how to where this message is coming from, and how to fix it.

Update: Using C-c C-c does work, but I'd still like to use the usual key combo as the manual suggests I should be able to do. Is there a way to conditionally rebind C-x C-c to (with-editor-finish), but only within client sessions?

I'm also still curious about what caused this to start behaving differently from how it has in the past.

  • possibly related (not a duplicate): emacs.stackexchange.com/questions/19010/…
    – Tyler
    Commented Oct 27, 2017 at 17:26
  • What is C-x C-c bound to? (C-h k C-x C-c) What mode are you in while you edit git commits, and what minor modes? (C-h m) Commented Oct 27, 2017 at 21:21
  • @violet: if you already successfully committed, you can safely ignore such messages and kill the buffer as usual. No need to deactivate the package which is responsible for the message (as stated in your own answer below) unless you really do not need it.
    – user17303
    Commented Oct 29, 2017 at 15:53

1 Answer 1


I believe I've tracked this one down. The specific error message comes from the with-editor package, which, in turn, was installed as a dependency of the git-commit package (all under the Magit family). The message looks like it was added as part of a definite and deliberate attempt to avoid user error. Setting aside the question of whether it's correct or a bug, with-editor is certainly the cause.

For my purposes, removing both packages resolved the issue.

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.