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

Missing 'show' commands #241

Closed
blefloch opened this issue Jul 31, 2015 · 3 comments
Closed

Missing 'show' commands #241

blefloch opened this issue Jul 31, 2015 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@blefloch
Copy link
Member

Some types (which have a \<type>_new:N function) do not have \<type>_show:N. Same with _show: replaced by _log: for outputting just to the log file instead of the terminal.

\coffin_show:Nnn could do a combination of \coffin_show_structure:N (showing the height, depth, width of box, and positions and directions of poles) and of \box_show:Nnn (showing the coffin's actual contents, with particular values of \showboxbreadth and \showboxdepth).

\ior_show:N would help determine whether a stream is open/closed and what file is currently open. If this is added, I think \ior_list_streams: should be renamed to \ior_show_all: or something similar. Same for iow.

\msg_show:nn could make sense, to debug messages, but I doubt I'll ever come across a need for that, and \msg_log:nn is already defined to do something else.

Fitting in this issue, we could also add \group_show_list: (copy of \showgroups), and \group_show_current: (based on \currentgrouptype and \currentgrouplevel). Same with group replaced by if.

@blefloch
Copy link
Member Author

Some code (not checked) that I had lying around in a file, related to this issue.

\cs_new_eq:NN \ior_show_all: \ior_list_streams:
\cs_new_eq:NN \iow_show_all: \iow_list_streams:
\cs_new_protected:Npn \ior_show:N #1
  {
    \prop_get:NVNF \g__ior_streams_prop #1 \l__ior_internal_tl
      { \tl_set:Nn \l__ior_internal_tl { Not~assigned } }
    \exp_args:NV \tl_show:n \l__ior_internal_tl
  }
\cs_new_protected:Npn \iow_show:N #1
  {
    \prop_get:NVNTF \g__iow_streams_prop #1 \l__iow_internal_tl
      { \tl_set:Nn \l__iow_internal_tl { Not~assigned } }
    \exp_args:NV \tl_show:n \l__iow_internal_tl
  }
\cs_new_protected_nopar:Npn \group_show_all:
  { \exp_args:NNV \__group_show:Nn \c_one \tex_tracingonline:D }
\cs_new_protected_nopar:Npn \group_log_all:
  { \exp_args:NNV \__group_show:Nn \c_zero \tex_tracingonline:D }
\cs_new_protected:Npn \__group_show:Nn #1#2
  {
    \int_set_eq:NN \tex_tracingonline:D #1
    \exp_after:wN \scan_stop: % used to improve output appearance.
    \etex_showgroups:D
    \int_set:Nn \tex_tracingonline:D {#2}
  }

@blefloch blefloch self-assigned this Jul 31, 2015
@josephwright
Copy link
Member

I've no problem with \coffin_show:N(nn), as I guess we need to avoid saying 'use \box_show:N(nn) to see the content of a coffin'. I do wonder, though, how common a use case this is (as most of the time what you want from a coffin is the pole structure).

Messages aren't meant to be variables in the sense that they need a show function: if people want to see the text of a message they can always use \msg_log:nn anyway.

We had a message a while ago which included a question about the nature of ior/iow streams: perhaps worth thinking about that before altering?

@FrankMittelbach
Copy link
Member

Am 31.07.15 um 18:15 schrieb Bruno Le Floch:

|\ior_show:N| would help determine whether a stream is open/closed and
what file is currently open. If this is added, I think
|\ior_list_streams:| should be renamed to |\ior_show_all:| or
something similar. Same for |iow|.
A while ago I made some fairly comprehensive list of command name
structures for the main modules (what words are being used and how
consistently (it is an xls in the svn)

a) i guess it makes sense to extend that table with additional modules
not yet covered
b) check against what is there already to see that this all fits

back then I found quite a number of things not really matching many of
which we fixed afterwards

@josephwright josephwright added expl3 enhancement New feature or request labels Sep 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants