Re: [tw5] Re: How to? --- APPEND one tiddler "text" to another? #append

2019-06-23 Thread Mohammad
Hello Pit, Happy it is working for you! This is documented in TWScripts. Cheers Mohammad -- 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...@

Re: [tw5] Re: How to? --- APPEND one tiddler "text" to another? #append

2019-06-23 Thread Pit.W.
Mohammad, for more than a year I have been trying to exactly this working. Thanks a lot! Pit Am 04.04.2019 um 17:21 schrieb Mohammad: Hi Josiah,  You may like the below macro! | \define append-text(tidTitle,text:"",btnLabel:"Append Text",sep:"") <$button>$btnLabel$ <$list variable="newText

[tw5] Re: How to? --- APPEND one tiddler "text" to another? #append

2019-04-07 Thread Mohammad
Hi S.S. I tried to prevent appending text to a NOT existing Tiddler (As Josiah noted above), but seems code gets too complicated! Seems action-setfiled works to create tiddler if not existed and from programming point of view, I expect to warn and NOT to do that! --Mohammad On Sunday, April 7,

[tw5] Re: How to? --- APPEND one tiddler "text" to another? #append

2019-04-07 Thread S. S.
Nice macro Mohammad! Works perfectly for a few random tests I made. On Sunday, April 7, 2019 at 3:31:06 AM UTC+7, Mohammad wrote: > > Hi Josiah! > This new version works ALSO with empty tiddlers > > \define append-text(tidTitle, text:"", btnLabel:"Append Text", sep:"") > <$button> $btnLabel$ >

[tw5] Re: How to? --- APPEND one tiddler "text" to another? #append

2019-04-06 Thread Mohammad
Added to Yazd! --Mohammad On Sunday, April 7, 2019 at 1:01:06 AM UTC+4:30, Mohammad wrote: > > Hi Josiah! > This new version works ALSO with empty tiddlers > > \define append-text(tidTitle, text:"", btnLabel:"Append Text", sep:"") > <$button> $btnLabel$ > <$list variable="newText" > filter="[<_

[tw5] Re: How to? --- APPEND one tiddler "text" to another? #append

2019-04-06 Thread Mohammad
Hi Josiah! I don't know if this is a bug or a feature, but action-setfield will create tiddler if it does not exist! Glad you like it! --Mohammad On Sunday, April 7, 2019 at 10:07:03 AM UTC+4:30, @TiddlyTweeter wrote: > > Thanks Mohammad! > > Very good. And excellent it silently creates the tar

[tw5] Re: How to? --- APPEND one tiddler "text" to another? #append

2019-04-06 Thread @TiddlyTweeter
Thanks Mohammad! Very good. And excellent it silently creates the target tiddler if it doesn't exist. Exactly what I needed. Best wishes Josiah On Saturday, 6 April 2019 22:31:06 UTC+2, Mohammad wrote: > > Hi Josiah! > This new version works ALSO with empty tiddlers > > \define append-text(t

[tw5] Re: How to? --- APPEND one tiddler "text" to another? #append

2019-04-06 Thread Mohammad
Hi Josiah! This new version works ALSO with empty tiddlers \define append-text(tidTitle, text:"", btnLabel:"Append Text", sep:"") <$button> $btnLabel$ <$list variable="newText" filter="[<__tidTitle__>get[text]addsuffix<__sep__>addsuffix<__text__>]" emptyMessage="""<$action-setfield $tiddler=<<_

[tw5] Re: How to? --- APPEND one tiddler "text" to another? #append

2019-04-06 Thread @TiddlyTweeter
Thanks for the quick response! Very useful tool! It works well except that if the target Tiddler (in the example TidB) has an empty text field it won't append. Is there a way to get the append working even if the text field is empty? Many thanks! Josiah Mohammad wrote: > > > You may like the

[tw5] Re: How to? --- APPEND one tiddler "text" to another? #append

2019-04-04 Thread Mohammad
Hi Josiah, You may like the below macro! \define append-text(tidTitle, text:"", btnLabel:"Append Text", sep:"") <$button> $btnLabel$ <$list variable="newText" filter= "[<__tidTitle__>get[text]addsuffix<__sep__>addsuffix<__text__>]" > <$action-setfield $tiddler=<<__tidTitle__>> text=<> /> \end

[tw5] Re: How to? --- APPEND one tiddler "text" to another? #append

2019-04-04 Thread @TiddlyTweeter
Repeat for email ... On Thursday, 4 April 2019 16:35:32 UTC+2, @TiddlyTweeter wrote: > > The use case is you create a tiddler and realise it would be better added > to another (not via transclusion, rather, the literal content of "text" is > appended to another Tiddler's "text" field.). > > Do