GNU bug report logs - #25276
11.89.8; xetex engine not work when master filename contains space

Previous Next

Package: auctex;

Reported by: Qiang Yin <yinqiang.sjtu <at> gmail.com>

Date: Mon, 26 Dec 2016 15:35:02 UTC

Severity: normal

Found in version 11.89.8

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25276 in the body.
You can then email your comments to 25276 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-auctex <at> gnu.org:
bug#25276; Package auctex. (Mon, 26 Dec 2016 15:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Qiang Yin <yinqiang.sjtu <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-auctex <at> gnu.org. (Mon, 26 Dec 2016 15:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Qiang Yin <yinqiang.sjtu <at> gmail.com>
To: bug-auctex <at> gnu.org
Subject: 11.89.8; xetex engine not work when master filename contains space
Date: Mon, 26 Dec 2016 23:34:39 +0800
[Message part 1 (text/plain, inline)]
Hi,
I prefer xetex as my default tex engine. But this will cause a AucTeX
bug when the master filename contains a space.

The following is a minimal example. It contains only one master file "foo
bar.tex". Notice the filename contains a space. And the content of "foo
bar.tex" is just the following:

\documentclass{article}
\begin{document}
Hello world
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% TeX-engine: xetex
%%% End:

Now if press C-c C-c to compile this file. AucTeX will return the
following error message:

Running `LaTeX' on `foo bar' with ``xelatex  -file-line-error  --synctex=1
-interaction=nonstopmode "\input" ^"\^"foo bar.tex\^"^"''
This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016/W32TeX)
(preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
! I can't find file `'"foo bar.tex"''.
<*> \input '"foo bar.tex"'

(Press Enter to retry, or Control-Z to exit)
Please type another input file name
! Emergency stop.
<*> \input '"foo bar.tex"'

If I switch my tex engine to pdflatex, then this problem will
gone. Moreover, if run the following command in a terminal

  xelatex --file-line-error --synctex=1 -interaction=nonstopmode "\input"
"foo bar.tex"

Then it also works well. So I assume this is a AucTeX bug.

Best,
Qiang


Emacs  : GNU Emacs 25.1.1 (x86_64-w64-mingw32)
 of 2016-09-18
Package: 11.89.8

current state:
==============
(setq
 AUCTeX-date "2016-12-22"
 window-system 'w32
 LaTeX-version "2e"
 TeX-style-path '("~/.emacs.d/auctex"
                  "d:/Home/.emacs.d/elpa/auctex-11.89.8/style"
                  "d:/Home/.emacs.d/auctex/auto"
                  "d:/Home/.emacs.d/auctex/style" "auto" "style")
 TeX-auto-save t
 TeX-parse-self t
 TeX-master t
 TeX-command-list '(("TeX"
                     "%(PDF)%(tex) %(file-line-error) %(extraopts)
%`%S%(PDFout)%(mode)%' %t"
                     TeX-run-TeX nil
                     (plain-tex-mode ams-tex-mode texinfo-mode) :help
                     "Run plain TeX")
                    ("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil
                     (latex-mode doctex-mode) :help "Run LaTeX")
                    ("Makeinfo" "makeinfo %(extraopts) %t" TeX-run-compile
                     nil (texinfo-mode) :help
                     "Run Makeinfo with Info output")
                    ("Makeinfo HTML" "makeinfo %(extraopts) --html %t"
                     TeX-run-compile nil (texinfo-mode) :help
                     "Run Makeinfo with HTML output")
                    ("AmSTeX"
                     "amstex %(PDFout) %(extraopts) %`%S%(mode)%' %t"
                     TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX")
                    ("ConTeXt"
                     "%(cntxcom) --once --texutil %(extraopts)
%(execopts)%t"
                     TeX-run-TeX nil (context-mode) :help
                     "Run ConTeXt once")
                    ("ConTeXt Full" "%(cntxcom) %(extraopts) %(execopts)%t"
                     TeX-run-TeX nil (context-mode) :help
                     "Run ConTeXt until completion")
                    ("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help
                     "Run BibTeX")
                    ("Biber" "biber %s" TeX-run-Biber nil t :help
                     "Run Biber")
                    ("View" "%V" TeX-run-discard-or-function t t :help
                     "Run Viewer")
                    ("Print" "%p" TeX-run-command t t :help
                     "Print the file")
                    ("Queue" "%q" TeX-run-background nil t :help
                     "View the printer queue" :visible TeX-queue-command)
                    ("File" "%(o?)dvips %d -o %f " TeX-run-dvips t t :help
                     "Generate PostScript file")
                    ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil t
                     :help "Convert DVI file to PostScript")
                    ("Dvipdfmx" "dvipdfmx %d" TeX-run-dvipdfmx nil t :help
                     "Convert DVI file to PDF with dvipdfmx")
                    ("Ps2pdf" "ps2pdf %f" TeX-run-ps2pdf nil t :help
                     "Convert PostScript file to PDF")
                    ("Index" "makeindex %s" TeX-run-index nil t :help
                     "Run makeindex to create index file")
                    ("Xindy" "texindy %s" TeX-run-command nil t :help
                     "Run xindy to create index file")
                    ("Check" "lacheck %s" TeX-run-compile nil (latex-mode)
                     :help "Check LaTeX file for correctness")
                    ("ChkTeX" "chktex -v6 %s" TeX-run-compile nil
                     (latex-mode) :help
                     "Check LaTeX file for common mistakes")
                    ("Spell" "(TeX-ispell-document \"\")" TeX-run-function
                     nil t :help "Spell-check the document")
                    ("Clean" "TeX-clean" TeX-run-function nil t :help
                     "Delete generated intermediate files")
                    ("Clean All" "(TeX-clean t)" TeX-run-function nil t
                     :help "Delete generated intermediate and output files")
                    ("Other" "" TeX-run-command t t :help
                     "Run an arbitrary command")
                    )
 )
