1

This question already has an answer here:

I've managed to write a timer that reliably causes keyboard input not to be accepted until I press Ctrl-G.

The issue is, I don't know what causes the timer to lock up, what the stack frame is when it's locked up, or how to unlock it.

  • (signal 'quit) resolves the issue but this isn't a reasonable fix.
  • Using gdb doesn't point to a function which is blocking input.
  • toggle-debug-on-quit doesn't give a useful stack trace.

In Python I can press Ctrl-C to get a stack trace of the code being executed. Why doesn't Emacs let me interrupt my timer's code with C-g?

marked as duplicate by Gilles May 29 at 17:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • What do you mean by "(signal 'quit) resolves the issue"? How/when can your code decide to call (signal 'quit)? – Stefan May 29 at 18:11
  • 1
    timer code always runs with inhibit-quit bound to a non-nil value (so that it doesn't get accidentally aborted just because the user hit C-g at that moment for some completely unrelated reason (e.g. to get out of a minibuffer)). – Stefan May 29 at 18:13
  • Have you tried sending SIGUSR2 to Emacs? – DoMiNeLa10 May 30 at 12:27
1

Maybe toggle-debug-on-quit will help.

Toggle whether to enter Lisp debugger when C-g is pressed.

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