After a fresh install of Emacs (GNU Emacs 25.1.1 (i686-w64-mingw32) of 2016-09-18) and AUCTeX (last version from ELPA) on Windows Vista, when I open a TeX file, Emacs takes an extremely long time to load the file (>2minutes). In the minibuffer I see a message telling Applying style hooks...; the delay starts exactly when I see this message. After this delay, when I open the message buffer I see something like this:

Applying style hooks...
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/geometry.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/amssymb.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/amsmath.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/amstext.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/amsbsy.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/amsopn.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/amsthm.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/pdfsync.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/epigraph.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/multicol.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/makeidx.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/fancyhdr.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/footmisc.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/relsize.elc...done
Loading c:/Users/user/.emacs.d/elpa/auctex-11.89.7/style/bm.elc...done
Applying style hooks... done

(Incidentally, the base names of the *.elc files are the names the packages I use in my TeX file).

With Emacs 24.5 I didn't have this problem.

Any idea how to solve this issue? How to disable the loading of these style hooks?

If I open an empty TeX file, this delay is significantly reduced. If I run emacs without my init file, this delay disappears.

Edit: Thank you for your comments. After your suggestions, I bisected my init file and I localized the code responsible for this delay. That was (setq TeX-parse-self t).

  • 1
    Loading the style hooks is normal. Emacs 24.5 did it too. What version of Windows are you using? Do you have the same problem with other Emacs 25.1 binaries? What is Emacs doing — at least you could open *Messages* before opening the TeX file and see whether the delay is before or after loading the style hooks. Do you have any problems with an empty .tex file? With a non-TeX file? Can you reproduce the problem if you rename your init file so that Emacs doesn't load it? – Gilles Dec 12 '16 at 21:31
  • 3
    "If I run emacs without my init file, this delay disappears" then nobody will be able to help you unless you post a minimal init file that reproduces the problem. – giordano Dec 13 '16 at 7:09
  • 1
    Please see emacs.stackexchange.com/questions/28429/… – Tyler Dec 13 '16 at 13:27
  • 1
    Also, make sure you are using the latest version built for Emacs, a it seems it wasn't compiled with the correct flags originally – lists.gnu.org/archive/html/emacs-devel/2016-11/msg00450.html – Sébastien Le Callonnec Dec 13 '16 at 21:17
  • Do you experience these long parsing times for every documents or just for one in particular? In the latter case, can you provide a minimal LaTeX document that causes long parsing? I've never experienced parsing times longer than one second, what you're reporting looks very strange and could be important to be fixed, if you can help us finding the culprit. – giordano Dec 14 '16 at 0:45

Your Answer

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

Browse other questions tagged or ask your own question.