Texmacs is very slow for my literate programming macros which use custom lists.

I've pinned the problem down to the assignment of item-nr. Each named code-chunk can appear in multiple chunklets and has it's own line counter that is shared across all chunklets, so I assign item-nr to contain the counter-so-far before I render the list. (BTW I wish html export also recognized that item-nr may not start at 1):

Assigning item-nr as shown below makes things slow.

<with|...|item-nr|<value|<merge|code-line-|<value|nf-name>|-nr>>|
  ...
<render-list|<arg|body>>
  ...
>

Alternatively, if item-nr is assigned to a literal numeric value, like this:

<with|...|item-nr|29|
  ...
<render-list|<arg|body>>
  ...
>

then everything is fast.

I expect I need to do magic with eval and quasi and so on, but no amount of guessing has worked yet. I think I know that <with...> encloses all assignments in <quote> so I tried using <assign> instead with various incantations of quasi and eval but without success.

I need a master to give me a tip on this.... how can I early evaluate <value|<merge|code-line-|<value|nf-name>|-nr>> to become a numeric value?

Sam

_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to