Re: [tw] Re: How combine string with evaluated value for a parameter value?

2016-01-13 Thread Felix Küppers
Hi Xavier. I agree, strange indeed. Maybe raise an issue at the TW GitHub repo? -Felix On 01/12/2016 05:31 PM, Xavier Cazin wrote: > Hi everyone, > > Loved the trick, but it exhibits a parsing glitch when you try to put > the variable values in bold > ​ using single quotes​ > . Try < ​$'​ > ' in

Re: [tw] Re: How combine string with evaluated value for a parameter value?

2016-01-13 Thread Felix Küppers
> > Ad-Hoc Macro @ tb5 > +1 -- 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.c

Re: [tw] Re: How combine string with evaluated value for a parameter value?

2016-01-12 Thread Tobias Beer
Hi again, Xavier, > This is not really a matter of quote parsing but rather of wikitext > parsing. Try <$macrocall $name="=" text="""I am ''$(currentTiddler)$'' for > TiddlyWiki $(version)$. This is rather $1$.""" 1="boldish"/> somewhere in > http://tobibeer.github.io/tb5/. > > Mhhh, not sur

Re: [tw] Re: How combine string with evaluated value for a parameter value?

2016-01-12 Thread Xavier Cazin
Hi Tobias, This is not really a matter of quote parsing but rather of wikitext parsing. Try <$macrocall $name="=" text="""I am ''$(currentTiddler)$'' for TiddlyWiki $(version)$. This is rather $1$.""" 1="boldish"/> somewhere in http://tobibeer.github.io/tb5/. X. -- Xavier Cazin On Tue, Jan 12,

Re: [tw] Re: How combine string with evaluated value for a parameter value?

2016-01-12 Thread Tobias Beer
Hi Xavier, > Loved the trick, but it exhibits a parsing glitch when you try to put the > variable values in bold > ​ using single quotes​ > . Try < ​$'​ > ' in a TW $(version)$. Good bye $1$. Hope to see you again $1$." "foo">> > for instance. > Two options to go about it: 1. you can alw

Re: [tw] Re: How combine string with evaluated value for a parameter value?

2016-01-12 Thread Xavier Cazin
Hi everyone, Loved the trick, but it exhibits a parsing glitch when you try to put the variable values in bold ​ using single quotes​ . Try <> for instance. X. -- Xavier Cazin On Tue, Jan 12, 2016 at 5:18 PM, Tobias Beer wrote: > Hi Felix, > > Ha! Nice @Tobias, didn't think of this. Now we al

[tw] Re: How combine string with evaluated value for a parameter value?

2016-01-12 Thread Tobias Beer
Hi Felix, Ha! Nice @Tobias, didn't think of this. Now we almost got the equivalent to > "printf" (https://en.wikipedia.org/wiki/Printf_format_string) :D \define concat(text,1,2,3,4,5,6,7,8,9,10) $text$ > > < bye $1$. Hope to see you again $1$." "foo">> > I added the above here: Ad-Hoc M

Re: [tw] Re: How combine string with evaluated value for a parameter value?

2016-01-01 Thread Felix Küppers
Hi Matabele > Really useful trick :-) Many thanks for this. Thanks, sometimes really handy. -- 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..

[tw] Re: How combine string with evaluated value for a parameter value?

2016-01-01 Thread Felix Küppers
> > Ahaaa - very tricky! I would have never thought of it. I know I'll face > this issue again - really valuable! > Thanks @Mat \define =(text,1,2,3,4,5,6,7,8,9,10) $text$ <<= "I am $(currentTiddler)$ in a TW $(version)$. And here is $1$." "foo">> Ha! Nice @Tobias, didn't think of this. Now w

[tw] Re: How combine string with evaluated value for a parameter value?

2016-01-01 Thread Tobias Beer
Hi Mat, > Just to make sure I get it right, this is only for cases using URI, right? > Try to create a permalink for a tiddler containing spaces, or even a permaview for multiple tiddlers, including those containing spaces. You'll see that you cannot just create the proper link solely with a

[tw] Re: How combine string with evaluated value for a parameter value?

2016-01-01 Thread Mat
Tobias, you may be interested in the new tobibeer/hash > filter plugin (announced > here > > ), > Again my warmest thanks to you! Just to make sure I get it right, this

[tw] Re: How combine string with evaluated value for a parameter value?

2016-01-01 Thread Mat
Tobias, thank you! Setvars is really, really cool! That's really interesting how vars are called *already in* the setting of the other vars! <:-) On Wednesday, December 30, 2015 at 2:06:30 PM UTC+1, Tobias Beer wrote: > > Hi Mat, > > You can easily achieve that using tobibeer/setvars >

[tw] Re: How combine string with evaluated value for a parameter value?

2016-01-01 Thread Tobias Beer
Hi Felix, > I know this is an old thread but I just wanted to add my solution. > Wow. This is something to ponder: \define =(text,1,2,3,4,5,6,7,8,9,10) $text$ <<= "I am $(currentTiddler)$ in a TW $(version)$. And here is $1$." "foo">> Best wishes, Tobias. -- You received this message beca

[tw] Re: How combine string with evaluated value for a parameter value?

2016-01-01 Thread Mat
My goodness! @Felix, to pick up on this old issue is very kind of you! And it seems to have really started a flow of useful solutions. Wow! *The trick is to inject the whole macro body as string.* > Ahaaa - very tricky! I would have never thought of it. I know I'll face this issue again - reall

[tw] Re: How combine string with evaluated value for a parameter value?

