Filter request: "except those transcluded in the" current tiddler

145 views
Skip to first unread message

David Gifford

unread,
Jun 15, 2021, 10:36:39 AM6/15/21
to TiddlyWiki
Hi all

I need another list filter:

...minus any tiddlers transcluded in the" current tiddler.

Use case: I plan to use transclusions to build long "article" tiddlers, with section headers and specific ordering of the transclusions. But as I take notes, I want to tag note tiddlers with the article(s) they will be transcluded in.

So in edit template, I want a list at the bottom of the tiddlers tagged to the current tiddler [all[current]tagging[]], minus the tiddlers I have already transcluded in the current tiddler. That way I can see which tiddlers still need transcluding.

Thanks for any help with this. It doesn't look very straightforward. There doesn't seem to be a way to do -[all[current]transcluding[]] yet. Maybe in 5.1.25?

Blessings,

Si

unread,
Jun 16, 2021, 10:27:16 AM6/16/21
to TiddlyWiki
Hi David,

I've been planning to do something similar in my own wiki. I can't think of a way to do it with a single filter expression, but here is a very clunky approach:

<$list filter="[tag<currentTiddler>] [tag{!!draft.of}]" variable=tagged-tiddler>
    <$vars search-term={{{ [<tagged-tiddler>addprefix[{{]addsuffix[}}]] }}}>
        <$list filter="[<currentTiddler>!search<search-term>]">
            <$link to=<<tagged-tiddler>>><<tagged-tiddler>></$link>
            <br>
        </$list>
    </$vars>
</$list>

This should work in both edit and view mode, but you can easily simplify the first filter expression if you only need it to work in edit mode.

There's probably a more elegant approach out there but this seems to work.
Message has been deleted

Si

unread,
Jun 16, 2021, 10:37:44 AM6/16/21
to TiddlyWiki
Just realized the search filter should probably be more like this: [<currentTiddler>!search:text:literal,casesensitive<search-term>]

David Gifford

unread,
Jun 16, 2021, 11:08:29 AM6/16/21
to tiddl...@googlegroups.com
Yes! A big "¡Sí!" to si! Thanks, works great!




--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/EnyDD7GseG0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d70cb040-fa23-407b-9dcd-c9edf4b36210n%40googlegroups.com.

David Gifford

unread,
Jun 16, 2021, 12:20:37 PM6/16/21
to TiddlyWiki

Soren Bjornstad

unread,
Jun 16, 2021, 6:09:12 PM6/16/21
to TiddlyWiki
I'd like to draw attention to this PR that's been sitting for about a year due to needed improvements:

By making transclusion into a first-class citizen that TiddlyWiki keeps track of, it would produce an elegant solution for this problem and many others. 

Si

unread,
Jun 18, 2021, 6:28:08 AM6/18/21
to TiddlyWiki
@Soren Yes I too would love to see this added, it would be very handy.

TW Tones

unread,
Jun 20, 2021, 9:24:56 PM6/20/21
to TiddlyWiki
Folks,

The solution is in this thread, however there is value dividing the problem.

First construct a custom filter to extract and list transclusions within the current tiddler eg has {{ }} brackets, you can split on | (use \define pipe() | ) and get the last value (not }}). 

Once you have this list you can use it to exclude those tiddlers from the larger list.

Regards
Tones

Reply all
Reply to author
Forward
0 new messages