[Message part 2 (text/html, inline)]

Information forwarded to bug-auctex <at> gnu.org:
bug#25276; Package auctex. (Mon, 26 Dec 2016 16:27:01 GMT) Full text and rfc822 format available.

Message #8 received at 25276 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Qiang Yin <yinqiang.sjtu <at> gmail.com>
Cc: 25276 <at> debbugs.gnu.org
Subject: Re: bug#25276: 11.89.8; xetex engine not work when master filename
 contains space
Date: Mon, 26 Dec 2016 17:25:39 +0100
Hi Qiang,

2016-12-26 16:34 GMT+01:00 Qiang Yin <yinqiang.sjtu <at> gmail.com>:
> Hi,
> I prefer xetex as my default tex engine. But this will cause a AucTeX
> bug when the master filename contains a space.
>
> The following is a minimal example. It contains only one master file "foo
> bar.tex". Notice the filename contains a space. And the content of "foo
> bar.tex" is just the following:
>
> \documentclass{article}
> \begin{document}
> Hello world
> \end{document}
> %%% Local Variables:
> %%% mode: latex
> %%% TeX-master: t
> %%% TeX-engine: xetex
> %%% End:
>
> Now if press C-c C-c to compile this file. AucTeX will return the
> following error message:
>
> Running `LaTeX' on `foo bar' with ``xelatex  -file-line-error  --synctex=1
> -interaction=nonstopmode "\input" ^"\^"foo bar.tex\^"^"''
> This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016/W32TeX)
> (preloaded format=xelatex)
>  restricted \write18 enabled.
> entering extended mode
> LaTeX2e <2016/03/31> patch level 3
> Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
> ! I can't find file `'"foo bar.tex"''.
> <*> \input '"foo bar.tex"'
>
> (Press Enter to retry, or Control-Z to exit)
> Please type another input file name
> ! Emergency stop.
> <*> \input '"foo bar.tex"'

I cannot reproduce this on GNU/Linux:

--8<---------------cut here---------------start------------->8---
Running `LaTeX' on `foo bar' with ``xelatex  -file-line-error
--synctex=1 -interaction=nonstopmode "\input" \"foo\ bar.tex\"''
This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016)
(preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(./foo bar.tex (/opt/texlive/2016/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/opt/texlive/2016/texmf-dist/tex/latex/base/size10.clo))
No file "foo bar".aux.
[1] (./foo bar.aux) )
Output written on foo bar.pdf (1 page).
SyncTeX written on foo bar.synctex.gz.
Transcript written on foo bar.log.

TeX Output finished at Mon Dec 26 17:11:20
--8<---------------cut here---------------end--------------->8---

I see that you're running Emacs on Windows, maybe there is something
special to be taken care of on that system.  I find it strange that
you experience this problem only with one engine: I didn't check it,
but I thought that the expansion of file name doesn't depend on the
selected engine.

