>
> So that sounds like dangerous territory which would make Relink prone to
> make unwanted changes to people's tiddlers.
>
I can see that. When I tried Relink for the first time I was confused that
it *didn't* happen by default.
I like the idea of the RelinkMacro macro! Maybe if a particular parameter
wasn't specified, it would set all the parameters of that macro to that
type, like:
<<RelinkMacro myMacro type:"wikitext">>
I'm just trying to be lazy though, it's a good idea either way.
Kalcifer
On Monday, March 23, 2020 at 11:43:29 AM UTC, Flibbles wrote:
>
> So that sounds like dangerous territory which would make Relink prone to
> make unwanted changes to people's tiddlers. Are you in a situation where
> you're defining a ton of macros for yourself, and you're tired of going
> into the Relink configuration menu to add its parameters? Because one
> feature I have considered adding is a macro which you can call right after
> defining macros which would declare its parameters right then and there:
> Kinda like:
>
> \define myMacro(tiddler, myFilter, class) ...
>
>
> <<RelinkMacro myMacro tiddler title>>
> <<RelinkMacro myMacro myFilter filter>>
>
>
> That way, you could keep your Relink macro configuration with your macro
> definition.
>
> On Monday, March 23, 2020 at 7:36:57 AM UTC-4, Kalcifer Kandari wrote:
>>
>> Thinking about it, could there be an option to make all macro parameters
>> recognised as WikiText even if they aren't added to the whitelist, which
>> could then be overridden by whitelist entries? I suppose that would also
>> mean there would need to be an additional 'None' type as well. That would
>> be more intuitive in my mind.
>>
>> Kalcifer
>>
>> On Monday, March 23, 2020 at 4:37:13 AM UTC, 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/23a81170-0a49-4f37-988f-b35faf3f0ef6%40googlegroups.com.