[luatex] incorrect value of status.filename in files input via a macro

David Carlisle d.p.carlisle at gmail.com
Mon Nov 23 10:16:26 CET 2015

This question came originally from an (old) user report on stackexchange


but I've simplified it down to a plain tex example, using the latest
0.85 release.

If you run the attached files with the command

luatex --interaction=scrollmode --file-line-error main2

Then you get the log as attached, the middle message shows the problem

./foo.sty line 2: ./main2.tex line 2

shows that during the input file status.filename is incorrectly giving the
top level file, even though status.linenumber is giving the line in this file.

The \ERROR following shows that the system does "know" the correct
input filename
and uses it in the error message when --file-line-error is used.

If you use the primitive \input directly then it does work as shown by
the second input giving

./foo.sty line 2: ./foo.sty line 2

However it is very common to have to construct the filename via a
macro argument (latex \usepackage for example, and actually latex
\input currently)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: status-example.zip
Type: application/zip
Size: 1305 bytes
Desc: not available
URL: <http://tug.org/pipermail/luatex/attachments/20151123/7cf7f1ff/attachment.zip>

More information about the luatex mailing list