I'll try to have a look, but not using Windows, it's difficult for me.
If someone else comes up with a solution, please chime in.

Bye,
Mosè




Information forwarded to bug-auctex <at> gnu.org:
bug#25276; Package auctex. (Mon, 26 Dec 2016 17:29:01 GMT) Full text and rfc822 format available.

Message #11 received at 25276 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Qiang Yin <yinqiang.sjtu <at> gmail.com>
Cc: 25276 <at> debbugs.gnu.org
Subject: Re: bug#25276: 11.89.8; xetex engine not work when master filename
 contains space
Date: Mon, 26 Dec 2016 18:27:24 +0100
Qiang or anybody using Windows,

can you please tell me what

    M-: (shell-quote-argument (TeX-master-file)) RET

returns in a your "foo bar.tex" buffer?  And what in a file's buffer
without spaces in its name?  This is, more or less, the command used
in `TeX-command-expand' to build the compilation command.

Thank you,
Mosè

2016-12-26 17:25 GMT+01:00 Mosè Giordano <mose <at> gnu.org>:
> Hi Qiang,
>
> 2016-12-26 16:34 GMT+01:00 Qiang Yin <yinqiang.sjtu <at> gmail.com>:
>> Hi,
>> I prefer xetex as my default tex engine. But this will cause a AucTeX
>> bug when the master filename contains a space.
>>
>> The following is a minimal example. It contains only one master file "foo
>> bar.tex". Notice the filename contains a space. And the content of "foo
>> bar.tex" is just the following:
>>
>> \documentclass{article}
>> \begin{document}
>> Hello world
>> \end{document}
>> %%% Local Variables:
>> %%% mode: latex
>> %%% TeX-master: t
>> %%% TeX-engine: xetex
>> %%% End:
>>
>> Now if press C-c C-c to compile this file. AucTeX will return the
>> following error message:
>>
>> Running `LaTeX' on `foo bar' with ``xelatex  -file-line-error  --synctex=1
>> -interaction=nonstopmode "\input" ^"\^"foo bar.tex\^"^"''
>> This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016/W32TeX)
>> (preloaded format=xelatex)
>>  restricted \write18 enabled.
>> entering extended mode
>> LaTeX2e <2016/03/31> patch level 3
>> Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
>> ! I can't find file `'"foo bar.tex"''.
>> <*> \input '"foo bar.tex"'
>>
>> (Press Enter to retry, or Control-Z to exit)
>> Please type another input file name
>> ! Emergency stop.
>> <*> \input '"foo bar.tex"'
>
> I cannot reproduce this on GNU/Linux:
>
> --8<---------------cut here---------------start------------->8---
> Running `LaTeX' on `foo bar' with ``xelatex  -file-line-error
> --synctex=1 -interaction=nonstopmode "\input" \"foo\ bar.tex\"''
> This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016)
> (preloaded format=xelatex)
>  restricted \write18 enabled.
> entering extended mode
> LaTeX2e <2016/03/31> patch level 3
> Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
> (./foo bar.tex (/opt/texlive/2016/texmf-dist/tex/latex/base/article.cls
> Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
> (/opt/texlive/2016/texmf-dist/tex/latex/base/size10.clo))
> No file "foo bar".aux.
> [1] (./foo bar.aux) )
> Output written on foo bar.pdf (1 page).
> SyncTeX written on foo bar.synctex.gz.
> Transcript written on foo bar.log.
>
> TeX Output finished at Mon Dec 26 17:11:20
> --8<---------------cut here---------------end--------------->8---
>
> I see that you're running Emacs on Windows, maybe there is something
> special to be taken care of on that system.  I find it strange that
> you experience this problem only with one engine: I didn't check it,
> but I thought that the expansion of file name doesn't depend on the
> selected engine.
>
> I'll try to have a look, but not using Windows, it's difficult for me.
> If someone else comes up with a solution, please chime in.
>
> Bye,
> Mosè




Information forwarded to bug-auctex <at> gnu.org:
bug#25276; Package auctex. (Mon, 26 Dec 2016 18:06:01 GMT) Full text and rfc822 format available.

Message #14 received at 25276 <at> debbugs.gnu.org (full text, mbox):

From: Qiang Yin <yinqiang.sjtu <at> gmail.com>
To: Mosè Giordano <mose <at> gnu.org>
Cc: 25276 <at> debbugs.gnu.org
Subject: Re: bug#25276: 11.89.8; xetex engine not work when master filename
 contains space
