Fibbles, You have done a lot already, but if you can break out some of you code, you may be able to provide a solution to https://groups.google.com/forum/?hl=en#!topic/tiddlywiki/8_SfAh6BC44
<<update "##name##" "Tony" [filter]>> Where it acts on current tiddler or those selected using the optional filter. Actually I expect your code could spawn a few useful macros to use elsewhere. Regards Tony On Monday, March 23, 2020 at 10:27:36 PM UTC+11, Flibbles wrote: > > So Relink already can relink macro parameters if they're titles, lists, or > filters. I'm just working on a modification so macro parameters can be > generalized wikitext as a fourth option. Are you saying that particular > option is what you need as well? > > On Monday, March 23, 2020 at 12:37:13 AM UTC-4, Kalcifer Kandari wrote: >> >> Looking forward to this. Once macro parameters are recognised, renaming a >> tiddler will go from taking me 10 minutes to taking 0 minutes. >> >> Kalcifer >> >> On Sunday, March 15, 2020 at 2:13:51 AM UTC, Flibbles wrote: >>> >>> Actually, scratch everything I said. It should be possible for Relink to >>> recognize the sum and src parameters. I just need to introduce another >>> fieldType. Currently, there is "title", "list", "reference", and "filter". >>> If there is a fifth, "wikitext", then macro parameters can be treated as >>> such, as well as fields, widget attributes, and list operators. >>> >>> This'll take me a several days to properly code. My workarounds will >>> work in the meantime. >>> >>> On Saturday, March 14, 2020 at 9:59:02 PM UTC-4, Flibbles wrote: >>>> >>>> Hold up. If you find yourself making this exact pattern a lot: >>>> <<details sum:"[[ tiddler ]]" src="{{ tiddler }}" >> >>>> >>>> Then you could wrap it in another macro to keep it neat. >>>> >>>> \define details_for_tiddler(tiddler) <$macrocall $name="details" >>>> sum="[[ $tiddler$ ]]" src="{{ $tiddler$ }}" /> >>>> >>>> Then you could configure Relink to relink the "tiddler" parameter of >>>> "details_for_tiddler" quite simply, since it would always be a title >>>> parameter. You'd go to the Relink configuration page, then to "Macros", >>>> and >>>> you'd "Add a new macro parameter" where "macro"="details_for_tiddler" and >>>> "parameter"="tiddler". After you add, the type would default to "title", >>>> which is what you want. >>>> >>>> -Flibbles >>>> >>>> On Saturday, March 14, 2020 at 9:52:51 PM UTC-4, Flibbles wrote: >>>>> >>>>> Sooo, this is a strange case. What's happening with your macro call is >>>>> that the string "[[ tiddler_name ]]" is being transplanted directly into >>>>> a >>>>> chunk of text which is then being interpreted as wikitext. And it's only >>>>> *then* that tiddlywiki recognizes it as a link. The parameters sum >>>>> and src are otherwise treated as plaintext since those parameters aren't >>>>> specified as being links OR references. And it wouldn't be possible to >>>>> configure Relink to view them as such since they're valid as either, or >>>>> neither. I really wish Relink were completely a "It just works" plugin, >>>>> but >>>>> this is one case where you'll need to do something so Relink will >>>>> recognize >>>>> what to do. >>>>> >>>>> 1. >>>>> \define link-to-tiddler() [[ tiddler_name ]] >>>>> >>>>> >>>>> <$macrocall $name="details" sum=<<link-to-tiddler>> /> >>>>> >>>>> <!-- This works because Relink interprets the bodies of macros as >>>>> wikitext, and this will relink the link as expected. --> >>>>> >>>>> >>>>> 2. >>>>> <$macrocall $name="details" src={{ tiddler_name }} /> >>>>> >>>>> >>>>> <!-- this works by allowing the indirect reference to be processed >>>>> before being passed into the macro. Relink will recognize this form just >>>>> fine and relink as needed. >>>>> However, this doesn't work for your sum parameter from your example, >>>>> since it looks like you want the LINK to the tiddler to be passed, not >>>>> the >>>>> contents. --> >>>>> >>>>> >>>>> I guess your full solution may be: >>>>> \define link-to-tiddler() [[ tiddler_name ]] >>>>> >>>>> >>>>> <$macrocall $name="details" sum=<<link-to-tiddler>> src={{ >>>>> tiddler_name }} /> >>>>> >>>>> Hope this helps. >>>>> Flibbles >>>>> >>>>> On Saturday, March 14, 2020 at 9:16:35 PM UTC-4, Rahul Kashyap wrote: >>>>>> >>>>>> Dear Flibbles, >>>>>> >>>>>> Thanks a lot for this plugin. This gives another reason to stick with >>>>>> TW as I've been developing tons of materials here. >>>>>> However, I was trying to understand how to provide my own custom list >>>>>> for any particular macro. >>>>>> >>>>>> For example, I use <<details sum:"[[ tiddler_name ]] " src:"{{ >>>>>> tiddler_name }}" >> macro (from https://kookma.github.io/TW-Shiraz/) >>>>>> a lot in order to maintain a heirarchy of material for graduate >>>>>> materials >>>>>> and research work for my work (in Physics). >>>>>> Relink wasn't updating the links and transclusions in the parameters, >>>>>> sum, and src. How should I make Relink recognize that? >>>>>> >>>>>> Thanks again, >>>>>> -Rahul >>>>>> >>>>>> On Friday, September 6, 2019 at 8:26:47 PM UTC-4, Flibbles wrote: >>>>>>> >>>>>>> Version 1.5 released. Macro parameter relinking is now supported. It >>>>>>> comes with its own whitelist. >>>>>>> >>>>>>> (e.g. <<myMacro tiddlerNameToRelink>> or <$macrocall $name=myMacro >>>>>>> param="tiddlerNameToRelink" />) >>>>>>> >>>>>>> Now Relink can rename any kind of WikiText pattern. >>>>>>> >>>>>>> Also, bugfixes. >>>>>>> >>>>>>> -Flibbles >>>>>>> >>>>>>> On Sunday, September 1, 2019 at 10:27:19 PM UTC-4, Flibbles wrote: >>>>>>>> >>>>>>>> I present Relink <https://flibbles.github.io/tw5-relink/>! >>>>>>>> >>>>>>>> It relinks fields, links, WikiLinks, widgets, transclusions, lists, >>>>>>>> and filters. It's highly customizable, but it will also work out of >>>>>>>> the >>>>>>>> box. It's robust, and can handle bizarre name changes. It works >>>>>>>> through >>>>>>>> whitelisting, so it doesn't change plaintext instances of a title, or >>>>>>>> other >>>>>>>> instances where an updated would be undesirable. It's also well tested >>>>>>>> (but >>>>>>>> still really new!!). It should be comprehensive. >>>>>>>> >>>>>>>> Otherwise, I really hope everyone gets good use out of this. Having >>>>>>>> written it, I completely understand why this isn't a core feature. It >>>>>>>> was *hard >>>>>>>> as crap*! There are so many edge cases! I'm sure more will still >>>>>>>> crop up. >>>>>>>> >>>>>>>> *Edit**: It now also supports macros, making it a fully >>>>>>>> comprehensive relinking plugin.* >>>>>>>> >>>>>>>> Demo page here <https://flibbles.github.io/tw5-relink/>. >>>>>>>> >>>>>>>> Source code here <https://github.com/flibbles/tw5-relink>. >>>>>>>> >>>>>>>> I would absolutely love to get some feedback. I really hope this >>>>>>>> helps people. >>>>>>>> >>>>>>>> -Flibbles >>>>>>>> >>>>>>> -- 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...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/86cb8fa5-ae7e-4b6f-8163-31d56620e793%40googlegroups.com.