bug#21595: 11.88.8; TeX help in Plain contaminated by LaTeX

2015-10-01 Thread jfbu

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.

The following TeX source file

\def\foo{\begingroup\foo}\foo

\bye

when run from a TeX-mode Emacs/AUCTeX buffer generates on C-c `,
after compilation has halted on a TeX capacity exceeded error,
a buffer displaying a long text of which I reproduce only the start
here:

ERROR: TeX capacity exceeded, sorry [grouping levels=255].

--- TeX said ---
\foo ->\begingroup
   \foo
l.1 \def\foo{\begingroup\foo}\foo
 
--- HELP ---

TeX has just run out of space and aborted its execution. Before you
panic, remember that the least likely cause of this error is TeX not
having the capacity to process your document.  It was probably an
error in your input file that caused TeX to run out of room. The
following discussion explains how to decide whether you've really
exceeded TeX's capacity and, if so, what to do. If the problem is an
error in the input, you may have to use the divide and conquer method
described previously to locate it. LaTeX seldom runs out of space on a
short input file, so if running it on the last few pages before the
error indicator's position still produces the error, then there's
almost certainly something wrong in the input file.

The end of the error indicator tells what kind of space TeX ran out
of. The more common ones are listed below, with an explanation of
their probable causes.

buffer size
===
Can be caused by too long a piece of text as the argument

[continued]

The rest of the text has many many references to LaTeX.

As the context here is Plain TeX this longish info is mostly
irrelevant (it provides useful information to average LaTeX
users, but nothing spicy to well trained macro programmers ;-) )

For some years I thought that the message originated in the
help system of the tex binary itself (my Emacs is configured
actually to run etex not tex if that matters), but it appears
that I could very well
have erred completely. I of course realized Knuth would not
have included such a message, but perhaps the binaries of
my TeXLive installation did provide an extended help system.

A guru from the LaTeX3 team tells me it can't be the case,
thus my question is

   Does the message somehow come from AUCTeX ?

Perhaps no, in which case sorry for the noise.

Best, Jean-François



Emacs  : GNU Emacs 24.5.6 (x86_64-apple-darwin13.4.0, Carbon Version 157 AppKit 
1265.21)
 of 2015-08-26 on Atago.local
Package: 11.88.8

current state:
==
(setq
 AUCTeX-date "2015-08-28"
 window-system 'mac
 LaTeX-version "2e"
 TeX-style-path '("~/.emacs.d/auctex"
  "/Users//.emacs.d/elpa/auctex-11.88.8/style"
  "/Users//.emacs.d/auctex/auto"
  "/Users//.emacs.d/auctex/style" "auto" "style")
 TeX-auto-save t
 TeX-parse-self t
 TeX-master t
 [...]
 )



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#21595: 11.88.8; TeX help in Plain contaminated by LaTeX

2015-10-01 Thread Mosè Giordano
Hi Jean-François,

2015-10-01 7:24 GMT+02:00 jfbu :
> Remember to cover the basics, that is, what you expected to happen and
> what in fact did happen.
>
> The following TeX source file
>
> \def\foo{\begingroup\foo}\foo
>
> \bye
>
> when run from a TeX-mode Emacs/AUCTeX buffer generates on C-c `,
> after compilation has halted on a TeX capacity exceeded error,
> a buffer displaying a long text of which I reproduce only the start
> here:
>
> ERROR: TeX capacity exceeded, sorry [grouping levels=255].
>
> --- TeX said ---
> \foo ->\begingroup
>\foo
> l.1 \def\foo{\begingroup\foo}\foo
>  --- HELP ---
> TeX has just run out of space and aborted its execution. Before you
> panic, remember that the least likely cause of this error is TeX not
> having the capacity to process your document.  It was probably an
> error in your input file that caused TeX to run out of room. The
> following discussion explains how to decide whether you've really
> exceeded TeX's capacity and, if so, what to do. If the problem is an
> error in the input, you may have to use the divide and conquer method
> described previously to locate it. LaTeX seldom runs out of space on a
> short input file, so if running it on the last few pages before the
> error indicator's position still produces the error, then there's
> almost certainly something wrong in the input file.
>
> The end of the error indicator tells what kind of space TeX ran out
> of. The more common ones are listed below, with an explanation of
> their probable causes.
>
> buffer size
> ===
> Can be caused by too long a piece of text as the argument
>
> [continued]
>
> The rest of the text has many many references to LaTeX.
>
> As the context here is Plain TeX this longish info is mostly
> irrelevant (it provides useful information to average LaTeX
> users, but nothing spicy to well trained macro programmers ;-) )
>
> For some years I thought that the message originated in the
> help system of the tex binary itself (my Emacs is configured
> actually to run etex not tex if that matters), but it appears
> that I could very well
> have erred completely. I of course realized Knuth would not
> have included such a message, but perhaps the binaries of
> my TeXLive installation did provide an extended help system.
>
> A guru from the LaTeX3 team tells me it can't be the case,
> thus my question is
>
>Does the message somehow come from AUCTeX ?