Date: Tue, 27 Dec 2016 01:59:49 +0800
Hi Mosè,

1. When run on "foo bar.tex" it returns "\"foo bar\"".
2. When run on "foo.tex" it returns "\"foo\"".

Best,
Qiang

On 2016/12/27 1:27, Mosè Giordano wrote:
> Qiang or anybody using Windows,
>
> can you please tell me what
>
>     M-: (shell-quote-argument (TeX-master-file)) RET
>
> returns in a your "foo bar.tex" buffer?  And what in a file's buffer
> without spaces in its name?  This is, more or less, the command used
> in `TeX-command-expand' to build the compilation command.
>
> Thank you,
> Mosè
>
> 2016-12-26 17:25 GMT+01:00 Mosè Giordano <mose <at> gnu.org>:
>> Hi Qiang,
>>
>> 2016-12-26 16:34 GMT+01:00 Qiang Yin <yinqiang.sjtu <at> gmail.com>:
>>> Hi,
>>> I prefer xetex as my default tex engine. But this will cause a AucTeX
>>> bug when the master filename contains a space.
>>>
>>> The following is a minimal example. It contains only one master file "foo
>>> bar.tex". Notice the filename contains a space. And the content of "foo
>>> bar.tex" is just the following:
>>>
>>> \documentclass{article}
>>> \begin{document}
>>> Hello world
>>> \end{document}
>>> %%% Local Variables:
>>> %%% mode: latex
>>> %%% TeX-master: t
>>> %%% TeX-engine: xetex
>>> %%% End:
>>>
>>> Now if press C-c C-c to compile this file. AucTeX will return the
>>> following error message:
>>>
>>> Running `LaTeX' on `foo bar' with ``xelatex  -file-line-error  --synctex=1
>>> -interaction=nonstopmode "\input" ^"\^"foo bar.tex\^"^"''
>>> This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016/W32TeX)
>>> (preloaded format=xelatex)
>>>  restricted \write18 enabled.
>>> entering extended mode
>>> LaTeX2e <2016/03/31> patch level 3
>>> Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
>>> ! I can't find file `'"foo bar.tex"''.
>>> <*> \input '"foo bar.tex"'
>>>
>>> (Press Enter to retry, or Control-Z to exit)
>>> Please type another input file name
>>> ! Emergency stop.
>>> <*> \input '"foo bar.tex"'
>>
>> I cannot reproduce this on GNU/Linux:
>>
>> --8<---------------cut here---------------start------------->8---
>> Running `LaTeX' on `foo bar' with ``xelatex  -file-line-error
>> --synctex=1 -interaction=nonstopmode "\input" \"foo\ bar.tex\"''
>> This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016)
>> (preloaded format=xelatex)
>>  restricted \write18 enabled.
>> entering extended mode
>> LaTeX2e <2016/03/31> patch level 3
>> Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
>> (./foo bar.tex (/opt/texlive/2016/texmf-dist/tex/latex/base/article.cls
>> Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
>> (/opt/texlive/2016/texmf-dist/tex/latex/base/size10.clo))
>> No file "foo bar".aux.
>> [1] (./foo bar.aux) )
>> Output written on foo bar.pdf (1 page).
>> SyncTeX written on foo bar.synctex.gz.
>> Transcript written on foo bar.log.
>>
>> TeX Output finished at Mon Dec 26 17:11:20
>> --8<---------------cut here---------------end--------------->8---
>>
>> I see that you're running Emacs on Windows, maybe there is something
>> special to be taken care of on that system.  I find it strange that
>> you experience this problem only with one engine: I didn't check it,
>> but I thought that the expansion of file name doesn't depend on the
>> selected engine.
>>
>> I'll try to have a look, but not using Windows, it's difficult for me.
>> If someone else comes up with a solution, please chime in.
>>
>> Bye,
>> Mosè




Information forwarded to bug-auctex <at> gnu.org:
bug#25276; Package auctex. (Mon, 26 Dec 2016 18:18:02 GMT) Full text and rfc822 format available.

Message #17 received at 25276 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Qiang Yin <yinqiang.sjtu <at> gmail.com>
Cc: 25276 <at> debbugs.gnu.org
Subject: Re: bug#25276: 11.89.8; xetex engine not work when master filename
 contains space
