I don't think this would have worked at all without wikify. The tricky 
thing is, just because you see text on screen doesn't mean that you can 
pass it to a macro.

So you see
 
[tag[tag1]] [tag[tag2]] -[tag[tag3]] 

but that's a rendering illusion. Because it was made inside of loops, 
what's actually there is something like:


"[tag[tag1]]"#"[tag[tag2]]"#"-[tag[tag3]]"

where # is some sort of white space character (possible even new line 
characters).

This sort of thing would leave you banging your head for hours before the 
Wikify widget. Now you can just turn the "perceived" text into a real text 
string and pass it to a variable.

This syntax:

<<list-links filter:"<<displaymyfilter>>" >>

would definitely not work because <<displaymyfilter>> is inside of strings 
and so will be passed literally to the list-links macro which wouldn't know 
what to do with it.

This syntax:

<<list-links filter:<<filter>> >>

Doesn't work either. I've never been able to get a macro short cut 
(<<macro>>) to work inside of another macro short-cut. In situations where 
I need a macro called by a macro, I use <$macrocall>.

Good luck!
Mark

On Wednesday, November 8, 2017 at 11:58:01 AM UTC-8, TonyM wrote:
>
> Mark,
>
> Thanks, That was perfect. works like a dream.
>
> Can you tell me Is this just that wikify removes the leading or trailing 
> spaces?
>
> If so could it be said to be  "work around" or is this a common need 
> because of artefacts such as this occurring?, or am I missing something?
>
> I will try and publish the resulting solution. 
>
> Thanks very much.
>
> Tony
>
>
> On Thursday, November 9, 2017 at 1:26:51 AM UTC+11, Mark S. wrote:
>>
>> Hey that's looking pretty good. Invoke it like this:
>>
>> <$wikify name=filt text="<<displaymyfilter>>">
>> <$macrocall $name="list-links" filter=<<filt>> />
>> </$wikify>
>>
>> Good luck!
>> Mark
>>
>> On Wednesday, November 8, 2017 at 4:07:29 AM UTC-8, TonyM wrote:
>>>
>>>
>>> Folks,
>>>
>>> I almost have a simple Boolean tag search see discussion working. 
>>> However 
>>> <https://groups.google.com/forum/?hl=en#!searchin/tiddlywiki/boolean%7Csort:date/tiddlywiki/0lC8_iIuYHA/IfakE2Z6BgAJ>
>>>
>>> I am bugged by the following, which does everything I want but results 
>>> in leading and trailing spaces in the resultant macro value. This seems to 
>>> be enough to stop any filter using this value.
>>>
>>> \define displaymyfilter()
>>> <$list filter="[list[EditInput!!input]]" variable=item>
>>> <$list filter="[<item>!prefix[+]!prefix[-]]" variable=tagfilter>
>>> [tag[<<tagfilter>>]] 
>>> </$list>
>>> <$list filter="[<item>prefix[+]]+[removeprefix[+]]" variable=tagfilter>
>>> +[tag[<<tagfilter>>]] 
>>> </$list>
>>> <$list filter="[<item>prefix[-]]+[removeprefix[-]]" variable=tagfilter>
>>> -[tag[<<tagfilter>>]] 
>>> </$list>
>>> </$list>
>>> \end
>>>
>>> Debug: Source Field "one two -three" Comes from {{EditInput!!input}}Debug: 
>>> My Constructed Filter " [tag[one]] [tag[two]] -[tag[three]] " Output of 
>>> <<displaymyfilter>>Note: The leading and Trailing spaces in my 
>>> constructed filter.
>>>
>>>
>>> Which means
>>>
>>>
>>> <<list-links filter:"<<displaymyfilter>>" >>
>>>
>>>
>>> Throws a display error, does not work, multiple formats tried! also 
>>> <$list...
>>>
>>>
>>>
>>> Tiddler ends with a <$set>
>>>
>>
>>
>
>

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/32e1c5c9-1848-4df7-8f70-a54361ec0cbf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to