Folks,
I mention @pmario and @jeremyruston as we have had related discussion in the past.
I am making some adjustments to my reimagine-tags solution as a result of the discussion here Italicize tag iff there's no tiddler there (tag itself is "missing") so if the tags tiddler does not exist the tag pill will show italics.
- To do this I face the common dilemma that to make reimagine-tags to work I have to change the behaviour of a number of tag macros and its tag pill template $:/core/ui/TagTemplate
- I realised since I have rewritten the tag macro that uses $:/core/ui/TagTemplate I can clone it to $:/PSaT/reimagine-tags/$:/core/ui/TagTemplate and change the reference to it.
- Note my use of the core tiddler name but with the prefix of my package
Then I realised I can also avoid overwriting the tag macros by also cloning
$:/core/macros/tag to $:/PSaT/reimagine-tags/$:/core/macros/tag and making my changes.
- Again Note my use of the core tiddler name but with the prefix of my package
- Its best to set list-after to the macro tiddler it replaces, so the macro tags to be the last definition tiddlywiki uses from $:/tags/Macro, thus without changing the core macros tiddler I override the macros within it.
The point?
We still can face the issue of the fact more than one package may redefine the tag macros however the advantages of this approach are;
- I don’t actually change core tiddlers with my solution, I don’t overwrite core tiddlers
- My tiddlers that override the normal behaviour are more obvious because thier core tiddlers title is still in the name but with my packages prefix.
- This allows me to indicate in my tiddlers the source tiddler ie the core tiddler name, and I have a custom preview that lets me preview the differences.
- An advantage here is I am comparing my tiddler with the Current tiddlywiki core version.
- If something else overrides the core macros I can
- Review the differences
- Restore my reimagine-tags version by overriding them again
Futures
It seem to me we could adopt a defacto standard to do this when making modifications to core tiddlers, which offers not only the above improvements and visibility of such changes but may also give us the possibility of one day creating a tool to apply changes to core tiddlers from multiple packages, manually if not semi-automated.
Final note;
We should always push changes to the core that allow hackability of core tiddlers without redefining them and permit multiple solutions to implement changes without touching the core
- For example tags without a tag tiddler showing italics in the tag pill is best moved to the core, so I dont need to include it in my package.
but when we do touch the core this approach is I believe superior.