Date: Mon, 26 Dec 2016 19:16:50 +0100
2016-12-26 18:59 GMT+01:00 Qiang Yin <yinqiang.sjtu <at> gmail.com>:
> Hi Mosè,
>
> 1. When run on "foo bar.tex" it returns "\"foo bar\"".
> 2. When run on "foo.tex" it returns "\"foo\"".

Thank you.  I cannot tell what's the difference and why it works in
one case but not in the other.  Sorry, I don't think I can personally
do much on this, without a Windows box.

Bye,
Mosè




Information forwarded to bug-auctex <at> gnu.org:
bug#25276; Package auctex. (Tue, 27 Dec 2016 07:53:01 GMT) Full text and rfc822 format available.

Message #20 received at 25276 <at> debbugs.gnu.org (full text, mbox):

From: Qiang Yin <yinqiang.sjtu <at> gmail.com>
To: Mosè Giordano <mose <at> gnu.org>, 25276 <at> debbugs.gnu.org
Subject: Re: bug#25276: 11.89.8; xetex engine not work when master filename
 contains space
Date: Tue, 27 Dec 2016 15:52:36 +0800
I test the example "foo bar.tex" on Debian with Emacs 24.4.

When run "M-: (shell-quote-argument (TeX-master-file)) RET" on "foo 
bar.tex",it returns "foo\\ bar";
and run the same command on "foo.tex" it returns "foo".

Cheers,
Qiang

On 2016/12/27 2:28, Qiang Yin wrote:
> Hi Mosè,
>
> Maybe it's better to use the default engine at this moment. Hope someone
> with a Windows box can reproduce the problem and locate the bug.
>
> Thank you for the help anyway :)
>
> Best,
> Qiang
>
> On 2016/12/27 2:16, Mosè Giordano wrote:
>> 2016-12-26 18:59 GMT+01:00 Qiang Yin <yinqiang.sjtu <at> gmail.com>:
>>> Hi Mosè,
>>>
>>> 1. When run on "foo bar.tex" it returns "\"foo bar\"".
>>> 2. When run on "foo.tex" it returns "\"foo\"".
>>
>> Thank you.  I cannot tell what's the difference and why it works in
>> one case but not in the other.  Sorry, I don't think I can personally
>> do much on this, without a Windows box.
>>
>> Bye,
>> Mosè
>>




Information forwarded to bug-auctex <at> gnu.org:
bug#25276; Package auctex. (Tue, 27 Dec 2016 09:31:01 GMT) Full text and rfc822 format available.

Message #23 received at 25276 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Qiang Yin <yinqiang.sjtu <at> gmail.com>
Cc: 25276 <at> debbugs.gnu.org
Subject: Re: bug#25276: 11.89.8; xetex engine not work when master filename
 contains space
Date: Tue, 27 Dec 2016 10:29:09 +0100
Hi Qiang,

2016-12-27 8:52 GMT+01:00 Qiang Yin <yinqiang.sjtu <at> gmail.com>:
>
> I test the example "foo bar.tex" on Debian with Emacs 24.4.
>
> When run "M-: (shell-quote-argument (TeX-master-file)) RET" on "foo
> bar.tex",it returns "foo\\ bar";
> and run the same command on "foo.tex" it returns "foo".

The problem is only on Windows, not other operating systems ;-)

Bye,
Mosè




Information forwarded to bug-auctex <at> gnu.org:
bug#25276; Package auctex. (Tue, 27 Dec 2016 10:40:01 GMT) Full text and rfc822 format available.

Message #26 received at 25276 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash.esbati+ml <at> gmail.com>
To: Mosè Giordano <mose <at> gnu.org>
Cc: Qiang Yin <yinqiang.sjtu <at> gmail.com>, 25276 <at> debbugs.gnu.org
Subject: Re: bug#25276: 11.89.8;
 xetex engine not work when master filename contains space
Date: Tue, 27 Dec 2016 11:39:05 +0100
Hi Mosè,

Mosè Giordano <mose <at> gnu.org> writes:

> 2016-12-26 16:34 GMT+01:00 Qiang Yin <yinqiang.sjtu <at> gmail.com>:
>> Hi,
>> I prefer xetex as my default tex engine. But this will cause a AucTeX
>> bug when the master filename contains a space.
>>
>> The following is a minimal example. It contains only one master file "foo
>> bar.tex". Notice the filename contains a space. And the content of "foo
>> bar.tex" is just the following:
>>
>> \documentclass{article}
>> \begin{document}
>> Hello world
>> \end{document}
>> %%% Local Variables:
>> %%% mode: latex
>> %%% TeX-master: t
>> %%% TeX-engine: xetex
>> %%% End:

