auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] LaTeX-command-style ignored for certain document filenames


From: Jin Choi
Subject: [AUCTeX] LaTeX-command-style ignored for certain document filenames
Date: Sun, 7 Sep 2008 02:23:40 -0400

I came across an annoying behavior trying to use LaTeX-command-style to specify the use of xelatex properly. I have it set to
'(("\\`fontspec\\'" "xelatex") ("" "%(PDF)%(latex) %S%(PDFout)"))
which should specify that xelatex be used whenever "\usepackage{fontspec}" occurs. This works... usually. For certain files, it decides it just wants to use plain latex.

I tracked down the problem to line 1896 of tex.el:

    (if (and TeX-parse-self
             (null (cdr-safe (assoc (TeX-strip-extension nil nil t)
                                    TeX-style-hook-list))))
        (TeX-auto-apply))

This only parses the current file if the name of the file does not appear in TeX-style-hook-list. This caused problems for me when I named my document files things like "article.tex" or "letter.tex", where the base filenames existed in TeX-style-hook-list.

I don't see why this is helpful. I think the current file should always be parsed if TeX-parse-self is true. If you are actually editing the article.sty or letter.sty style files, I don't think it would be useful to have the hooks for those styles run since they are presumably intended to set things up for documents written using those styles.

I think this should be just (if TeX-parse-self (TeX-auto-apply)). Please let me know if I'm mistaken.

-Jin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]