Hi Tobias As I mentioned, there are other ways of achieving a true 'find & replace' (i.e placing the widget within a list which includes only tiddlers containing the tag to remove), however: -- this is not what a user would expect from a true 'find & replace' function (it would be rather, a 'replace anyway' function) -- this (therefore) renders coding simpler in many usage cases, as you don't have to construct a suitable filter
For example, the widget can be used like this: <$button> <$list> <$action-mangletags remove="old-tag" add="new-tag"/> </$list> </$button> -- or like this: <$button> <$action-mangletags tiddler="My Target" remove="old-tag" add="new-tag"/> </$button> -- and the results are exactly as expected (find and replace.) regards On Tuesday, 22 September 2015 18:04:23 UTC+2, Tobias Beer wrote: > > Hi Metabele, > > >> My widget is supposed to conditionally add a tag only iff the first tag >> is found (in the case that both find= and add= are specified) and >> unconditionally add or remove the tags if only one of the attributes is >> specified. >> > > Ah, it looked like you're always adding the tag, when defined. > Tbh, I was looking at your code, didn't look at any documentation. > So, yes, before hand you only added the tag when... > > - a tag to be removed was successfully removed > - no tag was to be removed but just another one added > > Not exactly sure why you'd bind adding a tag to "only when the other was > removed". Why is that? Anyhow, you're right, the way I modified it I did > not pay close enough attention to that tiny detail. :-) > > Best wishes, > > — tb > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/56bcfe45-8755-4de7-b1d5-6d84147f2b46%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