I can reproduce this behavior on Windows.  I think the issue is an extra
pair of single quotes (see below).

>> Now if press C-c C-c to compile this file. AucTeX will return the
>> following error message:
>>
>> Running `LaTeX' on `foo bar' with ``xelatex  -file-line-error  --synctex=1
>> -interaction=nonstopmode "\input" ^"\^"foo bar.tex\^"^"''
>> This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016/W32TeX)
>> (preloaded format=xelatex)
>>  restricted \write18 enabled.
>> entering extended mode
>> LaTeX2e <2016/03/31> patch level 3
>> Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
>> ! I can't find file `'"foo bar.tex"''.
>> <*> \input '"foo bar.tex"'
>>
>> (Press Enter to retry, or Control-Z to exit)
>> Please type another input file name
>> ! Emergency stop.
>> <*> \input '"foo bar.tex"'
              ^_____________^

For reasons not clear to me, the compiler gets the file name passed in
those single quotes.  As a test, at a command prompt I can do

    xelatex -interaction=nonstopmode "\input" "foo bar.tex"

and it works, but

    xelatex -interaction=nonstopmode "\input" '"foo bar.tex"'

exits with:

    This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016/W32TeX) (preloaded format=xelatex)
     restricted \write18 enabled.
    entering extended mode
    LaTeX2e <2016/03/31> patch level 3
    Babel <3.9r> and hyphenation patterns for 67 language(s) loaded.
    ! I can't find file `'"foo bar.tex"''.
    <*> \input '"foo bar.tex"'

    (Press Enter to retry, or Control-Z to exit)
    Please type another input file name
    ! Emergency stop.
    <*> \input '"foo bar.tex"'

Does this help?

Best, Arash




Information forwarded to bug-auctex <at> gnu.org:
bug#25276; Package auctex. (Tue, 27 Dec 2016 10:52:01 GMT) Full text and rfc822 format available.

Message #29 received at 25276 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Arash Esbati <arash.esbati+ml <at> gmail.com>
Cc: Qiang Yin <yinqiang.sjtu <at> gmail.com>, 25276 <at> debbugs.gnu.org
Subject: Re: bug#25276: 11.89.8; xetex engine not work when master filename
 contains space
Date: Tue, 27 Dec 2016 11:50:25 +0100
Hi Arash,

> As a test, at a command prompt I can do
>
>     xelatex -interaction=nonstopmode "\input" "foo bar.tex"
>
> and it works, but
>
>     xelatex -interaction=nonstopmode "\input" '"foo bar.tex"'
>
> exits with:
>
>     This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016/W32TeX) (preloaded format=xelatex)
>      restricted \write18 enabled.
>     entering extended mode
>     LaTeX2e <2016/03/31> patch level 3
>     Babel <3.9r> and hyphenation patterns for 67 language(s) loaded.
>     ! I can't find file `'"foo bar.tex"''.
>     <*> \input '"foo bar.tex"'
>
>     (Press Enter to retry, or Control-Z to exit)
>     Please type another input file name
>     ! Emergency stop.
>     <*> \input '"foo bar.tex"'
>
> Does this help?
>
> Best, Arash
>

Not really, because it's seems logic to me that

    '"foo bar.tex"'

isn't the intended file name.

The problem is correctly quoting the file name on Windows.
(shell-quote-argument (TeX-master-file)) doesn't seem to do the right
thing on Windows.  I don't know the details of quoting on Windows in
general, and of Emacs on Windows in particular.  You may try poking
help-gnu-emacs or emacs-devel to get advices on this.

Bye,
Mosè




Information forwarded to bug-auctex <at> gnu.org:
bug#25276; Package auctex. (Mon, 28 May 2018 07:49:02 GMT) Full text and rfc822 format available.

Message #32 received at 25276 <at> debbugs.gnu.org (full text, mbox):

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: auctex-devel <at> gnu.org
Cc: Colin Baxter <m43cap <at> yandex.com>, 25276 <at> debbugs.gnu.org,
 jfbu <jfbu <at> free.fr>
