# Emacs AUCTeX & TL 2018 - Problems with non ASCII characters in the file name

My recent update to TeX Live 2018 has led to a curious problem. I can no longer compile files whose names have non ASCII characters with Emacs + AUCTeX.

That is curious because nothing on the side of Emacs has changed. I'm using Emacs from the OS's repositories (namely Linux Mint 18.3 and Emacs version 24.5.1) and AUCTeX is installed through ELPA (that is with M-x package-install from within Emacs, namely version 12.1.1).

But, what works fine with TeX Live 2017, no longer works with TeX Live 2018.

Take a file named primárias.tex with contents:

\documentclass{article}

\begin{document}
Hello World!!
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:


(The content is not relevant, the file name is).

This produces me the error:

ERROR: I can't find file prim'.

Everything works fine with TeXworks, TeXstudio or with compilation through the command line.

Any ideas of what might be going wrong or how to fix it?

• I'm just looking for the auctex variable but you want to do latex \\input \\detokenize{primárias.tex}  not latex \\input primárias.tex  – David Carlisle May 3 '18 at 14:20
• @DavidCarlisle, thank you for your comment. But, as far as I know, I'm using defaults for compilation. So I'm counting on Emacs to do its magic. Which means I'm not instructing it to latex \\input primárias.tex (at least not explicitly). – gusbrs May 3 '18 at 14:28
• auctex uses that form (rather than latex primárias.tex and (today at least) that doesn't work with the 2018-04-01 release as the new default UTF-8 code confuses it. – David Carlisle May 3 '18 at 14:30
• @DavidCarlisle Is this a temporary problem, or means a permanent change? In the later case, should this be reported to AUCTeX? And, in either case, how could I instruct AUCTeX do get things right in the meantime? – gusbrs May 3 '18 at 14:33
• @DavidCarlisle Ok, please let me know when you do. And thank you so far! – gusbrs May 3 '18 at 14:35

We (for some definition of "we") will sort something out, but for now you can customize the latex command as follows (thanks jfbu)

customize TeX-command-list to contain

("LaTeX" "%%l%(mode)%' \\\\detokenize{%t}" TeX-run-TeX nil
(latex-mode doctex-mode) :help "Run LaTeX")


Recipe for customizing the variable: C-h v TeX-command-list then click on customize then in customization buffer find the LaTeX entry and replace there %t by \\detokenize{%t} then either Apply or Apply and Save for it to become permanent across sessions.

• it would be better to add \detokenize{...} rather than \UseRawInputEncoding but it seems my emacs lisp is getting rusty and that defeated me – David Carlisle May 3 '18 at 15:49
• or perhaps intervene at level of ("%t" file t t) in TeX-expand-list-builtin but that's more for teh AUCTeX folks to do. – user4686 May 3 '18 at 16:11
• @jfbu that's what I thought I tried first but i messed up somewhere, if there is a version along those lines that works, could you post an answer or edit this one, i don't really want to tell people to edit the variable as above. – David Carlisle May 3 '18 at 16:12
• @giordano I have pinged David to warn him of this – David Carlisle May 3 '18 at 16:18
• @gusbrs yes see latex news 28 that ships with the latex release – David Carlisle May 3 '18 at 16:23