2015-12-31 Thread Tobias Beer
Hi Mat, you may be interested in the new tobibeer/hash filter plugin (announced here ), which allows to uri-encode one or more tiddler titles to proper uri hashes. Especial

[tw] Re: How combine string with evaluated value for a parameter value?

2015-12-30 Thread Matabele
Hi Felix Really useful trick :-) Many thanks for this. regards On Wednesday, 30 December 2015 14:44:56 UTC+2, Felix Küppers wrote: > > Hi Mat, > > I know this is an old thread but I just wanted to add my solution. > > If you only want to concatenate variables, macros and literals (but no > tra

[tw] Re: How combine string with evaluated value for a parameter value?

2015-12-30 Thread Tobias Beer
Hi Mat, You can easily achieve that using tobibeer/setvars : <$setvars url="\http://tiddlywiki.com/#\ current" _current=< >> <> However, this requires for the tiddler title to not have spaces in order for the link to work with a TiddlyWiki. Whi

[tw] Re: How combine string with evaluated value for a parameter value?

2015-12-30 Thread Felix Küppers
Hi Mat, I know this is an old thread but I just wanted to add my solution. If you only want to concatenate variables, macros and literals (but no transclusions), you can use the following technique, which allows you to dynamically concatenate strings without having to specifiy the concatinati

[tw] Re: How combine string with evaluated value for a parameter value?

2015-07-23 Thread Eric Shulman
On Thursday, July 23, 2015 at 9:26:04 AM UTC-7, Mat wrote: > > Ah, thanks @Eric! Truly an easy syntactic mistake to make. > > As far as I can tell, $vars thus makes $set superfluous. Do you happen to > know why wasn't $set just enhanced instead of introducing also $vars? Would > enhancing $set br

[tw] Re: How combine string with evaluated value for a parameter value?

2015-07-23 Thread Mat
Ah, thanks @Eric! Truly an easy syntactic mistake to make. As far as I can tell, $vars thus makes $set superfluous. Do you happen to know why wasn't $set just enhanced instead of introducing also $vars? Would enhancing $set break backward compatability? Thanx <:-) -- You received this messag

[tw] Re: How combine string with evaluated value for a parameter value?

2015-07-23 Thread Eric Shulman
On Thursday, July 23, 2015 at 2:51:17 AM UTC-7, Mat wrote: > > If you don't mind me asking - how did you figure out it should use a vars > instead of a set? "!!creator" looks very non-variablish to me? (...and what > would have happened pre-5.1.9 when there was no vars widget?) > Anything you ca

[tw] Re: How combine string with evaluated value for a parameter value?

2015-07-23 Thread Mat
That did it! Excellent Jed! :-D If you don't mind me asking - how did you figure out it should use a vars instead of a set? "!!creator" looks very non-variablish to me? (...and what would have happened pre-5.1.9 when there was no vars widget?) <:-) -- You received this message because you

[tw] Re: How combine string with evaluated value for a parameter value?

2015-07-22 Thread Jed Carty
After a few minutes of some rather intense confusion I realized that I used the vars instead of set for the first definition when testing and wrote set when I put it in my answer to you. Sorry about that. This time here is exactly what I have in the tiddler I am testing with on tiddlywiki.com:

[tw] Re: How combine string with evaluated value for a parameter value?

2015-07-22 Thread Mat
Thanks for superfast reply, Jed! ...but no luck. Merely adding some tests to your code, see below, gives this (non-)result: 1 MyTid 2 Mat 3 4 5 6 \define concat() $(ThisCreator)$/$(currentTiddler)$ \define pub() 1 {{!!title}} 2 {{!!creator}} 3 <$set ThisCreator={{!!creator}}> 4 {{!!title}} 5 <

[tw] Re: How combine string with evaluated value for a parameter value?

2015-07-22 Thread Jed Carty
The problem is <$set name="rev" value=<>> The input to the macro isn't wikified before the macro is evaluated in this context. Use this instead: \define concat() $(ThisCreator)$/$(currentTiddler)$ \define pub() <$set ThisCreator={{!!creator}}> <$set name=rev value=<>> <$link to=<>><$view tidd

[tw] Re: How combine string with evaluated value for a parameter value?

2015-07-22 Thread Mat
@Eric, @Jed - I appreciate your help!!! However... I just can't get it to work, in spite of your multiple examples. Below is the more actual code. The idea is to display the current tiddlers title but with the tiddlers creators name prepended to it, so the title "Foo BarFrotz" display as "Bob/

[tw] Re: How combine string with evaluated value for a parameter value?

2015-07-22 Thread Eric Shulman
correction: currentTiddler is a variable, not a macro parameter. Thus, instead of $currentTiddler$ it should be $(currentTiddler)$ like this: > \define makeurl(u) $u$$(currentTiddler)$ > <$set name="url" value=>> > ... > > -- You received this message because you are su

[tw] Re: How combine string with evaluated value for a parameter value?

2015-07-22 Thread Jed Carty
If you want some more examples I have some here http://inmysocks.tiddlyspot.com/#Concatenating%20text%20to%20make%20dynamic%20URLs -- 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, s

[tw] Re: How combine string with evaluated value for a parameter value?

2015-07-22 Thread Eric Shulman
On Wednesday, July 22, 2015 at 7:35:10 AM UTC-7, Mat wrote: > > How does one concatenate a string and a calculated value (e.g a macro or a > transclusion)? > > For example this doesn't work: > > <$set name="url" value="http://foo.com/#:";<>> > > <$set name="url" value=http://foo.com/#:<>> > > <$se