Michael: something like this should also work for parsing $:/Import
<$list filter="[enlist{$:/Import}butfirst[6]]" variable="imported">
<!--actions go here-->
</$list>
On Wednesday, June 17, 2020 at 10:16:15 PM UTC+2, Michael Wiktowy wrote:
>
> Thank you Saq.
>
> I had just discovered how to do it globally by looking at upgrade.html but
> was still banging my head as to how to do it locally. Your solution of
> transcluding into the macro/variable an editable tiddler would work great.
>
> I agree wrt your recommendations. It would make things much cleaner and
> easier to have the import Title List available and have some way of
> triggering actions but I managed to kludge something together for my needs
> with everyone's help.
>
> Much appreciation.
>
> /Mike
>
> On Wednesday, June 17, 2020 at 5:00:58 PM UTC-3, Saq Imtiaz wrote:
>>
>> @Michael some thoughts below:
>>
>>
>>> I am still wondering about proper use of the "tv-auto-open-on-import"
>>> variable. What Tony wrote about "tv-enable-drag-and-drop" makes me think
>>> there is a tiddler that I should be globally poking that value into rather
>>> than it being a locally controlled thing.
>>>
>>>
>> So the issue is that when you set tv-enable-drag-and-drop, it is only set
>> in that widget and its children.
>> The import message is handled by the navigator widget which is an
>> ancestor of your widget.
>>
>> I use something like this:
>>
>> A tiddler called *$:/sq/macros/tv-auto-open-on-import* with the tag
>> *$:/tagsMacro* and the content:
>> \define tv-auto-open-on-import()
>> {{$:/config/tv-auto-open-on-import}}
>> \end
>>
>>
>> And a second tiddler called *$:/config/tv-auto-open-on-import*, in which
>> you can set the text to *no*
>> You will also need to set it to yes, or delete this tiddler, after your
>> post-import handling is completed.
>>
>> Regarding actions, it is best to think of all actions executed by a
>> button as being invoked in parallel, that is you cannot assume one executes
>> before the others. So if you set a field in one action, you cannot read
>> that value in the next. (The underlying issue has to do with refresh and
>> how actions are parsed and invoked)
>>
>> I run a couple of small tweaks of the import related code in Navigator
>> that I think might be worth a core pull request based on this discussion:
>> - a post import hook, invoked after a tiddler is imported.
>> - the names of imported tiddlers are saved to a field in the $:/Import
>> tiddler as a title list, making it easy to re-use via wikitext.
>>
>> Cheers,
>> Saq
>>
>>>
--
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/669416e9-9a91-4d9a-8bbb-db8c2c8f90ceo%40googlegroups.com.