Hi cmari A variable set with the <$set> widget must be called with the syntax $(variable)$.
A variable passed as a parameter to a macrocall must be called with the syntax $parameter$. In your case you have set the value of the variable 'now' with a <$set> widget: <$set name="now" value=[[!!current}}> In the macro, therefore, the correct syntax is $(now)$ In this case, when calling the macro <<nexttag>> -- no parameter is passed with the call, and the (now) parameter of the macro definition is superfluous. The definition should read: \define nexttag() ... regards On Wednesday, July 2, 2014 1:50:16 AM UTC+2, cmari wrote: > > Thank you both, Måns and Stephan - that's a great improvement! I think > I've said before that I don't understand why parentheses are needed in > situations like [$(now)$], but they are clearly required in this case > (omitting them causes the tag to switch to the item "before" rather than > "after"). > cmari > > On Tuesday, July 1, 2014 2:47:46 PM UTC-7, Måns wrote: >> >> Hi cmari and Stephan >> >> If I write: >> >> \define nexttag(now) >> [list[Daylist]after[$(now)$]][list[Daylist]first[]]+[first[]] >> \end >> >> seems to work fine :-) >> >> @cmari - Matabele's widgets: mangletags and setfield are very powerfull >> indeed - Nice to see how you make them work in this context!! :-) >> >> Cheers Måns mårtensson >> >> Den tirsdag den 1. juli 2014 18.42.51 UTC+2 skrev Stephan Hradek: >>> >>> >>> First I think >>> >>> [list[Daylist]after[$(now)$]] >>> >>> >>> >>> should be >>> >>> [list[Daylist]after[$now$]] >>> >>> >>> >>> But I might be mistaken. >>> >>> Then I think this should help you go to the start: >>> >>> [list[Daylist]after[$now$]] [[list[Daylist]first[]] +[first[]] >>> >>> >>> >>> At least I hope. >>> >>> This would add the first element of Daylist after your "next" element. >>> [[list[Daylist]first[]] >>> >>> >>> >>> So if you have a "next" element, you will now have 2 elements. If there >>> was no "next" element, you will just have the first of the daylist. >>> >>> This then will limit the result to the first element >>> +[first[]] >>> >>> >>> >>> >>> >>> -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.

