Hi Andreas

> Obviously using that trick yourself is totally fine for all practical
> purposes, it was merely a side note for Jeremy (and others) that those
> filter injection tricks are not user-friendly for new TW users but when
> people tend to do this to get more complex behaviour out of a macro, they
> will inevitably get in touch with this and it will be very confusing for
> them.
>

I've found working on the core macros (toc, tabs etc) quite liberating. The
fact that it's so easy for an end user to copy and modify the macros
relieves the normal pressure to try to cater for every edge case. So, in
this case I think it's probably right that the toc macro takes a tag,
rather than a filter. It allows for the trick discussed here, but keeps the
macro itself clean and simple.

Anyhow, one prediction for the future is that I think we'll see an awful
lot of macros in the general area of creating hierarchical views of tiddler
relationships...

Best wishes

Jeremy


>
> On the other hand, please don't ruin this beautiful macro by adding
> useless parameters :D
>
> /Andreas
>
>
> Am 03.09.2014 03:38, schrieb David Gifford:
>
>  Thanks Andreas,
>
>  Your
>
>  I am curious why you say it will not make for a good end-user experience
> whatsoever, since the end result of the toc will be the same.
>
>  Blessings
>
> Dave
>
>
> On Tue, Sep 2, 2014 at 8:01 PM, Andreas Hahn <www.gal...@googlemail.com>
> wrote:
>
>>  Hi David,
>>
>> the toc macro does not actually accept a filter expression as its first
>> parameter, but instead just a tag that is then filled into a filter
>> expression. Within the toc-macro, the list widget is invoked with the
>> following filter exp:
>>
>> <$list filter="[tag[$tag$]$sort$]">
>>
>> $tag$ is the first parameter, so your
>>
>> <<toc-selective-expandable '[tag[GettingStarted]!tag[$:/Note]]'>>
>>
>> leads to it being filled in like this:
>>
>> <$list filter="[tag[[tag[GettingStarted]!tag[$:/Note]]]]">
>>
>> And this is obviously not a well-formed filter expression. However this
>> is not the end of the line. To make
>> your filter work, you can do a filter injection by doing
>>
>> <<toc-selective-expandable 'GettingStarted]!tag[$:/Note'>>
>>
>> so that it becomes
>>
>> <$list filter="[tag[GettingStarted]!tag[$:/Note]">
>>
>> which will work but doesn't make for good end-user experience whatsoever.
>>
>> /Andreas
>>
>>
>> Am 03.09.2014 00:46, schrieb David Gifford:
>>
>> Why would both this:
>>
>> <div class='tc-table-of-contents'>
>> <<toc-selective-expandable "[tag[GettingStarted]!tag[$:/Note]]">>
>> </div>
>>
>> and this
>>
>> <div class='tc-table-of-contents'>
>> <<toc-selective-expandable '[tag[GettingStarted]!tag[$:/Note]]'>>
>> </div>
>>
>> result in this:
>>
>> Filter error: Syntax error in filter expression
>>
>> and how do I get it to work? (Make a TOC of all tiddlers that have the
>> tag GettingStarted but not the tag $:/Note)
>>
>> p.s. I realize the new CSS is tc-toc. I am using a stylesheet where I
>> have changed the old tc-table-of-contents to suit my tastes here.
>>  --
>> 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 tiddlywiki+unsubscr...@googlegroups.com.
>> To post to this group, send email to tiddlywiki@googlegroups.com.
>> Visit this group at http://groups.google.com/group/tiddlywiki.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>  --
>> 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/gV-J8Nf_oio/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> tiddlywiki+unsubscr...@googlegroups.com.
>> To post to this group, send email to tiddlywiki@googlegroups.com.
>> Visit this group at http://groups.google.com/group/tiddlywiki.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> David Gifford
> Christian Reformed World Missions, Mexico City
>  --
> 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 tiddlywiki+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>
>
>  --
> 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 tiddlywiki+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to