Oh, I thought you could write a macro in a tiddler and then transclude that 
tiddler when you wanted to use the macro. Like a .h in C++.

Second question (or do you want me to make another post?):
Can we make parameters defaults of other parameters?

For example:
\define TaskList (ListName, ListTitle=$ListName$)
!!! Task List $ListTitle$
<$list 
filter="[tasklist[$ListName$]!title[TaskSkeleton]!title[JournalSkeleton]!has[draft.of]tag[task]!tag[done]sort[priority]]">
</$list>
\end

Now I can call this macro with either:
<<TaskList ListName:"Analyse/Fix" ListTitle:"Analysis">>
... or ...
<<TaskList ListName:"Review">>


Or is that an enhancement request?

Tom P.


On Friday, July 10, 2015 at 9:25:03 AM UTC-5, Jeremy Ruston wrote:
>
> Hi Henry
>
> I think that there are two problems here:
>
> * The first is that transcluding a tiddler doesn't make macros defined in 
> that tiddler available in the calling tiddler. You can instead either 
> define it as a global macro by tagging it with $:/tags/Macro or you can use 
> the <$importvariable> widget directly to import macro definitions from a 
> tiddler
>
> * The second problem is that you don't need brackets when calling a macro. 
> Try this:
>
> <<TaskListMacro ListTitle:"Not Started">>
>
> Best wishes
>
> Jeremy.
>
>
>
>
> On Fri, Jul 10, 2015 at 2:39 PM, Henry Padilla <[email protected] 
> <javascript:>> wrote:
>
>> Macro Tiddler:
>>   TitleField:
>>       TaskListMacroSet
>>   TextField: 
>>       \define TaskListMacro(ListTitle)
>>       !!! Tasklist: $ListTitle$
>>       \end
>>
>>
>> Base Tiddler:
>>   TitleField:
>>       Not Started Task List
>>   TextField:
>>       {{TaskListMacroSet}}
>>       <<TaskListMacro(ListTitle:"Not Started")>>
>>
>> ~~~~~~~~~~~~~~~~~~~~~~
>> I've tried various combinations of $name$, $(name)$, $("name")$ and so 
>> forth, to no avail.
>> I've been going step by step to build the tiddler I need (a list of lists 
>> of tasks in certain statuses). I started with nothing special, everything 
>> spelled out, and I've been working at transcluding and writing macros a 
>> little bit at a time to make sure I get it right. But this has me stymied. 
>> I can make it work with variables, i.e. using $(name)$ and the <$set> 
>> pragma, but not parameters.
>>
>> Thanks ahead of time for the help.
>> Tom P.
>>
>> P.S. I have my macro tiddler taged with $:/tags/Macros and I still have 
>> to transclude the macro tiddler to get it to work. Has that tag changed?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "TiddlyWikiDev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/tiddlywikidev.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywikidev/f6737c52-d42c-43f9-9e01-deb906b61819%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywikidev/f6737c52-d42c-43f9-9e01-deb906b61819%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Jeremy Ruston
> mailto:[email protected] <javascript:>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/616d65ed-3763-4d16-b9bd-51d5e8959711%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to