I use org-mode with emacs heavily. On LINUX, everything is great.

When I have to use windows emacs regularly freezes and I have to kill via task manager and restart.

Any suggestions on how I can debug this? Or better yet how to stop it?


  • I had the same trouble, until it occured to me that I had enabled automagical safe to disk of my file every two seconds after I stop typing and the file was aboaut 800 k of text. So you need to provide much more information, what you load in your .emacs file and if the freeze also happens if you start emacs with "-Q" and so on. Which Windows version, by the way? Which emacs? Where did you get the latter from? – Keks Dose Nov 11 '16 at 8:40
  • 1
    I also routinely need to kill my Emacs process (emacs 25, 26, 27...) on Windows, and have not figured out a way to get a reasonable dump or log that I could investigate or submit with a bug report. It generally goes into a busy wait and never returns, but I cannot reproduce intentionally. Posting here in hopes someone has some more ideas on how to collect more info... – glucas Apr 18 '19 at 13:20

Have you tried using (setq debug-on-error t) on your init.el. Or even M-x toggle-debug-on-error.

Also, if I'm not mistaken you can start emacs with the flag --debug-init.

Maybe one of those options with help you understand whats going on. There are a log of problems that at first glance don't seem to cause problems... till they do.

Also you could disabled packages that you might not need at the moment, to help you increase the changes of finding the problem.

  • Thanks. I know about those but they are not helpful as the problem is that emacs totally freezes so debug-on-error or things like that will not help. – oxer Apr 19 '19 at 16:11

Is it possible you have a really long line?

See How do I prevent extremely long lines making Emacs slow?

I was running org mode with executable source code via babel and one of the default results type puts all the results on one huge line and my emacs was unresponsive to C-g or ESC to the extent I was always killing the process.

C-x = (what-cursor-position) says column=386996

Emacs 27 now has so-long-mode included by default. Turning that one instantly showed me the problem.

You can enable that globally via (global-so-long-mode 1) (see So Long docs).

This will drop you out of the major mode into so-long-mode giving you a chance to fix the long lines before switching back to the the original mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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