Open jlaurens opened 2 years ago
This issue has been automatically marked as stale because it has not had recent activity.
I support that. Working on the 'nodetree' debugging tool, which non-intrusively tries to analyze callbacks, I will have to add a lot of extra code to add observers before and after the actual callback to circumvent the 'exclusive' type.
This issue has been automatically marked as stale because it has not had recent activity.
Having a general function for this comes with the issue that different exclusive callbacks behave rather different and also need quite different handling.
E.g. linebreak_filter
does not need any additional callbacks (you can just use pre_/post_linebreak_filter
), the find_..._file
callbacks need interceptors both before and after the callback (to see both the original and looked up name) and potentially need a way to modify the values, open_read_file
can't be observed without completely changing how file reading works with potentially significant performance implications.
Therefore these need some individual handling similar to what is done for mlist_to_hlist
. Please add explicit feature requests with usecases which callbacks are useful to observe and which values you are interested in.
Brief outline of the enhancement
Due to exclusiveness, there can't be 2 different callbacks for the
find_read_file
key. It would be great if we had the possibility to have simple callbacks next to the exclusive one. That would allow, for example, to simply collect the file names independently.Something like
add_simple_to_callback
,remove_simple_from_callback
would help on the API side.