ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: output of token.command_name() [was: Ctx: list of commands]
Date: Tue, 18 Sep 2012 12:25:06 +0200	[thread overview]
Message-ID: <50584C02.7030907@wxs.nl> (raw)
In-Reply-To: <20120918095253.GA9686@phlegethon>

On 18-9-2012 11:52, Philipp Gesang wrote:
> ···<date: 2012-09-18, Tuesday>···<from: Hans Hagen>···
>
>> On 17-9-2012 21:29, Philipp Gesang wrote:
>>> ···<date: 2012-09-17, Monday>···<from: Procházka Lukáš Ing. - Pontex s. r. o.>···
>>>
>>>> Hello,
>>>>
>>>> 1) is there a Ctx command/switch which would generate list of all current ConTeXt commands? E.g.
>>>
>>> Hi Lukáš, if you interpret “current Context commands” as “macros
>>> known to TeX”, you may try dumping the hashtable with these lines:
>>>
>>> ·······································································
>>> \starttext
>>>    \startluacode
>>>      table.print(tex.hashtokens())
>>>    \stopluacode
>>> \stoptext
>>> ·······································································
>>
>> or
>>
>> \enabledirectives[system.dumphash]
>>
>> \enabledirectives[system.dumpdelta]
>
> In trackers.dumphashtofile(), you use the Luatex function
> token.commandname(). Among others, it returns a category
> “undefined_cs”. Are those the macros that have been defined and
> invalidated, but are kept on the hash anyways because of some
> issues involving \gdef?
>
> (I remember reading about this in “TeX the Program” but I can’t
> look it up right now as it is buried somewhere deep inside a book
> crate.)

well, undefined is still defined but with meaning 'undefined' ... indeed 
all stays in the hash .. harmless

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2012-09-18 10:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-17 13:40 Ctx: list of commands Procházka Lukáš Ing. - Pontex s. r. o.
2012-09-17 13:56 ` Marco Patzer
2012-09-17 14:20   ` Sietse Brouwer
2012-09-17 15:11     ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-09-17 19:29 ` Philipp Gesang
2012-09-17 22:24   ` Hans Hagen
2012-09-18  9:52     ` output of token.command_name() [was: Ctx: list of commands] Philipp Gesang
2012-09-18 10:25       ` Hans Hagen [this message]
2012-09-18  6:44   ` Ctx: list of commands Procházka Lukáš Ing. - Pontex s. r. o.
2012-09-18  7:36     ` Peter Münster
2012-09-18  7:44       ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-09-18  8:28     ` Hans Hagen
2012-09-18 13:49     ` Rogers, Michael K
2012-09-18 14:00       ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-09-18 14:59         ` Hans Hagen
2012-09-18 16:44           ` Sietse Brouwer
2012-09-18 17:52             ` Hans Hagen
2012-09-18 14:58       ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50584C02.7030907@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).