> > I'm pretty sure my code works ... there may be more tiddlers than you > think that contain references to a particular tiddler in their list field. >
You are right sorry I was mistaken! You could make a global macro that defines "[[" and "]]" similar to how I > did in my macro. Then you can do something like removeprefix<leftbraces> . > But I think that "get" is treating the entire > contents of the list field as one long tiddler title, so if you have [[My > first tiddler]] [[My second tiddler]] then what is going to generated is > [[My]] [[first]] [[tiddler]] [[My]] [[second]] [[tiddler]]. > I tried this and got My first tiddler]] [[My second tiddler. I think I will just change the way I use the list field in my wiki! Thank you for all your help. On Wednesday, May 29, 2019 at 9:55:13 PM UTC+1, Mark S. wrote: > > I'm pretty sure my code works ... there may be more tiddlers than you > think that contain references to a particular tiddler in their list field. > I'd want to see the data before going further. > > If you have to do it as a filter, I think you're out of luck. > > You could make a global macro that defines "[[" and "]]" similar to how I > did in my macro. Then you can do something like removeprefix<leftbraces> . > But I think that "get" is treating the entire > contents of the list field as one long tiddler title, so if you have [[My > first tiddler]] [[My second tiddler]] then what is going to generated is > [[My]] [[first]] [[tiddler]] [[My]] [[second]] [[tiddler]]. It's > worth a shot, but I don't think it will work. With a regular expresion > string splitter (see PR# 2963) could split on the fly.That might work. > > Sometimes you can do things in two steps. So you could use my code and a > action-setfield widget to tag all the items that matched the criteria > output by the macro. Then you could use *that *tag to do your filtering. > > Good luck! > > On Wednesday, May 29, 2019 at 12:15:30 PM UTC-7, Ed wrote: >> >> Thank you Mark. That doesn't seem to work for me, though I don't >> understand why. >> >> I am not sure it is useful for my case though because I don't think you >> can use wikify within the TiddlyMap custom styling. I think it has to >> just be a filter. >> >> I tried doing [!is[system]] >> -[!is[system]get[list]removeprefix[[[]removesuffix[]]]] but obviously >> there is a problem with using square brackets as parameters. >> >> Is there an escape character to allow square brackets as the parameter of >> a filter? I can't see anything in the docs. >> >> Regards, Ed >> >> On Wednesday, May 29, 2019 at 3:33:39 PM UTC+1, Mark S. wrote: >>> >>> The problem is that there is no equivalent of "get" for "list" fields. >>> So it takes a more complicated approach. You have to output all the items >>> you want to exclude, wikify them, and then substract them. >>> You also have to take steps to turn titles into links that will work in >>> the final filter. Also, there may be a bug in the list operator when used >>> in <$list> loop. It's kind of messy. >>> >>> The following seems to work on my short tests (YMMV) : >>> >>> \define getlists() >>> <$vars pre="[[" suf="]]" left="[" right="]"> >>> <$list filter="[all[tiddlers]!is[system]addsuffix[!!list]]" >>> variable="locallist"> >>> <$list filter="""[list<locallist>addprefix<pre>addsuffix<suf>]"""/> >>> </$list> >>> </$vars> >>> \end >>> >>> <$wikify name="listastext" text=<<getlists>> mode="inline" output="text" >>> > >>> <<list-links """[all[tiddlers]!is[system]] -[enlist<listastext>] >>> +[sort[]]""">> >>> </$wikify> >>> >>> >>> On Wednesday, May 29, 2019 at 4:17:54 AM UTC-7, Ed wrote: >>>> >>>> Thank you Bimlas! >>>> >>>> The problem I have is that many of the entries in the list field are in >>>> double square brackets, so get[list] returns several [[things like >>>> this]]. >>>> >>>> How could I return the tiddler titles without the square brackets? >>>> >>>> On Wednesday, May 29, 2019 at 11:43:57 AM UTC+1, bimlas wrote: >>>>> >>>>> Ed, >>>>> >>>>> Ok, I think I've got the idea: >>>>> >>>>> [!is[system]] -[!is[system]get[list]] >>>>> >>>> >>> -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/52f81aec-0608-4d35-aeb0-aaa88e4e6929%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

