I would approach this a few ways:
First, you'll want to identify if the problem reproduces in vanilla (i.e. non-configured, no Prelude) Emacs, or with your configurations. As Drew mentioned above, use emacs -Q
to launch Emacs without any extra init.el
configuration. If it does not reproduce here, then you're looking for a problem with a package or custom code you load in your configuration.
Second, if there is an actual error happening that you're then canceling with C-g
, you can enable debugging with M-x toggle-debug-on-error
. If it gives you a stack trace when it next hangs, you can use it to identify the cause.
Third, if it's not an error, it might just be really slow and need to be profiled. Use M-x profiler-start
, probably choose just the CPU report, reproduce your problem, and then use M-x profiler-report
. Your hang is probably occurring in the code path using the most CPU. Here is the Emacs documentation on profiling.
Fourth, and this is the longest shot, you could try compiling from the emacs-25
branch instead of the emacs-25.1
tag. This is something I would probably try, but is not very likely to solve your issue. However, if the bug is within Emacs, knowing that it reproduces on the latest code is useful. If you become certain the bug was introduced by changes to the Emacs source code, and you know a version where it did not reproduce, you can use git bisect
and recompile a few times to identify the problem commit. I do not recommend this unless you are 95 percent confident it's a bug in Emacs without any configurations (emacs -Q
).
Options->Enter Debugger on Quit
. There should be a debugger buffer with a backtrace on the next quit you trigger in your auctex-buffer. If you do not know what to do with the backtrace add it to your question above. I think somebody will have a hint where to look next. – Tobias Oct 28 '16 at 16:04emacs -Q
? 3. If you don't see the problem without your init file, recursively bisect the file (usecomment-region'), to find the problem. If you do see the problem with
emacs -Q` then please post a reproducible recipe (fromemacs -Q
) here or toM-x report-emacs-bug
. (The latter is where bugs get fixed, not here. But posting here might get you some helpful info.) – Drew Oct 28 '16 at 17:03(setq garbage-collection-messages t)
in your init and seeing if you see garbage collection messages in your Messages buffer. – Stuart Hickinbottom Oct 29 '16 at 9:23*Messages*
. Also, any clue why this happens with Emacs 25.1 and Windows combination? – legends2k Feb 17 '17 at 6:28