0

I am using emacs 29.2 (installed via brew) and auctex (14.04) on a Mac (12.7.4). My .emacs file shows: '(enable-local-variables :t)

I have the following at the end of a TeX file:

%%% Local Variables: 
%%% coding: utf-8
%%% mode: latex
%%% TeX-engine: luatex
%%% TeX-command-extra-options: "-shell-escape"
%%% TeX-master: t
%%% End: 

but nothing changes -- the file is compiled with the default engine, XeLaTeX. Also tried the first-line form:

%% -*- coding: utf-8;mode: latex;TeX-engine: luatex;TeX-command-extra-options: "-shell-escape";TeX-master: t; -*-

to no effect.

I initiate a TeX run with C-c C-a. This worked with non-brew emacs in the past, but I've clearly missed something.

11
  • Local variables are only read when you open the file: kill the buffer and open it again - or run M-x normal-mode.
    – NickD
    Commented Mar 20 at 16:26
  • 1
    @sgmoye - Do you really have '(enable-local-variables :t) in your init file, i.e., a colon before t as :t or is it a typo? Commented Mar 20 at 20:16
  • 1
    Besides, I think is something is cheesy because AUCTeX starts xelatex which is not the default compiler. Can you please try to start Emacs as emacs -Q, then in *scratch* buffer, eval the following (progn (setq debug-on-error t) (package-initialize t) (package-activate 'auctex)) (i.e., set the cursor after the last ) and hit C-x C-e) and then open your .tex file and try it again? Also do M-x list-load-path-shadows RET to check you don't have any other AUCTeX installation/files sitting on your HD. Commented Mar 20 at 20:21
  • 1
    What was the offending line?
    – NickD
    Commented Mar 21 at 11:01
  • 1
    @sgmoye - Please try the recipe I provided with emacs -Q upthread and see if your .tex file works as expected. Commented Mar 22 at 12:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.