10

I installed the auctex and emacs packages on two Xubuntu 14.04 computers, both of which have been working fine. Emacs itself works fine on both, but now with the auctex package installed, when I load a TeX file (even just an empty one) I have a six second loading time for auctex, which I have to go through every time I load a TeX file.

Is this normal?

If not, what can I do to reduce this time?

I've searched the internet and nothing has turned up, only the fact that file parsing might take a long time, but it doesn't as I've enabled the feature to save and load parse files.

I am using Emacs 24 with AUCTeX 11.87

EDIT: The output of the *messages* buffer looks like this for a newly opened TeX file:

("emacs" "hi.tex")
Loading 00debian-vars...done
Loading /etc/emacs/site-start.d/50auctex.el (source)...
Loading /usr/share/emacs/site-lisp/auctex.el (source)...done
Loading /usr/share/emacs/site-lisp/preview-latex.el (source)...done
Loading /etc/emacs/site-start.d/50auctex.el (source)...done
Loading /etc/emacs/site-start.d/50autoconf.el (source)...done
Loading /etc/emacs/site-start.d/50cmake-data.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Error while loading 50dictionaries-common: Symbol's value as variable is void: debian-aspell-only-dictionary-alist
Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...
Loading cjk-enc...done
Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...done
Loading /etc/emacs/site-start.d/50latex-cjk-thai.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
(New file)
Applying style hooks... done
exchange-point-and-mark: No mark set in this buffer [6 times]
exchange-point-and-mark: No mark set in this buffer

  • Could you check the *Messages* buffer and post if there are any messages during the process? Another option is to M-x toggle-debug-on-quit RET, and while Emacs is taking its sweet time, hit C-g. Then post the stack trace you get. – Alan Shutko Jun 25 '14 at 19:57
  • This might come in handy too: DOtemacs ProfilEr - A per-sexp-evaltime profiler: github.com/emacsmirror/dope. I vaguely recall using it years ago to profile my config when having similar AUCTeX / loading time related issues. Take your config down to a minimum (shotgun debugging style) and see if there is any change. You may also want to take a look at some of the info here: emacswiki.org/emacs/OptimizingEmacsStartup such as ex: using autoload (AutoLoad) and eval-after-load (EvalAfterLoad), byte-compile files and so on. – Criveti Mihai Dec 4 '15 at 1:30
0

LaTeX/P is LaTeX mode under the PDF minor mode. I've never had an issue with AUCTeX (and I've used it since emacs v22), so I really don't think AUCTeX in se is your issue.

When you start emacs with -q, it doesn't load any initialization files. See the documentation for more info on that.

If you're using linux, I would try re-installing emacs from source. I've never trusted the package repos to actually work. (Most of that mistrust comes from the TeX packages being over four years old.) If you're using windoze, install from the FSF's ftp server. If you're using mac, install from emacsformacosx.com

0

The general way to debug problems with slow startup is to use emacs' interrupt signals (https://emacs.stackexchange.com/questions/506/debugging-a-frozen-emacs)

  1. Run emacs --debug-init
  2. Find the pid of the process with ps -ef | grep emacs
  3. Send the process an interrupt signal kill -SIGUSR2 $PID
  4. This causes emacs to show a backtrace
  5. Search the internet for anything obvious in this traceback
  6. Otherwise start experimentign with running some of these functions manually to see why they are slow.

You might also be interested in the emacs stackexchange. (I'm not sure what I think about some of the stackexchange fragmentation myself...)

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.