Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\tracingnone resets too much #549

Closed
PhelypeOleinik opened this issue Apr 20, 2021 · 9 comments
Closed

\tracingnone resets too much #549

PhelypeOleinik opened this issue Apr 20, 2021 · 9 comments

Comments

@PhelypeOleinik
Copy link
Member

Brief outline of the enhancement

Currently \tracingnone resets all TeX's tracing parameters to zero, which may be a nuisance if a document wants them on throughout, so changing \tracingnone should restore the tracing parameters to what they were before the \tracingall instead.

Minimal example showing the current behaviour

See how \nullfont b doesn't throw an error (whereas it probably should due to the setting in the preamble).

\RequirePackage{latexbug}
\documentclass{article}
\tracinglostchars=3 % I want \tracinglostchars=3 throughout the document
\begin{document}
\nullfont a

\tracingall
% <some debugging>
\tracingnone

\nullfont b % no longer errors
\end{document}

Minimal example showing the desired new behaviour

\tracingall/none could take an approach similar to what \ExplSyntaxOn/Off do for catcodes: Normally \tracingnone is a no-op, then \tracingall defines \tracingnone on-the-fly to reset the tracing parameters to what they were when \tracingall was issued (with proper handling of two consecutive \tracingall). Here's a sample for some of the parameters:

\RequirePackage{latexbug}
\documentclass{article}
\tracinglostchars=3 % I want \tracinglostchars=3 throughout the document

\let\tracingnone\relax
\def\tracingall{%
  \edef\tracingnone{%
    \tracinglostchars=\the\tracinglostchars\relax
    \tracingmacros=\the\tracingmacros\relax
    \tracingonline=\the\tracingonline\relax
    % and more
    \let\noexpand\tracingnone\relax
  }
  \tracinglostchars=3
  \tracingmacros=2
  \tracingonline=1
  % and more
}

\begin{document}
\nullfont a

\tracingall
% <some debugging>
\tracingnone

\nullfont b % no longer errors
\end{document}
@stale
Copy link

stale bot commented Jun 28, 2021

This issue has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the stale label Jun 28, 2021
@stale stale bot removed the stale label Aug 20, 2021
@stale
Copy link

stale bot commented Oct 22, 2021

This issue has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the stale label Oct 22, 2021
@FrankMittelbach FrankMittelbach modified the milestones: Release 2022 Spring, Release 2022 Fall May 19, 2022
@stale stale bot removed the stale label May 19, 2022
@stale
Copy link

stale bot commented Aug 13, 2022

This issue has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the stale label Aug 13, 2022
@josephwright josephwright modified the milestones: Release 2022 Fall, Release 2023 Spring Nov 8, 2022
@stale stale bot removed the stale label Nov 8, 2022
@stale
Copy link

stale bot commented Jan 7, 2023

This issue has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the stale label Jan 7, 2023
@eg9
Copy link
Contributor

eg9 commented Jun 20, 2023

\tracingnone does what the name implies. Maybe something like \tracinglostchars might be retained, because it's a somewhat different kind of tracing.

Maybe \tracingrevertstatus?

I don't think it's a very important subject anyway: if one needs \tracingall, they're in trouble, but probably know what tracing is about.

@stale stale bot removed the stale label Jun 20, 2023
@muzimuzhi
Copy link
Contributor

Or introducing a new pair of commands \TracingAllOne and \TracingAllOff? Currently trace package provides \traceon and \traceoff.

@FrankMittelbach
Copy link
Member

I'm not a fan of introducing new command names for tracing that aren't really going to provide much benefit if any. I asked for not resetting tracinglostchars simply because until now \tracingnone was reverting the tracing to the LaTeX default state while after the change done some time ago it reverted to the initex state which in the LaTeX situation is not useful.
In my opinion it should revert to whatever LaTeX considers the default non-tracing status even if technically it is not exactly "none".

@josephwright josephwright removed this from the Release 2023 Spring milestone Oct 24, 2023
@josephwright josephwright added this to the Release Spring 2024 milestone Oct 24, 2023
FrankMittelbach added a commit that referenced this issue Nov 7, 2023
FrankMittelbach added a commit that referenced this issue Nov 7, 2023
* fix for #549

* \tracingnone shows up in some tests
Copy link

This issue has been automatically marked as stale because it has not had recent activity.

@github-actions github-actions bot added the stale label Dec 24, 2023
@josephwright josephwright removed the stale label Jun 4, 2024
jlaurens pushed a commit to jlaurens/latex2e that referenced this issue Jun 6, 2024
* fix for latex3#549

* \tracingnone shows up in some tests
@FrankMittelbach
Copy link
Member

This will get resolved with #1687 so we can close here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

5 participants