Yes, AUCTeX has help messages builtin in `TeX-error-description-list'
variable, seemingly provided by someone called Leslie Lamport [1],
maybe you've heard about him.   These messages are sometimes more
verbose and useful than help messages present in log file.  If AUCTeX
can't find help messages in its database, falls back on log file.
Probably all those reference to LaTeX come from Lamport.

Being `TeX-error-description-list' a variable I'm not sure to have it
would be easy to have different values for different modes (plain
TeX/LaTeX/you name it).

Bye,
Mosè


Reference:
[1] 
http://git.savannah.gnu.org/gitweb/?p=auctex.git;a=blob;f=doc/history.texi;hb=HEAD



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#21595: 11.88.8; TeX help in Plain contaminated by LaTeX

2015-10-01 Thread jfbu
Hi Mosè

Le 1 oct. 2015 à 14:06, Mosè Giordano  a écrit :

> Hi Jean-François,
> 
> 2015-10-01 7:24 GMT+02:00 jfbu :
>> Remember to cover the basics, that is, what you expected to happen and
>> what in fact did happen.
>> 
>> The following TeX source file
>> 
>>\def\foo{\begingroup\foo}\foo
>> 
>>\bye
>> 
>> when run from a TeX-mode Emacs/AUCTeX buffer generates on C-c `,
>> after compilation has halted on a TeX capacity exceeded error,
>> a buffer displaying a long text of which I reproduce only the start
>> here:
>> 
>> ERROR: TeX capacity exceeded, sorry [grouping levels=255].
>> 
>> --- TeX said ---
>> \foo ->\begingroup
>>   \foo
>> l.1 \def\foo{\begingroup\foo}\foo
>> --- HELP ---
>> TeX has just run out of space and aborted its execution. Before you
>> panic, remember that the least likely cause of this error is TeX not
>> having the capacity to process your document.  It was probably an
>> error in your input file that caused TeX to run out of room. The
>> following discussion explains how to decide whether you've really
>> exceeded TeX's capacity and, if so, what to do. If the problem is an
>> error in the input, you may have to use the divide and conquer method
>> described previously to locate it. LaTeX seldom runs out of space on a
>> short input file, so if running it on the last few pages before the
>> error indicator's position still produces the error, then there's
>> almost certainly something wrong in the input file.
>> 
>> The end of the error indicator tells what kind of space TeX ran out
>> of. The more common ones are listed below, with an explanation of
>> their probable causes.
>> 
>> buffer size
>> ===
>> Can be caused by too long a piece of text as the argument
>> 
>> [continued]
>> 
>> The rest of the text has many many references to LaTeX.
>> 
>> As the context here is Plain TeX this longish info is mostly
>> irrelevant (it provides useful information to average LaTeX
>> users, but nothing spicy to well trained macro programmers ;-) )
>> 
>> For some years I thought that the message originated in the
>> help system of the tex binary itself (my Emacs is configured
>> actually to run etex not tex if that matters), but it appears
>> that I could very well
>> have erred completely. I of course realized Knuth would not
>> have included such a message, but perhaps the binaries of
>> my TeXLive installation did provide an extended help system.
>> 
>> A guru from the LaTeX3 team tells me it can't be the case,
>> thus my question is
>> 
>>   Does the message somehow come from AUCTeX ?
> 
> Yes, AUCTeX has help messages builtin in `TeX-error-description-list'
> variable, seemingly provided by someone called Leslie Lamport [1],
> maybe you've heard about him.   These messages are sometimes more
> verbose and useful than help messages present in log file.  If AUCTeX
> can't find help messages in its database, falls back on log file.
> Probably all those reference to LaTeX come from Lamport.
> 
> Being `TeX-error-description-list' a variable I'm not sure to have it
> would be easy to have different values for different modes (plain
> TeX/LaTeX/you name it).
> 
> Bye,
> Mosè
> 
> 
> Reference:
> [1] 
> http://git.savannah.gnu.org/gitweb/?p=auctex.git;a=blob;f=doc/history.texi;hb=HEAD

Thanks for confirming that this comes from AUCTeX incorporating
probable contributtions of Leslie Lamport. For bystanders
here are a few more lines of the help message.

> buffer size
> ===
> Can be caused by too long a piece of text as the argument
> of a sectioning, \caption, \addcontentsline, or \addtocontents
> command. This error will probably occur when the \end{document} is
> being processed, but it could happen when a \tableofcontents,
> \listoffigures, or \listoftables command is executed. To solve this
> problem, use a shorter optional argument. Even if you're producing a
> table of contents or a list of figures or tables, such a long entry
> won't help the reader.


this information is 100% LaTeX and presents no interest for users of
other formats. It is somewhat informative to users of the LaTeX macros
although it may be obsolete by now because the TeX memory parameters
have been considerably increased in the distributions like TeXLive
and MikTeX since the eighties.

This is not a big issue, naturally.

However you may keep this in mind if one day before the 22th
century LaTeX3 starts being widely used, perhaps that will
mean then a need for a complete rewrite of the format error
messages.

I have my answer, thanks a lot.

best
Jean-François







___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#21595: 11.88.8; TeX help in Plain contaminated by LaTeX

2015-10-01 Thread Tassilo Horn
jfbu  writes:

> A guru from the LaTeX3 team tells me it can't be the case,
> thus my question is
>
>Does the message somehow come from AUCTeX ?
>
> Perhaps no, in which case sorry for the noise.

Yes, the message comes from AUCTeX.  The variable
`TeX-error-description-list' is an alist of regular expressions matched
agains error messages and such explanations about what that error means
and what might cause it.

