[BUG] User Defined Filter Operators Using Functions Do Not Work When Used in Filter Expression in FileSystemPaths
Describe the bug
Filter expressions in $:/config/FileSystemPaths if use custom filter operators will not work.
Expected behavior
I defined a custom function in a tiddler tagged with $:/tags/Global
\function move.to.tasks() [tag[task]!tag[done]addprefix[tasks/]
Then in the $:/config/FileSystemPaths I used a filter like below
[has[title]move.to.tasks[]]
It not only does not work, but also makes none of other filter expression to run!
TiddlyWiki Configuration
- TiddlyWiki 5.3.5
- Edge 128
Globals are not available in the evaluation of file system paths.
Is it true for $:/tags/Macro? or other tiddler names? like [preifx{myTiddler}]?
All global variables are not available when evaluating $:/config/FileSystemPaths
Thank you for clarification! I keep this open as a hint for other potential users.
@kookma I think that we should try and resolve this by providing support for globals in file system path filters. See #8544
Also related: https://talk.tiddlywiki.org/t/customizing-tiddler-names-doesnt-support-constructor-filter-expressions-does-it/13156
I’ve changed my approach. I’ve now added specific fields to all these tiddlers, and I’m using those fields to filter them, which results in the correct categorization. The Saq response explained part of this, but I think more clarification is needed. This information should be written in the documentation; otherwise, other issues might arise, such as the problem with the tagging filter expression mentioned above