Re: [tw5] Did I find a bug? Or am I using it wrong?

2019-07-02 Thread Jeremy Ruston
Hi Mat

> On 2 Jul 2019, at 14:55, Mat  wrote:
> 
> 
> I think the request was to remove the brackets which the filter transclusion 
> between quotation marks seems to do.

You’re quite right, I’d missed the select=“0” in Xaviers post.

Best wishes

Jeremy

-- 
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/B270F0D1-FD70-4F74-9625-15FE6CC2A684%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] Did I find a bug? Or am I using it wrong?

2019-07-02 Thread Mat
Jeremy Ruston wrote:
>
> I don’t think your wikify widget will deal with adding the double square 
> brackets.
>

I think the request was to remove the brackets which the filter 
transclusion between quotation marks seems to do.

Thanks for the explanation. I probably over use wikify but I often don't 
see any other way out. This problem with extra brackets is one such 
recurrence so the $set technique was valuable.

<:-)


-- 
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/b5724039-37b1-4d6c-8811-0be37e7f1016%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] Did I find a bug? Or am I using it wrong?

2019-07-02 Thread Jeremy Ruston
Hi @twMat

> On 2 Jul 2019, at 14:34, Mat  wrote:
> 
> Xavier wrote:
> In order to "flatten" the titles retrieved from the filter, you need to use 
> the select attribute of your <$set> widget like so: <$set name="left" 
> filter="[splitbefore[ -- ]removesuffix[ -- ]]" select=0>
> 
> I was not aware of this technique. I would have attempted
> 
> <$wikify name="left" text="{{{ [splitbefore[ -- ]removesuffix[ -- 
> ]] }}}">
> 
> Is there any advantage or disadvantage with either?

I don’t think your wikify widget will deal with adding the double square 
brackets.

Anyhow, wikify widget is intrinsically slow because it requires the text to be 
parsed and rendered on each refresh cycle. It should be avoided unless there is 
no alternative.

There’s only a small number of use cases for the wikify widget, and they all 
boil down to a need to manipulate the results of wikification other than to 
just display them.

Best wishes

Jeremy.

> 
> <:-)
> 
> -- 
> 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/2048e202-19c9-415d-a874-149a2aecb437%40googlegroups.com
>  
> .
> 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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/69DFCB72-2824-444C-8AA0-F31FB96D3E04%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] Did I find a bug? Or am I using it wrong?

2019-07-02 Thread Mat
Xavier wrote:
>
> In order to "flatten" the titles retrieved from the filter, you need to 
> use the *select* attribute of your <$set> widget like so: <$set 
> name="left" filter="[splitbefore[ -- ]removesuffix[ -- ]]" 
> select=0>
>

I was not aware of this technique. I would have attempted

<$wikify name="left" text="{{{ [splitbefore[ -- ]removesuffix[ -- 
]] }}}">

Is there any advantage or disadvantage with either?

<:-)

-- 
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/2048e202-19c9-415d-a874-149a2aecb437%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] Did I find a bug? Or am I using it wrong?

2019-07-02 Thread Stephan Hradek
Am Dienstag, 2. Juli 2019 09:46:31 UTC+2 schrieb Xavier:
>
> Hi Stephan,
>
> In order to "flatten" the titles retrieved from the filter, you need to 
> use the *select* attribute of your <$set> widget like so: <$set 
> name="left" filter="[splitbefore[ -- ]removesuffix[ -- ]]" 
> select=0>
>
>>
>>
Thanks a lot @Xavier. Works perfectly
 

-- 
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/aa592a9f-2ec6-40d1-ba62-e2eb8aa7c4ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] Did I find a bug? Or am I using it wrong?

2019-07-02 Thread Xavier Cazin
Hi Stephan,

In order to "flatten" the titles retrieved from the filter, you need to use
the *select* attribute of your <$set> widget like so: <$set name="left"
filter="[splitbefore[ -- ]removesuffix[ -- ]]" select=0>

Cheers,
-- Xavier Cazin


On Tue, Jul 2, 2019 at 8:44 AM Stephan Hradek 
wrote:

> For my mailto-link I want to supply a tiddlername and a linktext to a
> macro.
>
> For this I thought it would be a good ideat to do it in the form of
>
> {{the tiddler with the mail template -- the linktext||mailto}}
>
> So the idea is to have a mailtext in the tiddler (the tiddler with the
> mail template) and to create a mailto-link of the form
>
> mailto:…;>the linktext
>
> So for this I need to split the text at " -- ", but this only worked,
> when my tiddler's title does not contain a blank. Otherwise it fails.
>
> Here is a simple tiddler for you to test:
>
> <$set name="testtext" value="the tiddler with the mail template -- the
> linktext">
>
> <$set name="left" filter="[splitbefore[ -- ]removesuffix[ -- ]]">
>
> <$set name="right" filter="[removeprefixremoveprefix[ --
> ]]">
>
> Original: <$text text=<>/>
>
> Left of ' -- ': <$text text=<>/>
>
> Right of ' -- ': <$text text=<>/>
>
> 
> 
> 
>
> The output is
>
> Original: the tiddler with the mail template -- the linktext
>
>
> Left of ' – ': [[the tiddler with the mail template]]
>
>
> Right of ' – ':
>
> Without spaces the output is
>
> Original: the_tiddler_with_the_mail_template -- the linktext
>
> Left of ' – ': the_tiddler_with_the_mail_template
>
>
> Right of ' – ': [[the linktext]]
>
> So for some reason there are square brackets added to the variable's value
> which will make my nice logic fail.
>
> Is there a way around this?
>
>
>
>
>
>
>
>
>
>
> --
> 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/1fe8473f-9fb3-482c-b4a9-975eedc4b093%40googlegroups.com
> 
> .
> 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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CADeSwYP_%3Dg19GSRf%3DG-BFBpKHs0c54OwhK%3DHq6tq4P0FPR3hdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Did I find a bug? Or am I using it wrong?

2019-07-02 Thread Stephan Hradek
For my mailto-link I want to supply a tiddlername and a linktext to a macro.

For this I thought it would be a good ideat to do it in the form of

{{the tiddler with the mail template -- the linktext||mailto}}

So the idea is to have a mailtext in the tiddler (the tiddler with the mail 
template) and to create a mailto-link of the form

mailto:…;>the linktext

So for this I need to split the text at " -- ", but this only worked, when 
my tiddler's title does not contain a blank. Otherwise it fails.

Here is a simple tiddler for you to test:

<$set name="testtext" value="the tiddler with the mail template -- the 
linktext">

<$set name="left" filter="[splitbefore[ -- ]removesuffix[ -- ]]">

<$set name="right" filter="[removeprefixremoveprefix[ -- 
]]">

Original: <$text text=<>/>

Left of ' -- ': <$text text=<>/>

Right of ' -- ': <$text text=<>/>





The output is

Original: the tiddler with the mail template -- the linktext


Left of ' – ': [[the tiddler with the mail template]]


Right of ' – ': 

Without spaces the output is

Original: the_tiddler_with_the_mail_template -- the linktext

Left of ' – ': the_tiddler_with_the_mail_template


Right of ' – ': [[the linktext]]

So for some reason there are square brackets added to the variable's value 
which will make my nice logic fail.

Is there a way around this?










-- 
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/1fe8473f-9fb3-482c-b4a9-975eedc4b093%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.