Starting from Omar's answer I've put together an interactive
function, dump-auctex-globals, that writes to the standard user's
Emacs directory a (very simple) Emacs Lisp file that sets the two
(defun dump-auctex-globals ()
"Write global LaTeX class and TeX input files to auctex-globals.el."
(let ((filename (expand-file-...
Thank you for asking this question! This has been bothering me for a
long time, but I never did anything about it until your question gave
me a little extra motivation.
Turns out it's pretty simple to make the cache by hand. You just need
to arrange to assign values to two variables after AUCTeX is loaded:
(setq LaTeX-global-class-files '("List of document ...
In case someone else runs into this, I had enabled TeX-auto-save, which saves settings to an auto/ directory and loads them when a file is revisited.
I use xdotool to shift focus back to Emacs after Tex-command-run-all. Works on an X system (Linux/Unix) with xdotool installed. I use Okular as pdf-viewer and the following settings:
(setq TeX-view-program-selection '((output-pdf "Okular")))
'(("Okular" "emacswinno=`xdotool getwindowfocus` \; okular --unique %o\#src:%n`pwd`/./%...