The same list is used for plain TeX, LaTeX, ConTeXt etc. and I don't
think it is reasonable to split it into multiple lists just to have some
explanations a bit more specific.  Well, and you are a TeX-pro anyway,
so I'd recommend you put

  (setq TeX-error-description-list '((".*" . "Go figure!")))

into your ~/.emacs. :-)

Bye,
Tassilo



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#21595: 11.88.8; TeX help in Plain contaminated by LaTeX

2015-10-01 Thread jfbu

Le 01/10/2015 16:55, Tassilo Horn a écrit :

jfbu  writes:


A guru from the LaTeX3 team tells me it can't be the case,
thus my question is

Does the message somehow come from AUCTeX ?

Perhaps no, in which case sorry for the noise.


Yes, the message comes from AUCTeX.  The variable
`TeX-error-description-list' is an alist of regular expressions matched
agains error messages and such explanations about what that error means
and what might cause it.

The same list is used for plain TeX, LaTeX, ConTeXt etc. and I don't
think it is reasonable to split it into multiple lists just to have some
explanations a bit more specific.  Well, and you are a TeX-pro anyway,
so I'd recommend you put

   (setq TeX-error-description-list '((".*" . "Go figure!")))

into your ~/.emacs. :-)

Bye,
Tassilo



Hi Tassilo,

as I said to Mosè: perhaps in the future, some modifications could
be considered. In the specific case of my test file the Knuth TeX
error message

TeX capacity exceeded, sorry [grouping levels=255]

will remain always quite to the point. This is already nowadays not
quite the case of the LaTeX error message about memory matters.

I will ponder the addition of the line above to my .emacs, but
perhaps I will first make a reading of the database of error
messages in tex-dbg.el as mentioned in the link from Mosè's message.

Bye,

Jean-François







___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#21595: 11.88.8; TeX help in Plain contaminated by LaTeX

2015-10-01 Thread Mosè Giordano
2015-10-01 14:28 GMT+02:00 jfbu :
> However you may keep this in mind if one day before the 22th
> century LaTeX3 starts being widely used, perhaps that will
> mean then a need for a complete rewrite of the format error
> messages.

I know some members of the LaTeX3 team are Emacs users, probably
AUCTeX too, you may suggest them to provide us with updated help
messages before the 22th century ;-)

Bye,
Mosè



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#21595: 11.88.8; TeX help in Plain contaminated by LaTeX

2015-10-02 Thread Tassilo Horn
jfbu  writes:

Hi Jean-François,

> as I said to Mosè: perhaps in the future, some modifications could be
> considered.

Yes, absolutely.  For example, it wouldn't require much effort to allow
entries of the form (REGEX . FUNCTION) in addition to (REGEX . STRING).
For such an entry, FUNCTION would be called and had to return an
appropriate description string.  That function could check, e.g.,
`major-mode', to see if this is plain TeX, LaTeX, or whatever and
provide better help.

That would certainly be feasible.  I just don't have enough (La)TeX
knowledge to be able to judge which descriptions and hints are still
relevant, which ones are outdated, and which ones are missing.  So
that's a point where you could help a lot.

Bye,
Tassilo



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#21595: 11.88.8; TeX help in Plain contaminated by LaTeX

2015-10-03 Thread jfbu

Hi Tassilo

Le 02/10/2015 13:25, Tassilo Horn a écrit :

That would certainly be feasible.  I just don't have enough (La)TeX
knowledge to be able to judge which descriptions and hints are still
relevant, which ones are outdated, and which ones are missing.  So
that's a point where you could help a lot.



if I can contribute in anyway, I will be glad to do so. Once I get
time I will look through the available database, but I expect not
to have much to say: my main "saying" was the topic of this post,
which is to differentiate among the various TeX modes, and you have
answered that already.

I mentioned as an example LaTeX3: I expect the team there has
given some thought to error messages and I trust it will not be
needed to add any extra to what will be provided by the team
which has the inner knowledge. As we see with Knuth and Lamport,
once the messages are there, they stay for decades, Hence, I am
sure any new TeX format will come with well thought-out error
messages ...

cheers

Jean-François



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex