[latex3-commits] [git/LaTeX3-latex3-latex2e] gh917+958: fix for #917 and #958 (450fe199)
Frank Mittelbach
frank.mittelbach at latex-project.org
Wed Nov 16 15:46:04 CET 2022
Repository : https://github.com/latex3/latex2e
On branch : gh917+958
Link : https://github.com/latex3/latex2e/commit/450fe19996db3669cb84e382ce59d13af0e4e7cb
>---------------------------------------------------------------
commit 450fe19996db3669cb84e382ce59d13af0e4e7cb
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Wed Nov 16 15:46:04 2022 +0100
fix for #917 and #958
>---------------------------------------------------------------
450fe19996db3669cb84e382ce59d13af0e4e7cb
base/ltclass.dtx | 17 ++++++++++---
base/testfiles-1run/github-0220.luatex.tlg | 2 +-
base/testfiles-1run/github-0220.tlg | 2 +-
base/testfiles/github-0198.luatex.tlg | 4 ++--
base/testfiles/github-0198.tlg | 4 ++--
base/testfiles/github-0238.luatex.tlg | 2 +-
base/testfiles/github-0238.tlg | 2 +-
base/testfiles/github-0256.luatex.tlg | 6 ++---
base/testfiles/github-0256.tlg | 6 ++---
base/testfiles/github-0415.luatex.tlg | 2 +-
base/testfiles/github-0415.tlg | 2 +-
base/testfiles/github-0415.xetex.tlg | 2 +-
base/testfiles/github-0504.luatex.tlg | 2 +-
base/testfiles/github-0504.tlg | 2 +-
base/testfiles/github-0917+0958.luatex.tlg | 27 +++++++++++++++++++++
base/testfiles/github-0917+0958.lvt | 38 ++++++++++++++++++++++++++++++
base/testfiles/github-0917+0958.tlg | 24 +++++++++++++++++++
base/testfiles/tlb-filename-01.luatex.tlg | 2 +-
base/testfiles/tlb-filename-01.tlg | 2 +-
19 files changed, 124 insertions(+), 24 deletions(-)
diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index a525b6f5..3221ee51 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -2821,7 +2821,7 @@
\csname filec at ntents@\reserved at a\endcsname
\else
\@latex at error{Unknown filecontents option \reserved at a}%
- {Valid options are force (or overwrite), nosearch, noheader}%
+ {Valid options are force (or overwrite), nosearch, noheader, silent}%
\fi}%
\filec at ntents
}
@@ -2849,6 +2849,17 @@
\let\filec at ntents@checkdir\@empty
\def\filec at ntents@where{exists on the system}
% \end{macrocode}
+% Option \texttt{silent} does not show any warning on the terminal
+% but still writes it to the \texttt{.log}.
+% \begin{macrocode}
+\def\filec at ntents@silent{%
+ \let\filec at ntents@warning\@latex at note@no at line
+}
+% \end{macrocode}
+% By default we show terminal warnings.
+% \begin{macrocode}
+\let\filec at ntents@warning\@latex at warning@no at line
+% \end{macrocode}
%
% \begin{macrocode}
\begingroup%
@@ -2932,8 +2943,8 @@
write to the file you are reading from!\MessageBreak%
Data is written to screen instead.}%
\else%
- \@latex at warning@no at line%
- {Writing or overwriting file `\@currdir\@curr at file'}%
+ \filec at ntents@warning%
+ {Writing or overwriting file `\@curr at file'}%
\immediate\openout\reserved at c\q at curr@file\relax%
\fi%
\fi%
diff --git a/base/testfiles-1run/github-0220.luatex.tlg b/base/testfiles-1run/github-0220.luatex.tlg
index 00df82bb..f36a8b08 100644
--- a/base/testfiles-1run/github-0220.luatex.tlg
+++ b/base/testfiles-1run/github-0220.luatex.tlg
@@ -15,7 +15,7 @@ Reading the file ``github 220 input.tex'' (same result)
This is from file ``github 220 input''.
)
Forcing to writing a file with the same name, should succeed:
-LaTeX Warning: Writing or overwriting file `./github 220 input'.
+LaTeX Warning: Writing or overwriting file `github 220 input'.
\openout127 = github 220 input.tex
Reading the file ``github 220 input.tex'' (different result)
("./github 220 input.tex"
diff --git a/base/testfiles-1run/github-0220.tlg b/base/testfiles-1run/github-0220.tlg
index 935f76bd..f0afb6ca 100644
--- a/base/testfiles-1run/github-0220.tlg
+++ b/base/testfiles-1run/github-0220.tlg
@@ -15,7 +15,7 @@ Reading the file ``github 220 input.tex'' (same result)
This is from file ``github 220 input''.
)
Forcing to writing a file with the same name, should succeed:
-LaTeX Warning: Writing or overwriting file `./github 220 input'.
+LaTeX Warning: Writing or overwriting file `github 220 input'.
Reading the file ``github 220 input.tex'' (different result)
(github 220 input.tex
This is from the third file ``github 220 input''.
diff --git a/base/testfiles/github-0198.luatex.tlg b/base/testfiles/github-0198.luatex.tlg
index 88a0f16e..be998b91 100644
--- a/base/testfiles/github-0198.luatex.tlg
+++ b/base/testfiles/github-0198.luatex.tlg
@@ -1,8 +1,8 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
-LaTeX Warning: Writing or overwriting file `././test-base.sty'.
+LaTeX Warning: Writing or overwriting file `./test-base.sty'.
\openout127 = ./test-base.sty
-LaTeX Warning: Writing or overwriting file `././test-sub.sty'.
+LaTeX Warning: Writing or overwriting file `./test-sub.sty'.
\openout127 = ./test-sub.sty
(test-base.sty (test-sub.sty))
This should produce: "Done":
diff --git a/base/testfiles/github-0198.tlg b/base/testfiles/github-0198.tlg
index 3693f7bc..c68ef087 100644
--- a/base/testfiles/github-0198.tlg
+++ b/base/testfiles/github-0198.tlg
@@ -1,7 +1,7 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
-LaTeX Warning: Writing or overwriting file `././test-base.sty'.
-LaTeX Warning: Writing or overwriting file `././test-sub.sty'.
+LaTeX Warning: Writing or overwriting file `./test-base.sty'.
+LaTeX Warning: Writing or overwriting file `./test-sub.sty'.
(test-base.sty (test-sub.sty))
This should produce: "Done":
Done.
diff --git a/base/testfiles/github-0238.luatex.tlg b/base/testfiles/github-0238.luatex.tlg
index 48ae6210..1577f765 100644
--- a/base/testfiles/github-0238.luatex.tlg
+++ b/base/testfiles/github-0238.luatex.tlg
@@ -1,4 +1,4 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
-LaTeX Warning: Writing or overwriting file `./github-0238-0.vrb'.
+LaTeX Warning: Writing or overwriting file `github-0238-0.vrb'.
\openout127 = github-0238-0.vrb
diff --git a/base/testfiles/github-0238.tlg b/base/testfiles/github-0238.tlg
index 833582f5..3e4e125f 100644
--- a/base/testfiles/github-0238.tlg
+++ b/base/testfiles/github-0238.tlg
@@ -5,4 +5,4 @@ Don't change this file in any respect.
\fi
l. ...\begin{filecontents*}[force]{\jobname-0.vrb}
(That was another \errmessage.)
-LaTeX Warning: Writing or overwriting file `./github-0238-0.vrb'.
+LaTeX Warning: Writing or overwriting file `github-0238-0.vrb'.
diff --git a/base/testfiles/github-0256.luatex.tlg b/base/testfiles/github-0256.luatex.tlg
index 89681430..62a96382 100644
--- a/base/testfiles/github-0256.luatex.tlg
+++ b/base/testfiles/github-0256.luatex.tlg
@@ -6,10 +6,10 @@ Type H <return> for immediate help.
...
l. ......{filecontents}[overwrite, noheader, UNKNOWN]
{\jobname.xxx}
-Valid options are force (or overwrite), nosearch, noheader
-LaTeX Warning: Writing or overwriting file `./github-0256.xxx'.
+Valid options are force (or overwrite), nosearch, noheader, silent
+LaTeX Warning: Writing or overwriting file `github-0256.xxx'.
\openout127 = github-0256.xxx
First line: hello = Hello?
-LaTeX Warning: Writing or overwriting file `././github-0256.xxx'.
+LaTeX Warning: Writing or overwriting file `./github-0256.xxx'.
\openout127 = ./github-0256.xxx
First line: %% LaTeX2e file `./github-0256.xxx' = some comment line?
diff --git a/base/testfiles/github-0256.tlg b/base/testfiles/github-0256.tlg
index 3bb4b2cb..c3390ca0 100644
--- a/base/testfiles/github-0256.tlg
+++ b/base/testfiles/github-0256.tlg
@@ -6,8 +6,8 @@ Type H <return> for immediate help.
...
l. ......ilecontents}[overwrite, noheader, UNKNOWN]
{\jobname.xxx}
-Valid options are force (or overwrite), nosearch, noheader
-LaTeX Warning: Writing or overwriting file `./github-0256.xxx'.
+Valid options are force (or overwrite), nosearch, noheader, silent
+LaTeX Warning: Writing or overwriting file `github-0256.xxx'.
First line: hello = Hello?
-LaTeX Warning: Writing or overwriting file `././github-0256.xxx'.
+LaTeX Warning: Writing or overwriting file `./github-0256.xxx'.
First line: %% LaTeX2e file `./github-0256.xxx' = some comment line?
diff --git a/base/testfiles/github-0415.luatex.tlg b/base/testfiles/github-0415.luatex.tlg
index ae140161..1cc4ec8b 100644
--- a/base/testfiles/github-0415.luatex.tlg
+++ b/base/testfiles/github-0415.luatex.tlg
@@ -2,5 +2,5 @@ This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
LaTeX Info: File `f^^f6^^f6.tex' already exists on the system.
Not generating it from this source.
-LaTeX Warning: Writing or overwriting file `./f^^f6^^f6.tex'.
+LaTeX Warning: Writing or overwriting file `f^^f6^^f6.tex'.
\openout127 = f^^f6^^f6.tex
diff --git a/base/testfiles/github-0415.tlg b/base/testfiles/github-0415.tlg
index 45080e56..381c30a1 100644
--- a/base/testfiles/github-0415.tlg
+++ b/base/testfiles/github-0415.tlg
@@ -2,4 +2,4 @@ This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
LaTeX Info: File `f^^c3^^b6^^c3^^b6.tex' already exists on the system.
Not generating it from this source.
-LaTeX Warning: Writing or overwriting file `./f^^c3^^b6^^c3^^b6.tex'.
+LaTeX Warning: Writing or overwriting file `f^^c3^^b6^^c3^^b6.tex'.
diff --git a/base/testfiles/github-0415.xetex.tlg b/base/testfiles/github-0415.xetex.tlg
index d79dd0dc..594d4546 100644
--- a/base/testfiles/github-0415.xetex.tlg
+++ b/base/testfiles/github-0415.xetex.tlg
@@ -2,4 +2,4 @@ This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
LaTeX Info: File `f^^f6^^f6.tex' already exists on the system.
Not generating it from this source.
-LaTeX Warning: Writing or overwriting file `./f^^f6^^f6.tex'.
+LaTeX Warning: Writing or overwriting file `f^^f6^^f6.tex'.
diff --git a/base/testfiles/github-0504.luatex.tlg b/base/testfiles/github-0504.luatex.tlg
index 8ff0887a..8de6ff2b 100644
--- a/base/testfiles/github-0504.luatex.tlg
+++ b/base/testfiles/github-0504.luatex.tlg
@@ -1,6 +1,6 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
-LaTeX Warning: Writing or overwriting file `./myexpl3pkg.sty'.
+LaTeX Warning: Writing or overwriting file `myexpl3pkg.sty'.
\openout127 = myexpl3pkg.sty
space catcode before loading myexpl3pkg=10
(myexpl3pkg.sty
diff --git a/base/testfiles/github-0504.tlg b/base/testfiles/github-0504.tlg
index e145d942..d240b304 100644
--- a/base/testfiles/github-0504.tlg
+++ b/base/testfiles/github-0504.tlg
@@ -1,6 +1,6 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
-LaTeX Warning: Writing or overwriting file `./myexpl3pkg.sty'.
+LaTeX Warning: Writing or overwriting file `myexpl3pkg.sty'.
space catcode before loading myexpl3pkg=10
(myexpl3pkg.sty
Package: myexpl3pkg ....-..-.. v... Testing
diff --git a/base/testfiles/github-0917+0958.luatex.tlg b/base/testfiles/github-0917+0958.luatex.tlg
new file mode 100644
index 00000000..b5e16753
--- /dev/null
+++ b/base/testfiles/github-0917+0958.luatex.tlg
@@ -0,0 +1,27 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+LaTeX Warning: Writing or overwriting file `./github-0917+0958-file.tex'.
+\openout127 = ./github-0917+0958-file.tex
+(github-0917+0958-file.tex
+in github-0917+0958-file.tex
+)
+LaTeX Warning: Writing or overwriting file `./././github-0917+0958-file.tex'.
+\openout127 = ./././github-0917+0958-file.tex
+(./github-0917+0958-file.tex
+in ././github-0917+0958-file.tex
+)
+LaTeX Info: File `./github-0917+0958-file.tex' already in current directory.
+ Not generating it from this source.
+(github-0917+0958-file.tex
+in ././github-0917+0958-file.tex
+)
+LaTeX Info: File `./github-0917+0958-file.tex' already in current directory.
+ Not generating it from this source.
+(github-0917+0958-file.tex
+in ././github-0917+0958-file.tex
+)
+LaTeX Info: Writing or overwriting file `./github-0917+0958-file.tex'.
+\openout127 = ./github-0917+0958-file.tex
+(github-0917+0958-file.tex
+in github-0917+0958-file.tex forced silent
+)
diff --git a/base/testfiles/github-0917+0958.lvt b/base/testfiles/github-0917+0958.lvt
new file mode 100644
index 00000000..803a276c
--- /dev/null
+++ b/base/testfiles/github-0917+0958.lvt
@@ -0,0 +1,38 @@
+\documentclass{article}
+
+\input{test2e}
+
+\START
+
+\begin{filecontents}[nosearch,force]{\jobname-file.tex}
+\typeout{in \jobname-file.tex}
+\end{filecontents}
+
+\input{\jobname-file.tex}
+
+\begin{filecontents}[nosearch,force]{././\jobname-file.tex}
+\typeout{in ././\jobname-file.tex}
+\end{filecontents}
+
+\input{././\jobname-file.tex}
+
+\begin{filecontents}[nosearch]{\jobname-file.tex}
+\typeout{in \jobname-file.tex not forced}
+\end{filecontents}
+
+\input{\jobname-file.tex}
+
+\begin{filecontents}[nosearch,silent]{\jobname-file.tex}
+\typeout{in \jobname-file.tex not forced silent}
+\end{filecontents}
+
+\input{\jobname-file.tex}
+
+\begin{filecontents}[nosearch,force,silent]{\jobname-file.tex}
+\typeout{in \jobname-file.tex forced silent}
+\end{filecontents}
+
+\input{\jobname-file.tex}
+
+
+\END
diff --git a/base/testfiles/github-0917+0958.tlg b/base/testfiles/github-0917+0958.tlg
new file mode 100644
index 00000000..063ece9b
--- /dev/null
+++ b/base/testfiles/github-0917+0958.tlg
@@ -0,0 +1,24 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+LaTeX Warning: Writing or overwriting file `./github-0917+0958-file.tex'.
+(github-0917+0958-file.tex
+in github-0917+0958-file.tex
+)
+LaTeX Warning: Writing or overwriting file `./././github-0917+0958-file.tex'.
+(./github-0917+0958-file.tex
+in ././github-0917+0958-file.tex
+)
+LaTeX Info: File `./github-0917+0958-file.tex' already in current directory.
+ Not generating it from this source.
+(github-0917+0958-file.tex
+in ././github-0917+0958-file.tex
+)
+LaTeX Info: File `./github-0917+0958-file.tex' already in current directory.
+ Not generating it from this source.
+(github-0917+0958-file.tex
+in ././github-0917+0958-file.tex
+)
+LaTeX Info: Writing or overwriting file `./github-0917+0958-file.tex'.
+(github-0917+0958-file.tex
+in github-0917+0958-file.tex forced silent
+)
diff --git a/base/testfiles/tlb-filename-01.luatex.tlg b/base/testfiles/tlb-filename-01.luatex.tlg
index 1753dbd1..1d7d8487 100644
--- a/base/testfiles/tlb-filename-01.luatex.tlg
+++ b/base/testfiles/tlb-filename-01.luatex.tlg
@@ -6,7 +6,7 @@ l. ...\showthe\wd0
2: no
> 0.0pt.
l. ...\showthe\wd0
-LaTeX Warning: Writing or overwriting file `./file here.txt'.
+LaTeX Warning: Writing or overwriting file `file here.txt'.
\openout127 = file here.txt
3: yes
> 0.0pt.
diff --git a/base/testfiles/tlb-filename-01.tlg b/base/testfiles/tlb-filename-01.tlg
index 0aea1de2..e9f104dd 100644
--- a/base/testfiles/tlb-filename-01.tlg
+++ b/base/testfiles/tlb-filename-01.tlg
@@ -6,7 +6,7 @@ l. ...\showthe\wd0
2: no
> 0.0pt.
l. ...\showthe\wd0
-LaTeX Warning: Writing or overwriting file `./file here.txt'.
+LaTeX Warning: Writing or overwriting file `file here.txt'.
3: yes
> 0.0pt.
l. ...\showthe\wd0
More information about the latex3-commits
mailing list.