Does $:/tags/Macro still work with procedures as macros

Hi All,

I was looking at the latest changes in github after working on a possible change to $:/core/macros/tree among which was updating the syntax to use \procedure. Not surprising someone has already done this… however

During the testing of my updates I found that I had to add $:/tags/Global to the tiddler in order for it to work (as per the docs on Procedure Definitions ) … This has not been done to the change in github - it still has the tiddler tagged with $:/tags/Macro.

So I thought I’d check here if anyone else has noticed this or confirm which is the correct approach. If I’m right that change may need to be reversed

Cheers
CB

The core shadow $:/core/config/GlobalImportFilter contains:

[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global]!is[draft]]

and $:/core/ui/PageTemplate then imports:

\import [subfilter{$:/core/config/GlobalImportFilter}]

Similar “dual tag” recognition is also found in $:/core/ui/ViewTemplate:

\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View]!is[draft]]

and in $:/core/ui/ViewTemplate/body

\import [all[shadows+tiddlers]tag[$:/tags/Macro/View/Body]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View/Body]!is[draft]]

Thus, in all core use-cases, both $:/tags/Macro* and $:/tags/Global* are handled in the same manner. This was done for backward compatibility to permit existing wikitext code to continue to function without requiring re-tagging.

It’s not clear to me why your testing needed the $:/tags/Global tag rather than working with the existing $:/tags/Macro tag… unless perhaps you are using an older version of the core that pre-dates the use of $:/core/config/GlobalImportFilter to import the \procedure definitions.

-e

Thanks Eric

I’ll check those configs on my setup when I test this again.

I am using the latest version on Tiddlyhost first and then have the latest from github so that can’t be it - Looking at it may be down to having a draft open when i was testing …maybe ?

I also found ( again maybe just me) that \import could not be used to bring in procedure defs from another specified tiddler and I had to use the <$importvariables> widget instead … another thing I’ll retest and update here.