Re: [tw] Re: [TW5] Tagging Macro Problems

2014-11-18 Thread Tobias Beer
$set name=tid value= default=currentTiddler/ So, there's an empty string being passed as the attribute value. There's no way for the set widget to distinguish that empty string as a missing value that needs to be defaulted unless it regarded all empty strings as missing values. The

[tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread PMario
have a look at: http://tiddlywiki.com/#%24%3A%2Fcore%2Fui%2FTiddlerInfo%2FTagging -m -- 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

[tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Tobias Beer
Thanks Mario, Not sure what you're trying to say as it basically does the same, only that mine is not working. Or are you suggesting I should use a transclusion template rather than an actual macro? Best wishes, Tobias. -- You received this message because you are subscribed to the Google

[tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Tobias Beer
Or are you suggesting I should use a transclusion template rather than an actual macro? Using a transclusion template appears to work, see... - $:/templates/tagging http://taggly5.tiddlyspot.com/#%24%3A%2Ftemplates%2Ftagging - Class B http://taggly5.tiddlyspot.com/#Class%20B

[tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread PMario
\define tagging() $list filter=[all[current]tagging[]]/ \end This works, because it uses the default fallback template. see this description quote from: http://tiddlywiki.com/#ListWidget The content of the $list widget is an optional template to use for rendering each tiddler in the list.

[tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Evolena
Le lundi 17 novembre 2014 13:41:26 UTC+1, Tobias Beer a écrit : I was trying to create a simple tagging macro tagged $:/tags/Macro , so I thought. http://taggly5.tiddlyspot.com/#%24%3A%2Fmacros%2Ftagging \define tagging() $list filter=[all[current]tagging[]] /$list \end Any reason

[tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Tobias Beer
Thanks, Evolena, of course. Because you defined your macro tiddler to be *plain/text* type, so it is not interpreted. Although, I'd quite like macro code to be displayed. Any hints on how I could make tagging tiddler X work? Best wishes, Tobias. -- You received this message because

[tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Evolena
There must be a smarter solution, but you can try this macro definition: \define tagging(title:currentTiddler) $set name=myTitle value=$title$ myTitle $list filter=[titlemyTitletagging[]] /$list /$set \end However for it to work with a title, you need to use a trick: All content for current

[tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Evolena
(you can get rid of the myTitle line, it was here for investigating purposes) -- 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

[tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Tobias Beer
Thanks Evolena, However for it to work with a title, you need to use a trick: All content for Class B... tagging 'Class B' The parameter with the title of the tiddler also contains ticks, so that the value of the set widget is interpreted correctly (it should be value=currentTiddler

[tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread PMario
You may want to try this for tags with spaces: As a user, I'd probably like to define a list with ul or ol ... similar to list-links \define tagging(title, type:ul) $type$ $list filter=[[$title$]tagging[]]li$linkcurrentTiddler/ $link/li/$list /$type$ \end tagging a b tag a tiddler with: ab

[tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Tobias Beer
Hi Mario, You may want to try this for tags with spaces Thanks for your reply. I believe, this leaves the problem of not being able leave out the tiddler parameter and just do... tagging Best wishes, Tobias. -- You received this message because you are subscribed to the Google Groups

[tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread PMario
On Monday, November 17, 2014 7:43:21 PM UTC+1, Tobias Beer wrote: Hi Mario, You may want to try this for tags with spaces Thanks for your reply. I believe, this leaves the problem of not being able leave out the tiddler parameter and just do... tagging Best wishes, Tobias. Yes,

[tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Tobias Beer
Yes, I thought about this. ... but the tiddler where you don't have a parameter is the tag. You can use list-links filter:[all[current]tagging[]] Of course, that is possible and using the list widget or a transclusion template too, but that was not the purpose of the exercise. ^_^ Best

Re: [tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Jeremy Ruston
Hi Tobias If I understand correctly, the goal is to write a macro that lists the tiddlers that are tagged by a specified tiddler, and you'd like the ability to specify the the target tiddler, or leave it unspecified and default to the current tiddler. The obvious way to accomplish it doesn't in

Re: [tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Tobias Beer
The reason is that it is not possible to transclude a default macro parameter value; the default value has to be specified as a string. javascript: I was wondering how difficult it might be to extend the set widget to allow fora default fallback to be defined for when value is actually

Re: [tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Tobias Beer
The reason is that it is not possible to transclude a default macro parameter value; the default value has to be specified as a string. I was wondering how difficult it might be to extend the set widget so as to allow a default value as a fallback for when the value is actually undefined:

Re: [tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Jeremy Ruston
Hi Tobias I was wondering how difficult it might be to extend the set widget so as to allow a default value as a fallback for when the value is actually undefined: The trouble is that in many situations an empty string is a valid value that shouldn't be defaulted; what we really want here

Re: [tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Tobias Beer
Hi Jeremy, Bear in mind that macro parameters are processed with text substitution, so passing Hello There as a title gives you value=Hello There, which won't work as expected. The fix is to use quotes; triple quotes are recommended because that allows titles to contain single or double

Re: [tw] Re: [TW5] Tagging Macro Problems

2014-11-17 Thread Tobias Beer
This example wouldn't work for a title containing spaces. Ok, so let's consider the hypothetical syntax fixed... \define tagging(title) $set name=tid value=$title$ default=currentTiddler/ $list filter=[[tid]tagging[]]/ \end The trouble is that in many situations an empty string is a