GNU bug report logs -
#48524
13.0.11; AUCTeX should not use LaTeX error message for non-LaTeX modes
Previous Next
Reported by: jfbu <jfbu <at> free.fr>
Date: Wed, 19 May 2021 16:17:02 UTC
Severity: normal
Found in version 13.0.11
Done: Ikumi Keita <ikumi <at> ikumi.que.jp>
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 48524 in the body.
You can then email your comments to 48524 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#48524
; Package
auctex
.
(Wed, 19 May 2021 16:17:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
jfbu <jfbu <at> free.fr>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Wed, 19 May 2021 16:17:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
In tex-buf.el I see for example
("Use of [^ ]* doesn't match its definition." .
"It's probably one of the picture-drawing commands, and you have used
the wrong syntax for specifying an argument. If it's \\@array that
doesn't match its definition, then there is something wrong in an
@-expression in the argument of an array or tabular
environment---perhaps a fragile command that is not \\protect'ed.")
And this is triggered for example by this Plain tex file
\def\foo1{}
\foo.
\bye
But in the source for pdftex pdftex.web see at about line 9480
@ @<Report an improper use...@>=
begin print_err("Use of "); sprint_cs(warning_index);
@.Use of x doesn't match...@>
print(" doesn't match its definition");
help4("If you say, e.g., `\def\a1{...}', then you must always")@/
("put `1' after `\a', since control sequence names are")@/
("made up of letters only. The macro here has not been")@/
("followed by the required stuff, so I'm ignoring it.");
error; return;
end
I am of the opinion that AUCTeX should use the original Knuth
error messages.
Even for LaTeX the above error message is now really dated,
but this is not topic of this ticket.
I understand this is some work to extract from pdftex.web the
errors (perhaps someone in the last 30+ years or so has done so,
regarding the Knuth original messages, as pdftex adds some of its
own) and I am opening this bug ticket only for reference as for many
many years each time I have had errors playing around with
TeX I have always been slightly annoyed to see LaTeX specific
error messages. As a result, I most of the time execute etex or pdftex
in a Terminal bypassing auctex.
! Use of \foo doesn't match its definition.
l.27 \foo.
? h
If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.
Best,
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#48524
; Package
auctex
.
(Wed, 19 May 2021 21:35:01 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
Le 19/05/2021 à 18:16, jfbu a écrit :
> I understand this is some work to extract from pdftex.web the
> errors (perhaps someone in the last 30+ years or so has done so,
> regarding the Knuth original messages, as pdftex adds some of its
> own) and I am opening this bug ticket only for reference as for many
As auctex launches pdftex with -interaction=nonstopmode, the
additional help messages displayed by TeX/LaTeX end up in the log file.
So it is only a matter here to fetch the messages from the log,
rather than using the specific ones incorporated into tex-buf.el
This mechanism is already in place where tex-bug.el does not have
an entry matching the message:
ERROR: Extra \or.
--- TeX said ---
l.37 \iftrue\expandafter\fi\or
--- HELP ---
From the .log file...
I'm ignoring this; it doesn't match any \if.
So, it should not be complicated.
The problem is to avoid in Plain TeX runs (or ConTeXt ? I am not familiar with it) to have the auctex generated error help go into LaTeX considerations which are not relevant to Plain TeX.
Jean-François
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#48524
; Package
auctex
.
(Thu, 27 May 2021 12:10:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 48524 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Jean,
>>>>> jfbu <jfbu <at> free.fr> writes:
> I am of the opinion that AUCTeX should use the original Knuth
> error messages.
> Le 19/05/2021 à 18:16, jfbu a écrit :
> As auctex launches pdftex with -interaction=nonstopmode, the
> additional help messages displayed by TeX/LaTeX end up in the log file.
> So it is only a matter here to fetch the messages from the log,
> rather than using the specific ones incorporated into tex-buf.el
> This mechanism is already in place where tex-bug.el does not have
> an entry matching the message:
> ERROR: Extra \or.
> --- TeX said ---
> l.37 \iftrue\expandafter\fi\or
> --- HELP ---
> From the .log file...
> I'm ignoring this; it doesn't match any \if.
> So, it should not be complicated.
> The problem is to avoid in Plain TeX runs (or ConTeXt ? I am not
> familiar with it) to have the auctex generated error help go into
> LaTeX considerations which are not relevant to Plain TeX.
It seems that a similar topic was discussed before[1]. Tassilo's idea
that AUCTeX allows the form (REGEX . FUNCTION) in addition to (REGEX .
STRING) as entries in `TeX-error-description-list' would need some work,
so the attached rough hack might be of some interest for you.
[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21595
Bye,
Ikumi Keita
[patch.gz (application/gzip, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#48524
; Package
auctex
.
(Wed, 02 Jun 2021 11:53:02 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi Keita,
Le 27/05/2021 à 14:09, Ikumi Keita a écrit :
> Hi Jean,
>
>>>>>> jfbu <jfbu <at> free.fr> writes:
>> I am of the opinion that AUCTeX should use the original Knuth
>> error messages.
>
>> [...]
>
>> The problem is to avoid in Plain TeX runs (or ConTeXt ? I am not
>> familiar with it) to have the auctex generated error help go into
>> LaTeX considerations which are not relevant to Plain TeX.
>
> It seems that a similar topic was discussed before[1].
Indeed. I was very articulate back then, I feel I have lost my
vocabulary since.
Tassilo's idea
> that AUCTeX allows the form (REGEX . FUNCTION) in addition to (REGEX .
> STRING) as entries in `TeX-error-description-list' would need some work,
> so the attached rough hack might be of some interest for you.
>
> [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21595
>
Sorry for late, I have now applied the patch and it seems
to do exactly what I was expecting.
I.e. this TeX file
\def\foo1{}
\foo.
\bye
triggers this error window on C-c `
ERROR: Use of \foo doesn't match its definition.
--- TeX said ---
l.2 \foo.
--- HELP ---
From the .log file...
If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.
which is the actual text in the log file originating in pdftex
sources, copied over from Knuth original TeX.
Note : I applied the patch on my git clone, after
having pulled to get the latest commits, HEAD was
at 93d66d1a Adapt for Texinfo mode
For some reason I had to delete from the patch
the change to tex-jp.el
$ git apply patchlatexerrors
error: patch failed: tex-jp.el:538
error: tex-jp.el: patch does not apply
I suspect some encoding problem on my side (the buffer
indicated a "1" in bottom left) from gunzip
Best,
Jean-François
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#48524
; Package
auctex
.
(Wed, 02 Jun 2021 11:53:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#48524
; Package
auctex
.
(Thu, 03 Jun 2021 05:56:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 48524 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Jean,
>>>>> jfbu <jfbu <at> free.fr> writes:
> Note : I applied the patch on my git clone, after
> having pulled to get the latest commits, HEAD was
> at 93d66d1a Adapt for Texinfo mode
> For some reason I had to delete from the patch
> the change to tex-jp.el
> $ git apply patchlatexerrors
> error: patch failed: tex-jp.el:538
> error: tex-jp.el: patch does not apply
> I suspect some encoding problem on my side (the buffer
> indicated a "1" in bottom left) from gunzip
Sorry, my bad. The patch had wrong encoding. I learned that typing "W s"
on magit diff hunk (magit-patch-save) uses emacs facility to save patch
so it saves in my default encoding, not utf-8.
> Sorry for late, I have now applied the patch and it seems
> to do exactly what I was expecting.
Thanks for confirmation. The proposed patch has a small incompatibility
with the current AUCTeX that the customize option
`TeX-error-description-list' can no longer have a fallback entry that
matches any error, but I expect that there are few users who customized
it. I included a news entry which warns the incompatibility in the
attached patch.
Does anyone have comments or opinions?
Regards,
Ikumi Keita
[0001-Use-own-error-description-for-LaTeX-mode-only.patch.gz (application/gzip, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#48524
; Package
auctex
.
(Thu, 03 Jun 2021 09:56:01 GMT)
Full text and
rfc822 format available.
Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):
Le 03/06/2021 à 07:55, Ikumi Keita a écrit :
>> Sorry for late, I have now applied the patch and it seems
>> to do exactly what I was expecting.
> Thanks for confirmation. The proposed patch has a small incompatibility
> with the current AUCTeX that the customize option
> `TeX-error-description-list' can no longer have a fallback entry that
> matches any error, but I expect that there are few users who customized
> it. I included a news entry which warns the incompatibility in the
> attached patch.
>
> Does anyone have comments or opinions?
Hi, only to confirm patch applied cleanly.
I tested it with LaTeX and with Plain (with pdftex engine) and it appears
to work as expected, at my locale. I don't have experience with
customizing TeX-error-description-list so can't comment on the fallback
entry un-customizability. Here is a situation
causing pdftex to abort abruptly after an initial error, and
then "No help available" is shown.
----
ABCD
\def\foo{\begingroup\foo}
\foo
\bye
----
(the "No help available" context will appear if producing PDF not DVI
as it is triggered by an error
==> Fatal error occurred, no output PDF file produced!
generated by pdftex only in pdf mode)
Best,
Jean-François
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#48524
; Package
auctex
.
(Fri, 04 Jun 2021 06:15:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 48524 <at> debbugs.gnu.org (full text, mbox):
Hi Jean,
>>>>> jfbu <jfbu <at> free.fr> writes:
>> Does anyone have comments or opinions?
> Hi, only to confirm patch applied cleanly.
> I tested it with LaTeX and with Plain (with pdftex engine) and it appears
> to work as expected, at my locale. I don't have experience with
> customizing TeX-error-description-list so can't comment on the fallback
> entry un-customizability. Here is a situation
> causing pdftex to abort abruptly after an initial error, and
> then "No help available" is shown.
> ----
> ABCD
> \def\foo{\begingroup\foo}
> \foo
> \bye
> ----
> (the "No help available" context will appear if producing PDF not DVI
> as it is triggered by an error
> ==> Fatal error occurred, no output PDF file produced!
> generated by pdftex only in pdf mode)
Thank you for confirmation again. I renamed a new variable slightly and
pushed the commit to git repo.
I'll close bug#21595 and bug#21517 in addition to this bug.
Regards,
Ikumi Keita
bug closed, send any further explanations to
48524 <at> debbugs.gnu.org and jfbu <jfbu <at> free.fr>
Request was from
Ikumi Keita <ikumi <at> ikumi.que.jp>
to
control <at> debbugs.gnu.org
.
(Fri, 04 Jun 2021 06:15:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#48524
; Package
auctex
.
(Fri, 04 Jun 2021 06:53:02 GMT)
Full text and
rfc822 format available.
Message #31 received at submit <at> debbugs.gnu.org (full text, mbox):
Le 04/06/2021 à 08:14, Ikumi Keita a écrit :
> Thank you for confirmation again. I renamed a new variable slightly and
> pushed the commit to git repo.
>
> I'll close bug#21595 and bug#21517 in addition to this bug.
Hi Keita,
Thanks for taking the time doing this,
Best,
Jean-François
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 02 Jul 2021 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 354 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.