François Pinard <pin...@iro.umontreal.ca> wrote: > In org-latex.el, function org-export-as-pdf is said to "automatically > add -shell-escape when needed", and apparently it does. >
Well, that's what it says, but the "when needed" part is not true: org-export-as-pdf only deals with minted, but there are other packages that need the shell escape option to be added to the pdflatex command. If you \usepackage{auto-pst-pdf} e.g., you'd need the shell escape but org-export-as-pdf would not automatically add it. > The org-export-latex-listings variable says: "In addition, it is > necessary to install pygments (http://pygments.org), and to configure > the variable `org-latex-to-pdf-process' so that the -shell-escape option > is passed to pdflatex." > Maybe it should be fixed to say that if you use minted, then org will add the shell escape option automatically. > The last part of this statement is likely superfluous because of > org-export-as-pdf, isn't it? If yes, let me suggest it is removed, so > we are relieved from configuring the edition of org-latex-to-pdf-process > in our ~/.emacs files. > > If I remove that edition and leave org-latex-to-pdf-process in ~/.emacs, > command "C-c C-e d" still gives a fontified, colored source code in the > genrated PDF. > Personally, I'd rather have it in my face that I'm doing something that could be a security problem, than have org do it behind my back: if I choose to override the default, it should be my decision (and the consequences would then be my responsibility). So I'd advocate getting rid of the automatic shell-escape and beef up the documentation instead. But I'm probably in a tiny minority here. Nick PS. The relevant commit is 3ed5915f01ac5647db5f2204dc695519653b1190 and there is probably discussion on the ML about it, but I haven't gone back to review it.