Subject: Re: Typeset LaTeX files with non-ascii file name in TeXLive 2018
Date: Mon, 28 May 2018 16:48:36 +0900
[Message part 1 (text/plain, inline)]
Hi all,

As discussed earlier in messages separately, I made out a fix much
better than the previous proposal.  Any opinions are welcome for this
new proposal.

It keeps the ability to let the users to have their own TeX codes on the
command line while it doesn't use \input when it isn't necessary.
Therefore, the bugs
- LaTeX version banner is missing in the log file [1]
- first line parsing is not effective [2]
- file name with space doesn't typeset with w32 xelatex (Bug#25276)
disappear except when TeX codes are present on the command line.

Standard LaTeX without e-TeX extension, which exists in only very old
distribution at least for TeXLive, will no longer work in the
following cases:
- region compilation of non-ascii file name
- preview-latex (even when file name doesn't contain non-ascii chars)

I found out that the current AUCTeX has a basic functionality of such
on-demand supply of \input already implemented, but it isn't activated
accidentally by a subtle inconsistency.  It can be released by the
following tiny change:
----------------------------------------------------------------------
diff --git a/tex.el b/tex.el
--- a/tex.el
+++ b/tex.el
@@ -499,7 +499,8 @@
     ("%s" file nil t)
     ("%t" file t t)
     ("%`" (lambda nil
-	    (setq TeX-command-pos t TeX-command-text "")))
+	    (setq TeX-command-pos t TeX-command-text nil)
+	    ""))
     (" \"\\" (lambda nil
 	       (if (eq TeX-command-pos t)
 		   (setq TeX-command-pos pos
----------------------------------------------------------------------
With this change, the command line becomes
     pdflatex -someoption FILENAME
for most cases, but if some TeX codes are requested (by users' intention
through `TeX-command-extra-options' or expansion of %(PDFout) to
" \"\\pdfoutput=0 \"", or run in preview-latex), the form
     pdflatex -someoption \TeX_code \input FILENAME
is retained.

My new patches extend this functionality naturally to supply \detokenize
in the latter case, necessary to typeset non-ascii FILENAME.  It also
adds codes to support first line parsing in region compilation.

Although each changes are small, they accumlate to some amount in
total.  Thus I split the changes into three patches.  They are attached
below.

The first patch fixes the bug which has been there even before TL 2018.
If \usepackage[utf8]{inputenc} is present in standard LaTeX, non-ascii
file names in \message{} didn't work as expected in region compilations.

The second patch is the main fix.  It implements most of the changes
mentioned above.  As a minor additional improvement, the users will be
able to put their own TeX codes through `TeX-command-extra-options' for
not only "LaTeX" but also "TeX" and "AmSTeX".

The third patch is a fix for preview-latex to support non-ascii file
names in TL2018.  The TeX codes that enables preamble caching was
crafted by Jean-François.  I deeply thank him for his remarkable skill.

Regards,
Ikumi Keita

[1] https://lists.gnu.org/archive/html/auctex/2018-05/msg00003.html
[2] https://lists.gnu.org/archive/html/auctex/2018-05/msg00004.html

[non-ascii-file-name-revised-1.gz (application/x-gzip, attachment)]
[non-ascii-file-name-revised-2.gz (application/x-gzip, attachment)]
[non-ascii-file-name-revised-3.gz (application/x-gzip, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#25276; Package auctex. (Fri, 01 Jun 2018 05:53:01 GMT) Full text and rfc822 format available.

Message #35 received at 25276 <at> debbugs.gnu.org (full text, mbox):

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
Cc: auctex-devel <at> gnu.org, 25276 <at> debbugs.gnu.org, jfbu <jfbu <at> free.fr>,
 Colin Baxter <m43cap <at> yandex.com>
Subject: Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in
 TeXLive 2018
Date: Fri, 01 Jun 2018 14:51:56 +0900
Hi all,

>>>>> Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
> Hi all,
> As discussed earlier in messages separately, I made out a fix much
> better than the previous proposal.  Any opinions are welcome for this
> new proposal.

Since there were no objections, I commited the proposed patches along
with the document change and regression test.

Regards,
Ikumi Keita




bug closed, send any further explanations to 25276 <at> debbugs.gnu.org and Qiang Yin <yinqiang.sjtu <at> gmail.com> Request was from Arash Esbati <arash <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 05 Mar 2024 07:46:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 02 Apr 2024 11:24:28 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.