I am in js-mode. The screenshot shows where I typed the = and emacs is completely frozen. No C-g, Esc, or q does anything. I have no idea how to even start debugging this.


  • 1
    Try a triple <ESC>. Also edit your question and add the result of running the following command in a terminal: ps -C emacs -o f,s,uid,pid,ppid,tid,c,pri,ni,vsz,sz,rss,addr,wchan,stat,tty,time,cmd (assuming you are running on Linux - you might have to modify the command slightly on other Unixes; see the ps(1) man page - I don't know what to do on Windows). You can also try strace -p <PID> where <PID> is the process id of the Emacs process: see the pid column of the ps command. Move the mouse over the Emacs frame and see if strace produces any additional output ...
    – NickD
    Dec 29, 2022 at 14:58
  • 1
    It normally does a poll and blocks on pselect until some event happens and then there should a flurry of activity for a bit and then another poll will happen and the pselect will block until the next event. But if you move the mouse over the Emacs frame, and nothing happens in the strace output, then it is well and truly hung. You might want to edit your question and add the last few lines of the strace output as well, although it might be not useful: if the strace is started after the hang, the only thing that will appear is the last system call Emacs did - maybe...
    – NickD
    Dec 29, 2022 at 15:04
  • If a syntax highlighting rule, for some reasons, loops forever it could cause Emacs to hang. Try disabling font-lock before you type the = character. If Emacs doesn't hang then we can narrow down the search to the font-lock rules. I can provide some guidance on how to do this. Dec 30, 2022 at 10:14


Your Answer

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

Browse other questions tagged or ask your own question.