texlive[73679] Build/source/texk/web2c: disable patch for interactive

commits+karl at tug.org commits+karl at tug.org
Sat Feb 1 23:56:43 CET 2025


Revision: 73679
          https://tug.org/svn/texlive?view=revision&revision=73679
Author:   karl
Date:     2025-02-01 23:56:43 +0100 (Sat, 01 Feb 2025)
Log Message:
-----------
disable patch for interactive deletion of \outer tokens

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/ChangeLog
    trunk/Build/source/texk/web2c/tex.ch

Added Paths:
-----------
    trunk/Build/source/texk/web2c/tests/outerdel.tex
    trunk/Build/source/texk/web2c/tests/outerdelsub.tex

Modified: trunk/Build/source/texk/web2c/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ChangeLog	2025-02-01 22:53:37 UTC (rev 73678)
+++ trunk/Build/source/texk/web2c/ChangeLog	2025-02-01 22:56:43 UTC (rev 73679)
@@ -1,5 +1,11 @@
 2025-02-01  Karl Berry  <karl at freefriends.org>
 
+	* tex.ch (24.336): comment out this patch for interactive deletion
+	of \outer tokens, since it has the undesirable side effect of
+	deleting through eof.
+	* tests/outerdel.tex,
+	* tests/outerdelsub.tex: test files and info.
+
 	* tex.ch (save_arith_error): declare in Glob...
 	(30.568): save and restore arith_error around the new
 	check for font scaling to >= 2048pt.

Added: trunk/Build/source/texk/web2c/tests/outerdel.tex
===================================================================
--- trunk/Build/source/texk/web2c/tests/outerdel.tex	                        (rev 0)
+++ trunk/Build/source/texk/web2c/tests/outerdel.tex	2025-02-01 22:56:43 UTC (rev 73679)
@@ -0,0 +1,112 @@
+% $Id$
+% Public domain, from Udo Wermuth.
+% 
+% Running TeX on this will provoke an error.
+% Deleting 3 tokens at the interactive prompt should result in
+%   ! File ended while scanning definition of \one.
+% and not delete tokens through eof.
+% Full message from Udo below (files are renamed for inclusion web2c).
+% 
+% BTW, there are no \outer tokens involved in this test, but the original
+% change involved deleting \outer tokens.
+% https://tug.org/pipermail/tex-k/2024-March/004021.html
+
+\catcode`\{=1 \catcode`\}=2 \let\ea=\expandafter
+\def\zero{z}
+\ea\edef\ea\one\ea{\input outerdelsub.tex\relax\zero}
+\show\one\end
+
+%Date: Fri, 7 Jun 2024 18:04:21 +0200
+%From: Udo Wermuth
+%To: Karl Berry <karl at freefriends.org>
+%Subject: Re: skipping tokens through the end of an input file
+%
+%I think now I know what you want me to do; I saw the error
+%report about \outer in an \edef on tex-k.
+%
+%Lets create two files:
+%1) sub.tex (1 line):
+%x\error y\noexpand
+%
+%2) main.tex (4 lines):
+%\let\ea=\expandafter
+%\def\zero{z}
+%\ea\edef\ea\one\ea{\input sub.tex\relax\zero}
+%\show\one\bye
+%
+%
+%tex sub gives an error
+%
+%! Undefined control sequence.
+%l.1 x\error
+%            y\noexpand
+%? 
+%
+%When you delete 1, 2, or 3 tokens at the ?-prompt it works as
+%expected. With 2 you get the *-prompt and you can say \bye.
+%With 3 you get the *-prompt too but now a \bye is deleted as
+%one delete operation is still waiting. At the next *-prompt
+%you can enter a valid \bye.
+%With 1 a \bye at the *-prompt is not expanded and thus doesn't
+%work. Again the next *-prompt accepts the \bye.
+%
+%
+%With tex main you get the error as above.
+%
+%With <return> or 1 the definition is finished as the outerness of the
+%eof is canceled by the \noexpand. With 2 the \noexpand is deleted too
+%and a <return> at the next ?-prompt gives a runaway error:
+%
+%Runaway definition?
+%->x
+%! File ended while scanning definition of \one.
+%<inserted text> 
+%                }
+%<to be read again> 
+%                   \relax 
+%l.4 \ea\edef\ea\one\ea{\input sub.tex\relax
+%                                           \zero}
+%? 
+%
+%Another <return> reports
+%
+%! Too many }'s.
+%l.4 \ea\edef\ea\one\ea{\input sub.tex\relax\zero}
+%                                                 
+%?
+%
+%before the run ends with another <return>. \one is what I expect and a
+%dvi is produced that shows `z' as expected.
+%
+%But with 2 and then a 1 (not a <return>) we get the runaway and with
+%a <return>
+%
+%<inserted text> }
+%                 
+%<to be read again> 
+%                   \relax 
+%l.4 \ea\edef\ea\one\ea{\input sub.tex\relax
+%                                           \zero}
+%?
+%
+%so that the definition can be finished. With 3 instead of 2 the same
+%happens.
+%
+%
+%
+%With the change that inserts OK_to_interrupt things change. When
+%you enter now 2 and 1 or directly 3 you get
+%
+%)
+%<recently read> \relax 
+%                       
+%l.4 \ea\edef\ea\one\ea{\input sub.tex\relax
+%                                           \zero}
+%? 
+%
+%That is y, \noexpand, and \relax are deleted. The outerness of the eof
+%doesn't count now and there is no inserted } anymore.
+%
+%I would consider this wrong. Somewhere the file ended and this end should
+%be treated as \outer. One could say in the last case the file ended with
+%the x.


Property changes on: trunk/Build/source/texk/web2c/tests/outerdel.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Added: trunk/Build/source/texk/web2c/tests/outerdelsub.tex
===================================================================
--- trunk/Build/source/texk/web2c/tests/outerdelsub.tex	                        (rev 0)
+++ trunk/Build/source/texk/web2c/tests/outerdelsub.tex	2025-02-01 22:56:43 UTC (rev 73679)
@@ -0,0 +1,3 @@
+% $Id$
+% Public domain, from Udo Wermuth. See outerdel.tex
+x\error y\noexpand


Property changes on: trunk/Build/source/texk/web2c/tests/outerdelsub.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Modified: trunk/Build/source/texk/web2c/tex.ch
===================================================================
--- trunk/Build/source/texk/web2c/tex.ch	2025-02-01 22:53:37 UTC (rev 73678)
+++ trunk/Build/source/texk/web2c/tex.ch	2025-02-01 22:56:43 UTC (rev 73679)
@@ -1527,11 +1527,14 @@
 
 % Original report: https://tug.org/pipermail/tex-k/2024-March/004021.html
 % TeX bug entry:   https://tug.org/texmfbug/newbug.html#B142outer
- at x [24.336] l.7152 - allow interactive deletion of \outer token
-begin if scanner_status<>normal then
- at y
-begin if OK_to_interrupt and(scanner_status<>normal) then
- at z
+% -- but this has the problem that token deletion will now continue
+%    through an eof, which seems undesirable, and not a permissible
+%    change for "TeX". See tests/outerdel.tex.
+%@x [24.336] l.7152 - allow interactive deletion of \outer token
+%begin if scanner_status<>normal then
+%@y
+%begin if OK_to_interrupt and(scanner_status<>normal) then
+%@z
 
 @x [24.338] l.7191 - i18n fix
 print(" while scanning ");



More information about the tex-live-commits mailing list.