Oh, I was just asking about

luatexbase.add_to_callback
("process_input_buffer", blabla, "blabla" )


and

luatexbase.remove_from_callback
("process_input_buffer", "blabla" )

LuaLaTeX users do that way and I want to be sure it won't interfere with ConTeXt way of doing things so I can play with the suggestion made by Luigi.

Regards,

Jairo :) 

El lun., 29 de jun. de 2020 a la(s) 08:27, Hans Hagen (j.hagen@xs4all.nl) escribió:
On 6/29/2020 12:21 PM, Jairo A. del Rio wrote:
> Wouldn't it be slow for larger documents? I will try anyway. By the way,
> I've seen Lua(La)TeX users recurring to callbacks (process input buffer)
> to make string replacements and I've done so myself sometimes. Does
> ConTeXt do preprocessing the same way or is a better alternative
> possible? Thank you very much.
You mean "Does context use callbacks?" You can bet on that. It is how we
came to implementing callbacks (over a decade ago now, Taco and I spend
quite some time exploring all these things in the process of luatex dev
... fond memories and so).

I don't know what latex does but context doesn't do much input
processing apart from some unicode related juggling. There are plenty of
ways to hook in additional processing but there are multiple ways to
solve problems. Most of these mechanism in context are already pretty
old and hardly change.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________