1

Sometimes I'll open a large structured files (say, JSON) using json-mode, but the contents are malformed in some way (or something) and my Emacs session will suddenly spike my CPU to 100% and become unresponsive. Attempting to quit with C-g seems to do nothing.

Is there a graceful way to recover from such a situation? I usually just end up killing my entire emacs process and (in bad cases), editing the .emacs.desktop file to omit the problematic buffers.

I'm running GNU Emacs 28.2 on macOS 13.4.1.

1
  • 1
    Send in a bug report (M-x report-emacs-bug), attaching the file (somehow - maybe as a link if it is really big) that caused the problem. How big is the file? How much memory do you have on your system?
    – NickD
    Jul 7, 2023 at 19:47

1 Answer 1

1

You can try multiple C-g. Better yet, you can try ESC ESC ESC. And you can try C-]. And if Emacs is somewhat responsive you might be able to use M-x top-level, to exit all recursive edits.

See the Emacs manual, node Quitting and Aborting.

But if those attempts don't help then you need to kill the Emacs process, I believe. You do that from outside Emacs (using a shell command such as kill or a tool such as the MS Windows Task Manager).

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.