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

Make appending operator more efficient #437

Closed
7 tasks done
Witiko opened this issue Apr 24, 2024 · 1 comment · Fixed by #438
Closed
7 tasks done

Make appending operator more efficient #437

Witiko opened this issue Apr 24, 2024 · 1 comment · Fixed by #438
Assignees
Labels
expl3 Related to the high-level programming language expl3 plaintex Related to the plain TeX interface and implementation speed Related to speed improvements technical debt Related to code smells and refactoring
Milestone

Comments

@Witiko
Copy link
Owner

Witiko commented Apr 24, 2024

In #435, we added support for appending to token renderers and renderer prototypes. However, the current implementation requires an extra token list for each token renderer and renderer prototype that stores a copy of the current definition. This is error-prone, since it silently discards any changes to token renderers and renderer prototypes from outside the \markdownSetup command. Furthermore, it is also unnecessary, since we can append directly to the replacement text of token renderers and renderer prototypes as long as the commands are simple unprotected \defs with undelimited parameters, as shown on TeX StackExchange by @eg9, @gucci-on-fleek, @Skillmon and me.

Tasks

  • Define function \@@_tl_set_from_cs:NNn following the discussion on TeX StackExchange.
  • Remove the extra token list used in appending to token renderers and renderer prototypes.
  • Remove error messages failed-to-append-renderer and failed-to-append-renderer-prototype.
  • Acknowledge @eg9 and @gucci-on-fleek in CHANGES.md.
  • Apply @Skillmon's suggestions and acknowledge @Skillmon in CHANGES.md.
  • Document function \@@_tl_set_from_cs:NNn in the technical documentation.
  • Use the appending operator in the testing framework.
@Witiko Witiko added plaintex Related to the plain TeX interface and implementation technical debt Related to code smells and refactoring expl3 Related to the high-level programming language expl3 speed Related to speed improvements labels Apr 24, 2024
@Witiko Witiko added this to the 3.5.0 milestone Apr 24, 2024
@Witiko Witiko self-assigned this Apr 24, 2024
@Witiko
Copy link
Owner Author

Witiko commented Apr 25, 2024

If time permits, we may also want to add the function \tl_set_from_cs:NN and its variants discussed on TeX StackExchange to the l3tl module of latex3/latex3 and open a PR. If merged, we should then mark our function \@@_tl_set_from_cs:NNn for removal after we have ceased to support TeX Live 2023.

Witiko added a commit that referenced this issue Apr 25, 2024
As discussed in
<#437 (comment)>.

Co-Authored-By: Enrico Gregorio <Enrico.Gregorio@univr.it>
Witiko added a commit that referenced this issue Apr 27, 2024
As discussed in
<#437 (comment)>.

Co-Authored-By: Max Chernoff <mseven@telus.net>
Witiko added a commit to Witiko/latex3 that referenced this issue Apr 28, 2024
As discussed at the following places:
- <https://tex.stackexchange.com/q/716362/70941>
- <Witiko/markdown#437>
- <Witiko/markdown#438>

Co-Authored-By: Enrico Gregorio <Enrico.Gregorio@univr.it>
Co-Authored-By: Max Chernoff <mseven@telus.net>
Co-Authored-By: Jonathan P. Spratte <jspratte@yahoo.de>
Witiko added a commit to Witiko/latex3 that referenced this issue Apr 28, 2024
As discussed at the following places:
- <https://tex.stackexchange.com/q/716362/70941>
- <Witiko/markdown#437>
- <Witiko/markdown#438>

Co-Authored-By: Enrico Gregorio <Enrico.Gregorio@univr.it>
Co-Authored-By: Max Chernoff <mseven@telus.net>
Co-Authored-By: Jonathan P. Spratte <jspratte@yahoo.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expl3 Related to the high-level programming language expl3 plaintex Related to the plain TeX interface and implementation speed Related to speed improvements technical debt Related to code smells and refactoring
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant