I am using the minted package, which requires option -shell-escape to be handed over to the processor. I use XeLateX as my processor. I updated AUCTeX using ELPA in emacs 24.3.1; AUCTeX is now version 11.88. According to this question, I can simply set the local variable TeX-command-extra-options to "-shell-escape". However, when I do this, and do C-c C-c (which is starting LaTeX), I still get the same error:
Package ifplatform Warning:
shell escape is disabled, so I can only detect \ifwindows.
))
! Package minted Error: You must invoke LaTeX with the -shell-escape flag.
See the minted package documentation for explanation.
Type H <return> for immediate help.
...
l.32
What am I doing wrong? I've set the variable both by putting
%%% TeX-command-extra-options: "-shell-escape"
in my .tex source and by doing M-x set-variable by hand in the buffer. Both lead to the same result.
LaTeX-command-style? Have you ever changed it? – giordano Nov 11 '14 at 19:58LaTeX-command-style is a variable defined intex.el'. Its value is (("" "%(PDF)%(latex) %(extraopts) %S%(PDFout)"))` – user2108497 Nov 11 '14 at 21:31%(extraopts)expander is there. Then, after adding the file local setting ofTeX-command-extra-optionsyou should revert the buffer (M-x revert-buffer RET) or reset AUCTeX (C-c C-n), and you'll be asked whetherTeX-command-extra-optionsis to be considered safe or not (it isn't safe by default because enabling shell escape is not safe), did you do such steps? – giordano Nov 12 '14 at 00:08M-x revert-buffer RET) and resetting AUCTeX, but I was not asked whetherTeX-command-extra-optionsis to be considered safe, and it still does not pass the extra options, as revealed in the first line of the output buffer,RunningXeLaTeX' onproposal' with ``xelatex -interaction=nonstopmode "\input" proposal.tex''– user2108497 Nov 12 '14 at 00:37TeX-command-extra-options:M-: (TeX-command-expand (nth 1 (assoc "LaTeX" TeX-command-list)) 'TeX-master-file) RET, what do you get? Note that theTeX-command-extra-optionsvariable should be in all the file of the project. – giordano Nov 12 '14 at 13:43"pdflatex -interaction=nonstopmode \"\\input\" proposal.tex"Thank you for all of your help so far! – user2108497 Nov 12 '14 at 18:05TeX-command-extra-optionssafe). I'm trying to figure out what's wrong with your system. These are the last tests I can think of: in the LaTeX buffer issueM-: (apply (cadr (assoc "%l" TeX-expand-list)) nil) RET, this should return the value ofLaTeX-command-style. If so, check the value ofTeX-expand-list, there should be a("%(extraopts)" (lambda nil TeX-command-extra-options))entry. Then check the value ofTeX-command-extra-optionsin that buffer, it should be"-shell-escape". – giordano Nov 12 '14 at 21:53