TiddlyWiki5 icon indicating copy to clipboard operation
TiddlyWiki5 copied to clipboard

[BUG] User Defined Filter Operators Using Functions Do Not Work When Used in Filter Expression in FileSystemPaths

Open kookma opened this issue 1 year ago • 5 comments

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

kookma avatar Aug 28 '24 16:08 kookma

Globals are not available in the evaluation of file system paths.

saqimtiaz avatar Aug 28 '24 16:08 saqimtiaz

Is it true for $:/tags/Macro? or other tiddler names? like [preifx{myTiddler}]?

kookma avatar Aug 28 '24 16:08 kookma

All global variables are not available when evaluating $:/config/FileSystemPaths

saqimtiaz avatar Aug 28 '24 16:08 saqimtiaz

Thank you for clarification! I keep this open as a hint for other potential users.

kookma avatar Aug 28 '24 16:08 kookma

@kookma I think that we should try and resolve this by providing support for globals in file system path filters. See #8544

saqimtiaz avatar Aug 28 '24 17:08 saqimtiaz

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

pmario avatar Aug 06 '25 13:08 pmario