Folks,
A quick look at $:/core/modules/wiki.js
and $:/core/modules/filters/is/system.js
makes me wonder how hard it would be to redefine the function to allow other tiddler prefixes to enter the list of “system tiddlers”. The existing is
and all
test remain used through out TiddlyWiki but now would include amongst them the new prefix(s), and do not appear when using !is[system]]
?
- This would allow the addition of additional prefixes for data tiddlers, index tiddlers and other that designers may appreciate, without needing to modify the core all over the place.
- I am a script kiddy with JavaScript but it looks to me this may be a trivial customisation, but the ability to provide a user mechanism to add prefixes to the definition of system may be very useful.
- I did try a hack but my regular expressions are also weak.
Why?
Filters are the core functionality of TiddlyWiki and dividing tiddlers between system and non-system is a key feature, basically they are hidden in the standard search and are somewhat hidden from the user. It would be nice to allow a little more flexibility here to the designer.
- As it stands system tiddlers often become quite long, due to the need to prefix with both $:/ and appropriate subtitle/folder structure so as to avoid clashes.
- Existing code already makes this differentiation through the is system and all system operators so it makes sense to leverage this.
- Of course other novel namespaces will appear in the non-system namespaces as needed.
I asked once to also be able to extend the is and all operators so we could add something like is[data]
, and I would still like this, but it was suggested this would “overload” the operators.
- I doubt more than a few would ever be needed, but regardless
- I do not think is as complex to simply permit more prefixes to match or not match is[system] all[system] !is[system] !all[system]
Your thoughts? and skills for a POC?