[tw5] Re: one-liner to fetch tiddler's fields value

2022-01-30 Thread CarloGgi
thanking again Télumire for his reply, I wonder now how to push things a 
little further and write a one-liner that outputs *pairs* of values, 
specifically, for each field of a given tiddler, the couple 
(field_name,field_value). I'm quite confident that to that aim the named 
prefix :map is the way to go, and indeed by using it it is easy to have at 
hand in its filter run both the tiddler's field names and their values. 
Still I fall short of joining these two data together somehow, so to have 
(field_name,field_value) 
as final output of the whole expression.

This code:

{{{ 
[is[current]fields[]!match[text]]:map[<..currentTiddler>get] 
}}}

goes as near as I could go in trying to have the desired output, because it 
returns the tiddler's fields value; there is a little final step missing to 
have both the field name and value together...

Thanks for any help/suggestion/tip

CG

On Sunday, January 30, 2022 at 2:40:14 PM UTC+2 CarloGgi wrote:

> wow, awesome! Thanks a lot!
>
> On Sunday, January 30, 2022 at 3:11:49 AM UTC+2 Télumire wrote:
>
>> {{{ 
>> [is[current]fields[]!match[text]]:reduce[<..currentTiddler>getformat:titlelist[]addprefix[
>>  
>> ]addprefix]+[enlist-input[]] }}}
>>
>> On Saturday, 29 January 2022 at 22:12:09 UTC+1 CarloGgi wrote:
>>
>>> Hallo everyone,
>>> how do I write a one-line filter (a single filter expression) that 
>>> outputs the value of all (or some of) the fields of a given tiddler? The 
>>> more I try, the less I'm able to...
>>>
>>> Thanks,
>>> CG
>>>
>>

-- 
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/9171c0fb-e396-4ccf-98fe-da24a59e7bban%40googlegroups.com.


[tw5] Re: one-liner to fetch tiddler's fields value

2022-01-30 Thread CarloGgi
wow, awesome! Thanks a lot!

On Sunday, January 30, 2022 at 3:11:49 AM UTC+2 Télumire wrote:

> {{{ 
> [is[current]fields[]!match[text]]:reduce[<..currentTiddler>getformat:titlelist[]addprefix[
>  
> ]addprefix]+[enlist-input[]] }}}
>
> On Saturday, 29 January 2022 at 22:12:09 UTC+1 CarloGgi wrote:
>
>> Hallo everyone,
>> how do I write a one-line filter (a single filter expression) that 
>> outputs the value of all (or some of) the fields of a given tiddler? The 
>> more I try, the less I'm able to...
>>
>> Thanks,
>> CG
>>
>

-- 
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/a6d04023-33f3-4ed8-b174-748fe611d99en%40googlegroups.com.


[tw5] one-liner to fetch tiddler's fields value

2022-01-29 Thread CarloGgi
Hallo everyone,
how do I write a one-line filter (a single filter expression) that outputs 
the value of all (or some of) the fields of a given tiddler? The more I 
try, the less I'm able to...

Thanks,
CG

-- 
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/270fac2d-e2bf-4a2f-9300-7fbba47b2518n%40googlegroups.com.


Re: [tw5] Re: dynamically building a string by concatenation in a macro

2022-01-23 Thread CarloGgi
@jeremy thanks for the clarification. So it seems that you can correctly 
(in the sense of *syntactically* correct) use a macro call as argument of a 
widget attribute, but functionally fail to have it work as intended. This 
shows clearly that TW is way too much stuffed with booby-traps and 
something must be definitely done to make coding easier and safer for the 
average user. 

We need a stricter syntax, even at the expense of flexibility, to spare the 
user from these pitfalls, and we need debugging tools to make him easily 
single out the problem when syntax doesn't help. We cannot go on relying on 
knowledge of how the parser and 'wikifier' behaves, it simply cannot be 
viable if TW is to become widely used as is everybody's wish.
I'm not a complete beginner in programming, and as a matter of fact I spend 
50% of coding time trying to debug obscure malfunctioning that mostly turns 
out to require a developer-level knowledge of the parser to be worked out: 
I dare say that this scares away a lot of would-be users after the first, 
frustrating attempts.

In the meantime that TW morphs to something less tricky, a huge effort 
should be done IMHO in bettering the documentation so that the user is 
aware of the pitfalls left open by its syntax.

Thanks and regards,
CG

On Saturday, January 22, 2022 at 11:05:03 PM UTC+2 jeremy...@gmail.com 
wrote:

> Hi Charlie
>
> I often say "first things first, consider upgrading", but 5.2.1 has the 
> same issue.  So I say stick with what you have if it is working no-worse 
> than the latest.
>
>
> The problem is that the OP is using the macro "templatename" as an 
> attribute value in the `<$action-createtiddler>` widget, which means that 
> wikitext content will not be processed ("wikified"), so the transclusion in 
> the macro is ignored.
>
> The workaround is to use textual substitution within the macro (in other 
> words the $param$ and $(var)$ syntax).
>
> As for bug-reporting, that, to me, is a crappy process that needs some 
> tender loving care, including a need to update the related circa 2014 
> documentation (ReportingBugs <https://tiddlywiki.com/#ReportingBugs>).
>
>
> "Crappy"?
>
> It would be more helpful to explain the specific problems you see, and 
> perhaps suggest improvements.
>
> Best wishes
>
> Jeremy
>
>
> Rock'n roll !
>
>
>
>
>
> On Saturday, January 22, 2022 at 4:31:45 PM UTC-4 CarloGgi wrote:
>
>> It worked like a charm, thanks! 
>> If it is really a bug, is there a dedicated place to submit it for 
>> analysis?
>>
>> My TW version is 5.2.0
>>
>> Thanks again and regards,
>> CG
>>
>> On Saturday, January 22, 2022 at 9:57:46 PM UTC+2 cj.v...@gmail.com 
>> wrote:
>>
>>> TiddlyTalk is a pain.  Let me try pasting that code again so that it 
>>> shows okay over there.
>>>
>>> ```
>>> <$button>
>>>  <$action-createtiddler
>>>  $basetitle="testTiddler"
>>>  $template={{{ [[BASENAME-]addsuffix{!!grammar_class}] 
>>> }}} >
>>>
>>>  <$action-navigate $to=<>/>
>>>  
>>>  create new test tiddler
>>> 
>>> ```
>>>
>>> On Saturday, January 22, 2022 at 3:53:48 PM UTC-4 Charlie Veniot wrote:
>>>
>>>> I'm thinking you found a bug related to how the action-createtiddler 
>>>> handles the $template parameter.
>>>>
>>>> In the meantime (i.e. until there is a fix or somebody can explain this 
>>>> "feature" going on) ...
>>>>
>>>> The following seems to work A-1 for me in my testing (ignore the "pre" 
>>>> tags):
>>>>
>>>> 
>>>> <$button>
>>>>  <$action-createtiddler
>>>>  $basetitle="testTiddler"
>>>>  $template={{{ [[BASENAME-]addsuffix{!!grammar_class}] 
>>>> }}} >
>>>>
>>>>  <$action-navigate $to=<>/>
>>>>  
>>>>  create new test tiddler
>>>> 
>>>> 
>>>>
>>>> On Saturday, January 22, 2022 at 2:07:59 PM UTC-4 CarloGgi wrote:
>>>>
>>>>> hallo folks,
>>>>> i need to feed the $template parameter of an <$action-createtiddler> 
>>>>> widget with the correct template tiddler's name. The latter has a fixed 
>>>>> part 'BASENAME' and a parameterized (or variable) suffix, which is 
>>>>> choos

[tw5] Re: dynamically building a string by concatenation in a macro

2022-01-22 Thread CarloGgi
It worked like a charm, thanks! 
If it is really a bug, is there a dedicated place to submit it for analysis?

My TW version is 5.2.0

Thanks again and regards,
CG

On Saturday, January 22, 2022 at 9:57:46 PM UTC+2 cj.v...@gmail.com wrote:

> TiddlyTalk is a pain.  Let me try pasting that code again so that it shows 
> okay over there.
>
> ```
> <$button>
>  <$action-createtiddler
>  $basetitle="testTiddler"
>  $template={{{ [[BASENAME-]addsuffix{!!grammar_class}] }}} 
> >
>
>  <$action-navigate $to=<>/>
>  
>  create new test tiddler
> 
> ```
>
> On Saturday, January 22, 2022 at 3:53:48 PM UTC-4 Charlie Veniot wrote:
>
>> I'm thinking you found a bug related to how the action-createtiddler 
>> handles the $template parameter.
>>
>> In the meantime (i.e. until there is a fix or somebody can explain this 
>> "feature" going on) ...
>>
>> The following seems to work A-1 for me in my testing (ignore the "pre" 
>> tags):
>>
>> 
>> <$button>
>>  <$action-createtiddler
>>  $basetitle="testTiddler"
>>  $template={{{ [[BASENAME-]addsuffix{!!grammar_class}] 
>> }}} >
>>
>>  <$action-navigate $to=<>/>
>>  
>>  create new test tiddler
>> 
>> 
>>
>> On Saturday, January 22, 2022 at 2:07:59 PM UTC-4 CarloGgi wrote:
>>
>>> hallo folks,
>>> i need to feed the $template parameter of an <$action-createtiddler> 
>>> widget with the correct template tiddler's name. The latter has a fixed 
>>> part 'BASENAME' and a parameterized (or variable) suffix, which is choosen 
>>> by means of a <$select> input. The idea is to have a macro build the full 
>>> name based on the choice made by using <$select>, like in:
>>>
>>> \define templatename() BASENAME-{{!!grammar_class}}
>>>
>>> the suffix, as you can imagine, is taken from field grammar_class which 
>>> is set by the <$select> widget control.
>>>
>>> Now one would expect that things would work nice and easy writing this 
>>> code:
>>>
>>> <$button> create new test tiddler
>>>  <$action-createtiddler 
>>>  $basetitle='testTiddler'
>>>  $template=<> >
>>>  <$action-navigate $to=<>/>
>>>  
>>> 
>>>
>>> but disappointingly enough they do not! The new tiddler is created 
>>> indeed, but from NO TEMPLATE at all!
>>> Funny as it is, if we add a debug line like:
>>>
>>> template's name: <> 
>>>
>>> it displays correctly as
>>>
>>> BASENAME-verb (or BASENAME-noun, or adjective, or whatever the 
>>> <$select> choice was)
>>>
>>> Hard-coding the name in the macro makes the code work (just for testing 
>>> purposes, there is no point here to have a macro just echoing an hard-coded 
>>> string).
>>>
>>> Now, before I ask why ON EARTH the above code doesn't work, let me say 
>>> that I expect for it to be because of how macros are parsed and when macro 
>>> substitution is made, in which case I will do a little comment on it later.
>>>
>>> Thanks everybody,
>>> CG 
>>>
>>

-- 
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/c8572fbc-9594-49d7-9463-d56c4cdbf7e7n%40googlegroups.com.


[tw5] dynamically building a string by concatenation in a macro

2022-01-22 Thread CarloGgi
hallo folks,
i need to feed the $template parameter of an <$action-createtiddler> widget 
with the correct template tiddler's name. The latter has a fixed part 
'BASENAME' and a parameterized (or variable) suffix, which is choosen by 
means of a <$select> input. The idea is to have a macro build the full name 
based on the choice made by using <$select>, like in:

\define templatename() BASENAME-{{!!grammar_class}}

the suffix, as you can imagine, is taken from field grammar_class which is 
set by the <$select> widget control.

Now one would expect that things would work nice and easy writing this code:

<$button> create new test tiddler
 <$action-createtiddler 
 $basetitle='testTiddler'
 $template=<> >
 <$action-navigate $to=<>/>
 


but disappointingly enough they do not! The new tiddler is created indeed, 
but from NO TEMPLATE at all!
Funny as it is, if we add a debug line like:

template's name: <> 

it displays correctly as

BASENAME-verb (or BASENAME-noun, or adjective, or whatever the 
<$select> choice was)

Hard-coding the name in the macro makes the code work (just for testing 
purposes, there is no point here to have a macro just echoing an hard-coded 
string).

Now, before I ask why ON EARTH the above code doesn't work, let me say that 
I expect for it to be because of how macros are parsed and when macro 
substitution is made, in which case I will do a little comment on it later.

Thanks everybody,
CG 

-- 
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/530e8591-2cc7-4270-bfa3-f878cb195957n%40googlegroups.com.


[tw5] assigning macro output to a variable

2021-12-15 Thread CarloGgi
Hi everybody,
the struggle to get TW do what I want it to do goes on hopelessly.
I have a database of systems described by one data tiddler each, like this:

system_1
  tag: system
  feature 11: Y/N
  feature 12: Y/N
  feature 13: Y/N
  feature 14: Y/N

system_2
  tag: system
  feature 21: Y/N
  feature 22: Y/N
  feature 23: Y/N
  feature 24: Y/N

as you can easily guess, the tiddlers record what features system X 
supports or not.
Now I want to flexibly query my database for a certain feature, so I came 
up with this code:

\define check_feature(feature) [getindex[$feature$]trim[]match[Y]]

<$set name="has_feature" value=<$macrocall $name='check_feature' 
feature='IFTTT'/> >
  
  <$list filter="[tag[system]filter]" variable="sys">
   <$link to=<>> <>  
  
  



(in the example above I'm checking which systems are supported by IFTTT as 
you can imagine...). Fair enough, the above code DOESN'T work, because you 
cannot put a <$macrocall> widget as right-side element of the 'value' 
element of a <$set> widget. Ok, so how do I go? I know I could instead 
write:

<$set name="has_feature" value=<> >

and that would work, but I need to use the <$macrocall> widget because the 
next step is to make the 'feature' parameter dynamically chosen via a 
<$select> instruction, so I would need to call the macro as below:

<$macrocall $name='check_feature' feature={{!!current_chosen_feature}}/>

where of course field 'current_chosen_feature' wouldbe set by the <$select> 
widget.


Thanks in advance for helping. More and more TW seems to me like a too much 
beautiful, too much independent woman: you love her but you cannot make her 
listen to you...


-- 
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/83ace303-f3cd-4714-bbfe-b4f1bf0b8660n%40googlegroups.com.


[tw5] Re: appending to a 'list variable' through cycles

2021-11-28 Thread CarloGgi
Thanks a ton!

CG

On Sunday, November 28, 2021 at 1:28:08 PM UTC+2 PMario wrote:

> On Sunday, November 28, 2021 at 11:46:05 AM UTC+1 CarloGgi wrote:
>
>> Hi Mario, her I am, sorry for the late reply but I've been very much busy 
>> lately...
>> Your code works well, and I will thoroughly study it to improve my 
>> knowledge of Tiddlywiki, but it doesn't do what I'm looking for.
>>
>
> Hi, 
> As I wrote, TW search doesn't provide an easy way to search for "any" 
> search term. ... That's new ... I think the desire is valid and we should 
> support it out of the box. ... 
>
> I try to implement a new "search mode: any" for the search operator 
> <https://tiddlywiki.com/#search%20Operator>, so the outer list-widget in 
> my example should be able to return the right list of tiddlers, which will 
> make your logic much easier.  
>
> It will need some tests and docs ... I'll create a PR once I have 
> something that works. ... We'll see. 
>
> -mario
>
>

-- 
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/ce2b5917-dfc0-4364-8510-5051fbb5aa68n%40googlegroups.com.


[tw5] Re: appending to a 'list variable' through cycles

2021-11-28 Thread CarloGgi
Hi Mario, her I am, sorry for the late reply but I've been very much busy 
lately...
Your code works well, and I will thoroughly study it to improve my 
knowledge of Tiddlywiki, but it doesn't do what I'm looking for. When I 
input more than one keyword, the code should return ALL the tiddlers that 
contain AT LEAST one of them, listing the returned tiddlers so that they 
are not displayed more than once.
With your code when I input, say, 'feel' and 'smell' I only get 'sentir' as 
output, i.e. I only get those entries that translate to BOTH the words I 
input, while instead the output should be 

sentir, croire, toucher 

because EACH of the above tiddlers translates to AT LEAST one of the 
keywords.

My code behaves according to the requirements, except for the fact that it 
outputs the same entry as many times as the number of keywords it 
translates to, so searching for 'feel' and 'smell' returns

sentir  <- one hit for 'feel'
sentir  <- one hit for 'smell'
croire
toucher


Thanks a lot for your kind and committed help.

Regards,
CG

PS:   numbered indexes IT-xx do indeed establish a slight ranking among the 
translations of an entry, not so important though...

On Friday, November 26, 2021 at 1:52:21 PM UTC+2 PMario wrote:

> @Carlo, 
> Did you test the attached file I posted? 
> -mario
>
>

-- 
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/f469dd0f-bb26-45f0-900d-52c5a8f896fcn%40googlegroups.com.


[tw5] Re: appending to a 'list variable' through cycles

2021-11-21 Thread CarloGgi
it is indeed! I updated to TW 5.2.0 and it is gone now.

On Sunday, November 21, 2021 at 7:27:50 PM UTC+2 PMario wrote:

> > 1. it crashes TW with an 'internal Javascript error' red alert. I also 
> tried myself to write something similar, and every time I tried to use a 
> variable inside a subfilter, like  here, it made TW crash, which 
> made me think it was syntactically wrong, but now that you also use this 
> syntax I will try to troubleshoot the problem;
>
> This may be a bug in the core code.
>
> Could you open an issue at GitHub? I'll be at home tomorrow afternoon.
> -mario
>
>

-- 
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/12d823c8-5eb8-4667-9cef-d6b76ed38709n%40googlegroups.com.


[tw5] Re: variables in subfilters make TW crash

2021-11-21 Thread CarloGgi
BINGO!

Thanks. :)

On Sunday, November 21, 2021 at 3:44:56 PM UTC+2 saq.i...@gmail.com wrote:

> I suspect you are using TW v5.1.23 in which this is a know issue. 
> Upgrading to v5.2.0 should resolve it. If it does not, please report back.
>
> On Sunday, November 21, 2021 at 2:30:27 PM UTC+1 CarloGgi wrote:
>
>>
>> Hallo everybody, I go into trouble when using variables in subfilters, 
>> they make code as simple as
>>
>> <$list variable="indx" filter="[tag[myTag]indexes[]]">
>>
>> <$vars subf="[getindexsplit[,]trim[]match[aword]]">
>>
>> <$list filter="[tag[myTag]filter]" variable="result">
>>  <> 
>> 
>>
>> 
>>
>> 
>>
>> to crash TW with Internal Javascript error: "TypeError: widget is 
>> undefined"
>>
>>
>> Even narrowing down the outer <$list> to a simple <$set> widget as in
>>
>>
>> <$set name="indx" value="index-01">
>>
>> <$vars subf="[getindexsplit[,]trim[]match[aword]]">
>>
>> <$list filter="[tag[myTag]filter]" variable="result">
>>  <> 
>> 
>> 
>>
>> 
>>
>> doesn't improve things at all. Same Internal Javascript error: 
>> "TypeError: widget is undefined". It really looks like using variables 
>> inside subfilters is the problem, as soon as I replace it with a parameter, 
>> like for example
>>
>>   <$vars subf="[getindex[index-01]split[,]trim[]match[aword]]">
>>
>> Tiddliwiki stops complaining.
>>
>> Thanks for any hints, suggestions, etc.
>>
>> CG
>>
>> Ubuntu 18.04.6 LTS
>> Firefox 94.0
>>
>>

-- 
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/8811175a-f3df-4ef8-a1da-8293b4ed0af9n%40googlegroups.com.


[tw5] Re: variables in subfilters make TW crash

2021-11-21 Thread CarloGgi
I forgot the most important: TW version!

*Tiddlywiki* *5.1.23*
Ubuntu 18.04.6 LTS
Firefox 94.0

CG

On Sunday, November 21, 2021 at 3:30:27 PM UTC+2 CarloGgi wrote:

>
> Hallo everybody, I go into trouble when using variables in subfilters, 
> they make code as simple as
>
> <$list variable="indx" filter="[tag[myTag]indexes[]]">
>
> <$vars subf="[getindexsplit[,]trim[]match[aword]]">
>
> <$list filter="[tag[myTag]filter]" variable="result">
>  <> 
> 
>
> 
>
> 
>
> to crash TW with Internal Javascript error: "TypeError: widget is 
> undefined"
>
>
> Even narrowing down the outer <$list> to a simple <$set> widget as in
>
>
> <$set name="indx" value="index-01">
>
> <$vars subf="[getindexsplit[,]trim[]match[aword]]">
>
> <$list filter="[tag[myTag]filter]" variable="result">
>  <> 
> 
> 
>
> 
>
> doesn't improve things at all. Same Internal Javascript error: "TypeError: 
> widget is undefined". It really looks like using variables inside 
> subfilters is the problem, as soon as I replace it with a parameter, like 
> for example
>
>   <$vars subf="[getindex[index-01]split[,]trim[]match[aword]]">
>
> Tiddliwiki stops complaining.
>
> Thanks for any hints, suggestions, etc.
>
> CG
>
> Ubuntu 18.04.6 LTS
> Firefox 94.0
>
>

-- 
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/835b4d32-5d34-42fd-aec8-8de326bcae96n%40googlegroups.com.


[tw5] variables in subfilters make TW crash

2021-11-21 Thread CarloGgi

Hallo everybody, I go into trouble when using variables in subfilters, they 
make code as simple as

<$list variable="indx" filter="[tag[myTag]indexes[]]">

<$vars subf="[getindexsplit[,]trim[]match[aword]]">

<$list filter="[tag[myTag]filter]" variable="result">
 <> 






to crash TW with Internal Javascript error: "TypeError: widget is undefined"


Even narrowing down the outer <$list> to a simple <$set> widget as in


<$set name="indx" value="index-01">

<$vars subf="[getindexsplit[,]trim[]match[aword]]">

<$list filter="[tag[myTag]filter]" variable="result">
 <> 





doesn't improve things at all. Same Internal Javascript error: "TypeError: 
widget is undefined". It really looks like using variables inside 
subfilters is the problem, as soon as I replace it with a parameter, like 
for example

  <$vars subf="[getindex[index-01]split[,]trim[]match[aword]]">

Tiddliwiki stops complaining.

Thanks for any hints, suggestions, etc.

CG

Ubuntu 18.04.6 LTS
Firefox 94.0

-- 
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/912336c7-faa8-4451-a030-63f30a52a8c5n%40googlegroups.com.


[tw5] Re: appending to a 'list variable' through cycles

2021-11-21 Thread CarloGgi
Dear PMario, your code

<$list filter=[tag[dict-AR]indexes] variable=index>
<$set name="subf" value="[getindexsplit[,]trim[]match]">

<$list filter="[tag[dict-AR]filter]" variable="entry">
 <> 




COULD do the trick, but:

1. it crashes TW with an 'internal Javascript error' red alert. I also 
tried myself to write something similar, and every time I tried to use a 
variable inside a subfilter, like  here, it made TW crash, which 
made me think it was syntactically wrong, but now that you also use this 
syntax I will try to troubleshoot the problem;

2. since the 'match' test must not be done against a single keyword but 
against a *set* of keywords, in order to get rid of duplicate lines of 
output the 'match' test in the  subfilter must be re-written accordingly. 
Lacking the flexibility of true variables, the only workaround I could come 
up with to avoid duplicate lines of output is to perform the test on ALL 
the keywords of the set for every property of every data tiddler, I mean to 
say that each property must be tested for matching against EVERY keyword in 
a single filter's pass. If you bother reading why, you can find a thorough 
clarification why futher below.

Anyway, the two crucial points still to be worked out are: 

a) writing a subfilter's 'match' test that testes against not just one 
single keyword but against a SET of keywords in a single filter's pass and
b) making TW accept variables inside subfilters without crashing

I will work on point a), while for point b) there is little I can do but 
maybe trying to update TW to the latest version (the one I currently use is 
5.1.23) or maybe update the javascript engine of my browser...

Now for a very verbose description of how my dictionary is structured and 
the trick to avoid duplicate lines of output:

my dictionary is a cross-language dictionary (say for example French to 
English -these are not the true languages though) where each entry is a 
data tiddler whose properties are groups of words translating the entry's 
meaning like for example:

permettre
  IT-01: allow
  IT-02: enable, permit
  IT-03: let, license

sentir 
  IT-01: feel
  IT-02: smell, sense, sniff, stink

toucher
  IT-01: touch
  IT-02: affect
  IT-03: feel
  IT-04: hit, receive, contact

croire
  IT-01: believe, think
  IT-02: suppose, imagine
  IT-03: feel
  IT-04: consider

As you might have noticed, for every french entry there are different 
groups of english words translating it, because (as it is common in many 
dictionaries) some translations' meanings are more 'nearly related' to each 
other (almost interchangeably) than others and so they are grouped together 
in a single row. I could have gone for a different structure, having -say- 
just one dictionary tiddler whose indexes were french words and whose 
properties were groups of english words translating the indexes, but I 
decided to exclude this solution because it lacks the rich data structure 
that individual tiddlers' fields offer and which I use to store the 
meta-data of each entry (grammatical category, infinitive, participles, 
preposition it goes with, etc.). Moreover, having the entries stored as 
individual tiddlers allows for the best exploitation possible of TW rich 
search-and-filter features, which I use to study and learn the target 
language with a lot of custom code. So the wiki is not only a language 
dictionary, but actually a platform built on top of it to enable the study 
of the language.

One of the customized pieces of code I care of most is this search (call it 
apropos if you like) for french equivalent of some english keywords (to 
continue with the example of the French-English dictionary), because one of 
the exercises I do is write a text in English and try to translate it on 
the fly to French, so having some code that quickly spits out one or more 
french equivalents for some of the english words whose translation I'm in 
doubt of is invaluable. It just takes for me to 'tag' each word with an 
hyperlink (hyperlink that doesn't point to an actual tiddler, is just a 
convenient way of tagging words in a text for the code to easily collect 
them through links[] operator) and my code, fed with the exercise's text, 
does all the burden of searching through the dictionary for me: super!

Say for example that I want to search for the french word(s) for 'feel', my 
code would hopefully output this:

sentir:  feel; smell, sense, sniff, stink
croire: believe, think; suppose, imagine; feel; consider

In my output, since I want to render each entry in a single text row, I use 
a semicolon ';' to join all the different groups of words (rows) together, 
while keeping the comma ',' as a separator for words belonging to the same 
group.

So far so good, but when I say 'nice format' I also mean avoiding 
duplicates. Duplicates can occur when you search for more than an english 
word at the same time. Say that you search for words 'feel' and 'smell' 
together. 

[tw5] Re: appending to a 'list variable' through cycles

2021-11-20 Thread CarloGgi
actually, the task of parameterizing the code over a whole data tiddler's 
indexes set is not challenging in itself, I already did and pasted above. 
What is challenging, better said: impossible! , is to complete this latter 
chunk of code

<$set name="subf" value="[getindex[IT-01]split[,]trim[]match]">

<$list filter="[tag[dict-AR]filter]" variable="entry">
 <> 




with a (sub)filter step -possibly stored in a variable- that parameterizes 
it so it can work over the whole set of a dictionary entry's indexes...  
Anyway the subfilter's way is a winner, I'll stick to it.

On Saturday, November 20, 2021 at 3:51:12 PM UTC+2 CarloGgi wrote:

> subfilters are key! I just came across 'filter' operator and I'm pretty 
> much confident it can do what I want.
> So far I was able to implement this test code
>
> <$set name="subf" value="[getindex[IT-01]split[,]trim[]match]">
> 
> <$list filter="[tag[dict-AR]filter]" variable="entry">
>  <> 
> 
> 
> 
>
> which behaves the way I want because the filter in the inner <$list> scans 
> ALL the dictionary entries (tag[dict-AR]) and outputs those whose IT-01 
> index's content matches the keyword dominantly appending them -that's the 
> word I was missing- to the output, so ridding the output of any duplicates.
> Now the problem is to parameterize the code so to have it run on ALL the 
> indexes (IT-01, IT-02, IT-03, ...) of every data tiddler, and this last 
> step, once again, is CHALLENGING.
>
> On Saturday, November 20, 2021 at 2:20:38 PM UTC+2 PMario wrote:
>
>> On Saturday, November 20, 2021 at 12:12:54 PM UTC+1 CarloGgi wrote:
>>
>>> Hi PMario, thanks a lot, indeed my code is inconsistent because in an 
>>> attempt to give a generic example, not tied tho the specific issue, I tried 
>>> to simplify it (and I ended up to over-simplify it). 
>>>
>>
>> I thought about this, that's why I did try to create something that could 
>> have been a possibility and shows how TW filters work. .. Filters are the 
>> powerful thing in TW. 
>>
>> If you come from a programmers background, TW is different and needs a 
>> bit of a different thinking, because it is targeted to non-programmers ... 
>>
>> The whole TW UI is built with filters and wikitext templates and makes 
>> heavy use of recursions especially in the core code. 
>>  
>>
>>> Lots of stuff to reply to, let's go through it point by point:
>>>
>>> 1. indeed widgets are no programming language, that's why I used the 
>>> word 'environment', not 'language';
>>>
>>
>> Widgets don't have a return value ... They manipulate the DOM ... eg:
>>
>> ```
>> 
>> <$list filter="[tag[todo]]">
>>   <$text text=<> />
>> 
>> 
>> ```
>>
>> From a programmers point of view, you'd probably want to "add" some 
>> variables inside the "list -loop"... But
>>
>> Let's say I have 2 tiddlers "a" and "b" tagged "todo"
>> `[tag[todo]]` returns a list and the list widget internally assigned the 
>> element to an internal variable named `currentTiddler`, then it iterates 
>> over the list and outputs the dom elements in the "list-body". 
>>
>> The "list-body" is between `<$list filter ...>   list body is here 
>> ` which looks similar to a function, but it isn't...
>>
>> The resulting HTML code will look like this: 
>>
>> ```
>>  
>>   a
>>   b
>> 
>> ```
>>
>> So widgets don't calculate variables, they are used to manipulate the 
>> HTML output 
>>
>> ```
>> 
>> <$list filter="[tag[todo]]">
>>  <$link  />
>> 
>> 
>> ```
>>
>> This example uses a lot of shortcuts with TW default values. `<$list 
>> filter="[tag[todo]]">` is a shortcut for: `<$list filter="[tag[todo]]" 
>> variable="currentTiddler" >`.  `<$link />` is a shortcut for `<$link 
>> to=<> />`
>>
>> The HTML output is 
>>
>> ```
>> 
>>   a
>>   b
>> 
>> ```
>>  
>>
>>> 2.  it is frustratingly difficult to output a number of text entries 
>>> (filtered out from a db made of data tiddlers) excluding duplicates, and 
>>> this because in TW you cannot assign to a 'variable' other than at 
>>> declaration t

[tw5] Re: appending to a 'list variable' through cycles

2021-11-20 Thread CarloGgi
subfilters are key! I just came across 'filter' operator and I'm pretty 
much confident it can do what I want.
So far I was able to implement this test code

<$set name="subf" value="[getindex[IT-01]split[,]trim[]match]">

<$list filter="[tag[dict-AR]filter]" variable="entry">
 <> 




which behaves the way I want because the filter in the inner <$list> scans 
ALL the dictionary entries (tag[dict-AR]) and outputs those whose IT-01 
index's content matches the keyword dominantly appending them -that's the 
word I was missing- to the output, so ridding the output of any duplicates.
Now the problem is to parameterize the code so to have it run on ALL the 
indexes (IT-01, IT-02, IT-03, ...) of every data tiddler, and this last 
step, once again, is CHALLENGING.

On Saturday, November 20, 2021 at 2:20:38 PM UTC+2 PMario wrote:

> On Saturday, November 20, 2021 at 12:12:54 PM UTC+1 CarloGgi wrote:
>
>> Hi PMario, thanks a lot, indeed my code is inconsistent because in an 
>> attempt to give a generic example, not tied tho the specific issue, I tried 
>> to simplify it (and I ended up to over-simplify it). 
>>
>
> I thought about this, that's why I did try to create something that could 
> have been a possibility and shows how TW filters work. .. Filters are the 
> powerful thing in TW. 
>
> If you come from a programmers background, TW is different and needs a bit 
> of a different thinking, because it is targeted to non-programmers ... 
>
> The whole TW UI is built with filters and wikitext templates and makes 
> heavy use of recursions especially in the core code. 
>  
>
>> Lots of stuff to reply to, let's go through it point by point:
>>
>> 1. indeed widgets are no programming language, that's why I used the word 
>> 'environment', not 'language';
>>
>
> Widgets don't have a return value ... They manipulate the DOM ... eg:
>
> ```
> 
> <$list filter="[tag[todo]]">
>   <$text text=<> />
> 
> 
> ```
>
> From a programmers point of view, you'd probably want to "add" some 
> variables inside the "list -loop"... But
>
> Let's say I have 2 tiddlers "a" and "b" tagged "todo"
> `[tag[todo]]` returns a list and the list widget internally assigned the 
> element to an internal variable named `currentTiddler`, then it iterates 
> over the list and outputs the dom elements in the "list-body". 
>
> The "list-body" is between `<$list filter ...>   list body is here 
> ` which looks similar to a function, but it isn't...
>
> The resulting HTML code will look like this: 
>
> ```
>  
>   a
>   b
> 
> ```
>
> So widgets don't calculate variables, they are used to manipulate the HTML 
> output 
>
> ```
> 
> <$list filter="[tag[todo]]">
>  <$link  />
> 
> 
> ```
>
> This example uses a lot of shortcuts with TW default values. `<$list 
> filter="[tag[todo]]">` is a shortcut for: `<$list filter="[tag[todo]]" 
> variable="currentTiddler" >`.  `<$link />` is a shortcut for `<$link 
> to=<> />`
>
> The HTML output is 
>
> ```
> 
>   a
>   b
> 
> ```
>  
>
>> 2.  it is frustratingly difficult to output a number of text entries 
>> (filtered out from a db made of data tiddlers) excluding duplicates, and 
>> this because in TW you cannot assign to a 'variable' other than at 
>> declaration time, so you cannot incrementally append your entries to a 
>> 'list' variable for post-processing. 
>>
>
> That's right from a programmers point of view. ... But it will be very 
> elegant, once you understand the mechanism. ... 
> As I wrote TW uses sensible defaults for widget parameters, that's why it 
> is important to have a closer look at the docs. ..
>  
>
>> Acknowledging that TW is not a full-featured programming language, I'm 
>> pretty much sure that it was conceived to enable users to do such kind of 
>> stuff: filter out and manipulate chunks of text;
>>
>
> As I wrote it's built to manipulate text. .. As above it's designed to 
> manipulate the DOM ... May be this view will make it clearer for you.
>  
>
>> 3. filters have if-then-else logic but only to a limited scope. Filters' 
>> if-then-else statements can only output text strings;
>>
>
> Not really, they can also be used with variables eg: 
> `[tag[todo]get]` or `[tag[todo]get{reference}]`
>
> With the *first* example if you $set variable to eg: `hugo`, it will read 
> the content of the `h

[tw5] Re: appending to a 'list variable' through cycles

2021-11-20 Thread CarloGgi
Hi PMario, thanks a lot, indeed my code is inconsistent because in an 
attempt to give a generic example, not tied tho the specific issue, I tried 
to simplify it (and I ended up to over-simplify it). 
Lots of stuff to reply to, let's go through it point by point:

1. indeed widgets are no programming language, that's why I used the word 
'environment', not 'language';

2. regardless of the (poor) consistency of my pseudo-code (I should have 
better stressed out that it  was such) the point at the core of my post is 
this: it is frustratingly difficult to output a number of text entries 
(filtered out from a db made of data tiddlers) excluding duplicates, and 
this because in TW you cannot assign to a 'variable' other than at 
declaration time, so you cannot incrementally append your entries to a 
'list' variable for post-processing. Acknowledging that TW is not a 
full-featured programming language, I'm pretty much sure that it was 
conceived to enable users to do such kind of stuff: filter out and 
manipulate chunks of text;

3. filters have if-then-else logic but only to a limited scope. Filters' 
if-then-else statements can only output text strings;

4. filters indeed create and deal with lists, so the only place where 
hopefully I can do my processing is within a filter, but it is quite 
difficult to write a one-liner that does what I want, let me paste my true 
code below (I'm sure that a better developer could write a more elegant, 
more synthetic one merging some of the <$list> widgets together into a 
single one)...

<$list filter=[enlist{!!keywords}] variable='keyword'> 
   <$list filter="[tag[dict-AR]]" variable='entry'> 
   <$list filter="[indexes[]]" variable='indx'>
 <$set name="hit" filter="[getindexsplit[,]trim[ 
]match]"  
value="<$macrocall $name='astr' entry=<> />" 

emptyValue="" 
 > 
<>   
 
  
   


As you can see, there is no simple way to prevent outputting duplicates 
with the code above. It should be completely re-arranged to append 
'uniquely' (greedily? I miss the exact word to say 'without duplicates') to 
the list of hits before outputting it. My dictionary is made up of data 
tiddler entries structured as below:

Entry1
indx11: word1a, word1b, ...
indx12: word1c, word1d, ...

Entry2
indx21: word2a, word2b, ...
indx22: word2c, word2d, ...

...

Thanks and regards,
CG

On Friday, November 19, 2021 at 11:29:55 PM UTC+2 PMario wrote:

> Hi, 
> Widgets are no programming language. ... The ` <$list ` widget is no loop. 
> ... It's more like a template to create text output ... 
>
> *Filters produce lists* so `[tag[dict_entry]] ` will return a list of 
> tiddler titles, that are tagged  ` dict_entry `  ... Tiddler titles are 
> unique.
>
> So `[tag[dict_entry]match[keyword]]`  will only return 1 tiddler name: 
> keyword, since there can't be a second tiddler with the same name. ... So 
> this part of your "code" doesn't make too much sense. 
>
> ` [tag[dict_entry]get[db_hit]match[keyword] ` would make sense, if db_hit 
> is a field of a tiddler. ... BUT that's probably not what you want. 
>
> That's why I use the tiddler text as the field that contains the keyword.
> Let's say we have 3 tiddlers
>
> ```
> title: a
> text: keyword
> db_hit: aa
>
> title: b 
> text: keyword
> db_hit: bb
>
> title: c
> text: no keyword
> db_hit: cc
> ```
>
> So `[tag[dict-entry]] :filter[get[text]match[keyword]]` will return a 
> list: ` a b ` . So we have a list of tiddlers that match the keyword. 
> Now we need to read the db_hit value
>
> The following wikitext is probably all you need, as far as I can interpret 
> your "code".
>
> ```
> <$set name="myList" filter="[tag[dict-entry]] 
> :filter[get[text]match[keyword]] ">
> <$set name=hitList filter="[enlistget[db_hit]addsuffix[, ]]">
> Entries matching keyword: <>
> 
> ```
>
> In TW filters are the powerful features. ... Widgets are there to create 
> text output with templates. Filters have match, then, else and other fancy 
> stuff. 
>
> I'm not sure, if that's what you really want. .. 
> *You should describe your data structure first similar to what I did with 
> my 3 example tiddlers. *
> *From your code we don't see where the `*db_hit*` value comes from.*
> *We don't see, where the *`keyword ` *is defined*
>
> Whith that info missing it's hard to know what you really need. 
>
> See the docs: 
> https://tiddlywiki.com/#tag%20Operator:%5B%5Btag%20Operator%5D%5D%20%5B%5Benlist%20Operator%5D%5D%20%5B%5Bget%20Operator%5D%5D%20%5B%5BFilter%20Expression%5D%5D%20%5B%5Bfilter%20Operator%5D%5D%20%5B%5BFilter%20Operators%5D%5D
>
> I hope that helps.
> Mario
>
>

-- 
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 

[tw5] appending to a 'list variable' through cycles

2021-11-19 Thread CarloGgi
Hallo everyone, how do I append to a list of items through different 
cycle-runs of the code? The most intuitive way to do it would be haveing a 
variable that stores my list, but as far as I can see, in Tiddlywiki you 
cannot assign to a 'variable' other than at declaration time.
Once you have written <$set name="myVar" value="whatever">, it's not 
possible to assign to myVar, as

<$set name="myVar" value="whatever">
  ...
  myVar="some other value"


and because of that, it becomes very hard to incrementally append items to 
a list of items from within different cycle-runs of a <$list> widget.

The only 'variables' you can assign to in Tiddlywiki seem to be tiddlers' 
fields and/or indexes, but this cannot be done other than interactively, by 
means of action-widgets like action-setfield and interactive elements like 
buttons, checkboxes etc.
Moreover, you have to desperately squeeze all the processing logic of 
filters inside widgets (<$list> or <$set> for the most part), so this chunk 
of code, which would be a snap in every other programming environment, is 
not correct and it is horribly hard to write an equivalent that is 
syntactically correct:

<$set name="myList" value="">
<$list filter="[tag[dict_entry]match[keyword]]" 
   variable="db_hit">
   [append]


[[myList]sort[]]+[unique[]]
Entries matching keyword: <>


As one can see, the reason why I need to store the output of every 
cycle-run of the <$list> inside a list variable instead of just outputting 
it to screen is that I might want to process my list when I'm done 
appending to it (removing duplicates for example) before outputting it, as 
in the (syntactically wrong) statement

[[myList]sort[]]+[unique[]]

Tiddlywiki is a great platform to process text, I can guess its huge 
potentiality, but lacking true variables (and if-then-else flow branching, 
and functions) is an horribly frustrating restriction, it takes me hours, 
if not days, to try and write code that would take me minutes in other 
environments to write, and most of the time I end up giving in...


-- 
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/8169b956-7b56-48ec-aafd-220b4b438c75n%40googlegroups.com.


[tw5] Re: ACE editor plugin

2021-11-06 Thread CarloGgi
Thanksalot, I will have a look at it. 

On Saturday, November 6, 2021 at 4:55:12 PM UTC+2 PMario wrote:

> Hi CG,
>
> CodeMirro may be an option: https://tiddlywiki.com/#CodeMirror%20Plugin 
> Also have a look at: https://github.com/Gk0Wk/TW5-CodeMirror-Enhanced
>
> -mario
>
> -mario
>

-- 
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/254d9e6f-76dc-46ef-8c37-0a49290fa530n%40googlegroups.com.


[tw5] Re: ACE editor plugin

2021-11-06 Thread CarloGgi
It worked nice and easy, thanks!

On Saturday, November 6, 2021 at 3:02:23 PM UTC+2 cj.v...@gmail.com wrote:

> Hello,
>
> Drag the $:/plugins/innoq/ace 
> <http://innoq.tiddlyspot.com/#%24%3A%2Fplugins%2Finnoq%2Face> link to the 
> top-ish part of your TiddlyWiki and drop, which should bring up an import 
> tiddler.
>
> That will bring in all of the necessaries.
>
> (Well, dragging each shadow tiddler might work, but I'm thinking much 
> better to have dragged that one link to get everything.)
>
> Because this plugin has javascript, the plugin will not work until you 
> save your TiddlyWiki and reload it.
>
>
>
> On Saturday, November 6, 2021 at 9:01:35 AM UTC-3 CarloGgi wrote:
>
>> Hallo, how do I install Joerg Plewe's ACE editor plugin?
>>
>> I imported by dragging and dropping into my wiki the whole set of shadow 
>> tiddlers, but I guess it's not enough and indeed when I open a new tiddler 
>> it gives error 'Undefined widget 'edit-aceeditor''
>>
>> Couldn't find any clue on how to correctly install the plugin on 
>> https://tiddlywiki.com/static/Ace%2520Editor%2520Plugin%2520by%2520Joerg%2520Plewe.html
>>  
>>
>> $:/plugins/innoq/ace 
>> Plugin Details
>>
>> This plugin contains the following shadow tiddlers:
>>
>>- $:/config/EditorTypeMappings/application/javascript 
>>- $:/config/EditorTypeMappings/application/json 
>>- $:/config/EditorTypeMappings/application/x-tiddler-dictionary 
>>- $:/config/EditorTypeMappings/text/css 
>>- $:/config/EditorTypeMappings/text/html 
>>- $:/config/EditorTypeMappings/text/plain 
>>- $:/config/EditorTypeMappings/text/vnd.tiddlywiki 
>>- $:/config/EditorTypeMappings/text/x-tiddlywiki 
>>- $:/plugins/innoq/ace/ace.js 
>>- $:/plugins/innoq/ace/aceplugin.js 
>>
>> BTW tis code seems not longer maintained since quite a while, are there 
>> any other choices of a decent embedded editor for TW code?
>>
>> Thanks,
>> CG
>>
>

-- 
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/b36acaf1-a3be-4bd6-b458-11941ee2fc47n%40googlegroups.com.


[tw5] ACE editor plugin

2021-11-06 Thread CarloGgi
Hallo, how do I install Joerg Plewe's ACE editor plugin?

I imported by dragging and dropping into my wiki the whole set of shadow 
tiddlers, but I guess it's not enough and indeed when I open a new tiddler 
it gives error 'Undefined widget 'edit-aceeditor''

Couldn't find any clue on how to correctly install the plugin on 
https://tiddlywiki.com/static/Ace%2520Editor%2520Plugin%2520by%2520Joerg%2520Plewe.html
 


$:/plugins/innoq/ace 
Plugin Details

This plugin contains the following shadow tiddlers:

   - $:/config/EditorTypeMappings/application/javascript 
   - $:/config/EditorTypeMappings/application/json 
   - $:/config/EditorTypeMappings/application/x-tiddler-dictionary 
   - $:/config/EditorTypeMappings/text/css 
   - $:/config/EditorTypeMappings/text/html 
   - $:/config/EditorTypeMappings/text/plain 
   - $:/config/EditorTypeMappings/text/vnd.tiddlywiki 
   - $:/config/EditorTypeMappings/text/x-tiddlywiki 
   - $:/plugins/innoq/ace/ace.js 
   - $:/plugins/innoq/ace/aceplugin.js 

BTW tis code seems not longer maintained since quite a while, are there any 
other choices of a decent embedded editor for TW code?

Thanks,
CG

-- 
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/50afbbf9-98e9-42d1-9155-34b0a804e7can%40googlegroups.com.


[tw5] Re: searching for an item in a list stored as a tiddler's field

2021-10-16 Thread CarloGgi
it turns out that in any filter written as

 filter="[[whatever_selection_here]title[xyzxyz]]"

all the selection preceding the step with tiddler's title is dropped and 
only that title is retained and passed on to the next step -if there is 
any. (And this wheter any xyzxyz tiddler exists or not by the way).

so for example 

 filter="[tag[bar]title[foo]]"

outputs foo, even if tiddler foo has no 'bar' tag at all, and even if 
tiddler foo doesn't exist. This explains the apparently strange behavior 
above, and it is also quite counter-intuitive (one would intuitively expect 
the filter to output all the tiddlers -zero or one actually- that match 
title 'foo' and are tagged 'bar') so this behavior would deserve to be  
highlighted strongly in the documentation IMHO.

On Saturday, October 16, 2021 at 7:01:53 PM UTC+3 CarloGgi wrote:

> with reference to my previous post, no need to say neither this code works 
> for the inner filter:
> <$set name='my_tiddler' value='tiddler-X'>
> ...
>filter="[enlist{!!my_tiddlers_list}]">
>
> nor this:
>
> <$set name='my_tiddler' value='tiddler-X'>
> ...
>filter="[[enlist{!!my_tiddlers_list}]]">
>
> they both always output the value of <>, whether it was 
> included in my_tiddlers_list or not.
>
> On Saturday, October 16, 2021 at 6:51:15 PM UTC+3 CarloGgi wrote:
>
>> Hallo again,
>> I have some tiddlers with a special field, call it 'my_tiddlers_list' 
>> that stores, not hard to guess, a list of other tiddlers. By 'list' I mean 
>> to say the result of an <$action-listops xxx subfilter> widget, which is 
>> indeed some 'collection' of items separated by whitespace. I don't know if 
>> that's a 'list' in the sense of a type of variable (does TW have any 
>> variable types after all? It seems it doesn't).
>> Anyway, how do I go to check if a given tiddler 'tiddler-X' is included 
>> in the list of tiddlers stored into field 'my_tiddlers_list' of a[ny] 
>> tiddler? When I transclude the reference to 'my_tiddlers_list' as in 
>> {{!!my_tiddlers_list}}what i get is a unique 'string'. How do I split it up 
>> into its single member items? And once split the string into tokens (its 
>> member items), ho do I perform the comparison check?
>>
>> So far, I came up with this very beginner-level code (I'm sure there are 
>> more elegant, concise ways to write it, merging the two filters into a 
>> single one and getting rid of one of the <$list> cycles) that tries to 
>> exploit 'enlist' operator. I leave some parts as 'pseudocode' because I 
>> don't know how to write them:
>>
>> <$set name='my_tiddler' value='tiddler-X'>
>>
>> <$list  filter="[tag[mytag]has:field[my_tiddlers_list]]" >
>><$list 
>> filter="[enlist{!!my_tiddlers_list}canIDoTheComparisonHere?]">
>> orShallICompareHere? AndIfSo,How?
>>  
>> 
>>
>> 
>>
>> but have no clue if I'm going the right way and how to do the comparison 
>> check.
>>
>> Writing inner filter as filter="[enlist{!!my_tiddlers_list}[tiddler-X]]" 
>> doesn't work, nor does it work writing it as 
>> filter="[[enlist{!!my_tiddlers_list}][tiddler-X]]". In both cases I get 
>> <> valued as tiddler-X, regardless if it is included in 
>> my_tiddlers_list's list or not. For God's sake: why? And how do I write the 
>> check? 
>>
>> Thanks for helping,
>> CG
>>
>

-- 
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/9576e64a-8d12-46a5-9688-bf8a2dd9b3a8n%40googlegroups.com.


[tw5] Re: searching for an item in a list stored as a tiddler's field

2021-10-16 Thread CarloGgi
with reference to my previous post, no need to say neither this code works 
for the inner filter:
<$set name='my_tiddler' value='tiddler-X'>
...
   filter="[enlist{!!my_tiddlers_list}]">

nor this:

<$set name='my_tiddler' value='tiddler-X'>
...
   filter="[[enlist{!!my_tiddlers_list}]]">

they both always output the value of <>, whether it was 
included in my_tiddlers_list or not.

On Saturday, October 16, 2021 at 6:51:15 PM UTC+3 CarloGgi wrote:

> Hallo again,
> I have some tiddlers with a special field, call it 'my_tiddlers_list' that 
> stores, not hard to guess, a list of other tiddlers. By 'list' I mean to 
> say the result of an <$action-listops xxx subfilter> widget, which is 
> indeed some 'collection' of items separated by whitespace. I don't know if 
> that's a 'list' in the sense of a type of variable (does TW have any 
> variable types after all? It seems it doesn't).
> Anyway, how do I go to check if a given tiddler 'tiddler-X' is included in 
> the list of tiddlers stored into field 'my_tiddlers_list' of a[ny] tiddler? 
> When I transclude the reference to 'my_tiddlers_list' as in 
> {{!!my_tiddlers_list}}what i get is a unique 'string'. How do I split it up 
> into its single member items? And once split the string into tokens (its 
> member items), ho do I perform the comparison check?
>
> So far, I came up with this very beginner-level code (I'm sure there are 
> more elegant, concise ways to write it, merging the two filters into a 
> single one and getting rid of one of the <$list> cycles) that tries to 
> exploit 'enlist' operator. I leave some parts as 'pseudocode' because I 
> don't know how to write them:
>
> <$set name='my_tiddler' value='tiddler-X'>
>
> <$list  filter="[tag[mytag]has:field[my_tiddlers_list]]" >
><$list 
> filter="[enlist{!!my_tiddlers_list}canIDoTheComparisonHere?]">
> orShallICompareHere? AndIfSo,How?
>  
> 
>
> 
>
> but have no clue if I'm going the right way and how to do the comparison 
> check.
>
> Writing inner filter as filter="[enlist{!!my_tiddlers_list}[tiddler-X]]" 
> doesn't work, nor does it work writing it as 
> filter="[[enlist{!!my_tiddlers_list}][tiddler-X]]". In both cases I get 
> <> valued as tiddler-X, regardless if it is included in 
> my_tiddlers_list's list or not. For God's sake: why? And how do I write the 
> check? 
>
> Thanks for helping,
> CG
>

-- 
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/6f96543d-e5c6-4281-9dab-294df5a78955n%40googlegroups.com.


[tw5] searching for an item in a list stored as a tiddler's field

2021-10-16 Thread CarloGgi
Hallo again,
I have some tiddlers with a special field, call it 'my_tiddlers_list' that 
stores, not hard to guess, a list of other tiddlers. By 'list' I mean to 
say the result of an <$action-listops xxx subfilter> widget, which is 
indeed some 'collection' of items separated by whitespace. I don't know if 
that's a 'list' in the sense of a type of variable (does TW have any 
variable types after all? It seems it doesn't).
Anyway, how do I go to check if a given tiddler 'tiddler-X' is included in 
the list of tiddlers stored into field 'my_tiddlers_list' of a[ny] tiddler? 
When I transclude the reference to 'my_tiddlers_list' as in 
{{!!my_tiddlers_list}}what i get is a unique 'string'. How do I split it up 
into its single member items? And once split the string into tokens (its 
member items), ho do I perform the comparison check?

So far, I came up with this very beginner-level code (I'm sure there are 
more elegant, concise ways to write it, merging the two filters into a 
single one and getting rid of one of the <$list> cycles) that tries to 
exploit 'enlist' operator. I leave some parts as 'pseudocode' because I 
don't know how to write them:

<$set name='my_tiddler' value='tiddler-X'>

<$list  filter="[tag[mytag]has:field[my_tiddlers_list]]" >
   <$list filter="[enlist{!!my_tiddlers_list}canIDoTheComparisonHere?]">
orShallICompareHere? AndIfSo,How?
 




but have no clue if I'm going the right way and how to do the comparison 
check.

Writing inner filter as filter="[enlist{!!my_tiddlers_list}[tiddler-X]]" 
doesn't work, nor does it work writing it as 
filter="[[enlist{!!my_tiddlers_list}][tiddler-X]]". In both cases I get 
<> valued as tiddler-X, regardless if it is included in 
my_tiddlers_list's list or not. For God's sake: why? And how do I write the 
check? 

Thanks for helping,
CG

-- 
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/8825afc3-ec4e-4913-8e47-c4cc09427c14n%40googlegroups.com.


[tw5] Re: piped links: show the 'label' part

2021-10-13 Thread CarloGgi
Thanks PMario, not was I was looking for but worth seeing. I'm using 
Tiddlywiki to (try to) take notes on Arabic language, which has a 
right-to-left script, that's why in my case the label is displayed to the 
right of the pipe | character.

Regards,
CG

On Saturday, October 9, 2021 at 9:11:52 PM UTC+3 PMario wrote:

> > is there a different operator to retrieve the 'label' part? 
>
> I'm sorry: No. 
>
> It is: [[label|tiddler-name]]  btw.
>
> I did create the uni-link plugin that allows you to use aliases, like: 
>
> [[alias name|?]] ... Then the tiddler itself needs an aliases - field eg: 
>
> title: Anikin Skywalker
> aliases: [[darth vader]] [[the chosen one]]
>
> can be referenced by either [[Darth Vader|?]] or [[tHe chOOsen one|?]]
>
> Both alias links will be valid, since aliases are _not_ case sensitive. 
>
> The plugin can be found at: 
> https://wikilabs.github.io/editions/uni-link/#GettingStarted .. Have a 
> look at the video!
>
> The plugin includes some new filter operators: see: 
> https://wikilabs.github.io/editions/uni-link/#%24%3A%2Fplugins%2Fwikilabs%2Funi-link%2Freadme
>
> have fun
> mario
>
>

-- 
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/4a60b15b-2fee-4a85-8e5e-1702b297bde1n%40googlegroups.com.


[tw5] Re: piped links: show the 'label' part

2021-10-09 Thread CarloGgi
actually, a better subject would have been 'find the label part of a piped 
link in a filter'

On Saturday, October 9, 2021 at 3:45:04 PM UTC+3 CarloGgi wrote:

> Hi everyone, how do I retrieve the 'label' -call it so- part of a 
> wikitext's piped link in Tiddlywiki? By 'label part' I mean to say the 
> clickable text that is shown on screen, and by 'piped link' I mean to say 
> something like `[[true_link|label part]]`.
> The 'links[]' filter operator only returns the 'true_link' part of the 
> piped link, which is quite consistent with the operator's name: is there a 
> different operator to retrieve the 'label' part?
>
> Thanks,
> CG
>

-- 
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/5feacb0e-ee7e-4b02-b9df-48e3f87251cbn%40googlegroups.com.


[tw5] piped links: show the 'label' part

2021-10-09 Thread CarloGgi
Hi everyone, how do I retrieve the 'label' -call it so- part of a 
wikitext's piped link in Tiddlywiki? By 'label part' I mean to say the 
clickable text that is shown on screen, and by 'piped link' I mean to say 
something like `[[true_link|label part]]`.
The 'links[]' filter operator only returns the 'true_link' part of the 
piped link, which is quite consistent with the operator's name: is there a 
different operator to retrieve the 'label' part?

Thanks,
CG

-- 
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/04c7cfaa-7eea-4ba5-b3fa-4deb9b4821c0n%40googlegroups.com.


[tw5] Re: cannot transclude a tiddler name built from inside a macro

2021-08-09 Thread CarloGgi
Thanks a lot, I'll go through it carefully!

CG

On Sunday, August 8, 2021 at 10:56:10 PM UTC+3 Soren Bjornstad wrote:

> The links I gave you were to my TiddlyWiki textbook, not the TW 
> documentation. It might not be "self-contained" since it's intended to be 
> in the context of the whole course, but I think you'll find it more useful 
> than the TW documentation at your skill level.
>
> On Sunday, August 8, 2021 at 1:27:08 PM UTC-5 CarloGgi wrote:
>
>> Yes Soren, you are right: I have little understanding of the inner gears 
>> of text substitution and wikification in TW, nor did I find a thorough, 
>> comprehensive and self-contained guide to the matter so far: all the TW 
>> documentation I went through is a mess of scantly-explained (if ever), 
>> loosely-consistent, scattered bits of information, and this is a pity 
>> because the software has tremendous potentiality. Maybe you can point me to 
>> some good documentation anyway, of which I would be grateful.
>>
>> Thanks and regards,
>> CG
>>
>>
>> On Sunday, August 8, 2021 at 8:22:13 PM UTC+3 Soren Bjornstad wrote:
>>
>>> I second CJ in saying that the {{{ [addsuffix[whatever]] 
>>> }}} route is usually a better way to concatenate text, especially when you 
>>> don't know much TiddlyWiki.
>>>
>>> You're getting bitten by not understanding text substitution 
>>> <https://groktiddlywiki.com/read/#Text%20Substitution> and wikification 
>>> <https://groktiddlywiki.com/read/#Wikification>, which are both quite 
>>> complex and require you to understand how TiddlyWiki actually goes about 
>>> processing macros and rendering tiddlers. In contrast, your intuition will 
>>> usually work fine with filters.
>>>
>>> On Sunday, August 8, 2021 at 11:08:29 AM UTC-5 CarloGgi wrote:
>>>
>>>>
>>>> Hallo,
>>>> quite new to TW and I love it, though it is dramatically 
>>>> underdocumented and the whole docs are an almost unusable mess.
>>>>
>>>> To my biggest astonishment, when I try to dynamically build the name of 
>>>> a tiddler from inisde a macro, that macro output cannot be used from 
>>>> within 
>>>> a transclude widget.
>>>>
>>>> \define getMeTiddlerName(a_suffix) <>$a_suffix$ 
>>>>
>>>> <$list filter="whateveFilterHere">
>>>> <$transclude tiddler=<> /> 
>>>> 
>>>>
>>>> In the example above, I obtain the tiddler's name by adding suffix 'EN' 
>>>> to current tiddler, which the macro DOES, but then its output 
>>>> <> doesn't make transclude widget behave as 
>>>> expected.
>>>>
>>>> I also tried many combinations of single/double quotes, as for instance 
>>>> in:
>>>>
>>>> <$transclude tiddler="<>" /> 
>>>>
>>>> but no result at all: the transclude widget DOESN'T transclude the 
>>>> dynamically-built tiddler SOMETIDDLERNAME_EN
>>>>
>>>> Not even the simpler version with hard-coded suffix works:
>>>>
>>>> \define getMeTiddlerName() <>_EN 
>>>>
>>>> <$list filter="whateveFilterHere">
>>>> <$transclude tiddler=<> /> 
>>>> 
>>>>
>>>> Nor does it using double quotes for 'tiddler' parameter inside 
>>>> transclude widget:
>>>>
>>>> \define getMeTiddlerName() <>_EN 
>>>>
>>>> <$list filter="whateveFilterHere">
>>>> <$transclude tiddler="<>" /> 
>>>> 
>>>>
>>>> Thanks for helping, s frustrated!
>>>>
>>>> CG
>>>>
>>>

-- 
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/ab320849-dced-4031-b18e-25d505f314dcn%40googlegroups.com.


Re: [tw5] Re: cannot transclude a tiddler name built from inside a macro

2021-08-08 Thread CarloGgi
Thanks a lot Eric, valuable hints to better understand how TW works.
Anyway, "whateveFilterHere" is just pseudo-code written here for the sake 
of simplicity. In my actual code there is a true filter, and it works fine, 
feeding the correct filtered list of tiddlers to the <$list> widget.

Thanks again and regards, :-)
CG


On Sunday, August 8, 2021 at 9:29:04 PM UTC+3 Eric Shulman wrote:

> \define getMeTiddlerName(a_suffix) $(currentTiddler)$$a_suffix$
>
> In the macro definition above, $(currentTiddler)$ *substitutes the value 
> from the currentTiddler variable* and then adds the specified $a_suffix$ 
> parameter value.
>
> When you wrote this:
> <$list filter="whateveFilterHere">
> <$transclude tiddler=<> />
> 
> The surrounding $list widget *sets the value of the currentTiddler 
> variable* to "whateveFilterHere".
> Thus, the macro output was "whateveFilterHere_EN", which almost certainly 
> didn't exist in your file, so no transclusion happened.
>
> Then, when you wrote this:
><>
> to "print to screen the macro output", the macro wasn't contained inside a 
> $list widget,
> so the value of currentTiddler was the actual containing tiddler's title, 
> and you got the results you expected.
>
> and, when you wrote:
> <$transclude tiddler={{{ [addsuffix[_EN]]}}} />
> you used "filtered transclusion" (sometimes referred to as an "inline 
> filter") to directly add the "_EN" suffix to the currentTiddler value,
> which was then used as *the value for the "tiddler=..." widget attribute*... 
> so you got the results you expected.
>
> Note that, *within the filter syntax, variable references are enclosed in 
> angle brackets*, like this:
>
> However, when used *outside a filter -- in normal wikitext -- variable 
> references use *doubled* angle brackets*, like this:
><>
> This is necessary so that *the variable reference isn't mistaken for 
> conventional HTML syntax*, which uses the single angle brackets, e.g.,
>some text here
>
> Hopefully, the above explanations have provided some useful clues :-)
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools.com: "Small Tools for Big Ideas!"
> On Sunday, August 8, 2021 at 10:41:30 AM UTC-7 CarloGgi wrote:
>
>> Charlie, your solution worked fine!
>>
>> <$transclude tiddler={{{ [addsuffix[_EN]]}}} />
>>
>> Still I wonder why the macro way doesn't yield the expected result, but 
>> anyway thanksalot for the hint. I will duly commit myself to studying its 
>> syntax, quite obscure to me.
>>
>> Regards,
>> CG
>>
>> On Sun, Aug 8, 2021 at 8:14 PM Charlie Veniot  wrote:
>>
>>> I'm thinking most folk prefer the macro route, and that makes sense to 
>>> me.
>>>
>>> The way I'm wired, I usually go with transclusions unless I really don't 
>>> have a choice.   Can't explain it.
>>>
>>> *For the "variety is the spice of life" giggles*:
>>>
>>> <$list filter="whateveFilterHere">
>>> <$transclude tiddler={{{ [addsuffix[_EN]]}}} /> 
>>> 
>>>
>>> But that would be a pain in the caboose if spread all over the place.
>>>
>>> So sticking with my transclusion mentality...
>>>
>>> <$list filter="whateveFilterHere">
>>> {{||EN_Maker}} 
>>> 
>>>
>>> The tiddler "En_Maker" is a transclusion template tiddler with the 
>>> following content:
>>>
>>> <$transclude tiddler={{{ [addsuffix[_EN]]}}} />
>>>
>>> Yeah, I'm quirky that way ...
>>>
>>> On Sunday, August 8, 2021 at 1:08:29 PM UTC-3 CarloGgi wrote:
>>>
>>>>
>>>> Hallo,
>>>> quite new to TW and I love it, though it is dramatically 
>>>> underdocumented and the whole docs are an almost unusable mess.
>>>>
>>>> To my biggest astonishment, when I try to dynamically build the name of 
>>>> a tiddler from inisde a macro, that macro output cannot be used from 
>>>> within 
>>>> a transclude widget.
>>>>
>>>> \define getMeTiddlerName(a_suffix) <>$a_suffix$ 
>>>>
>>>> <$list filter="whateveFilterHere">
>>>> <$transclude tiddler=<> /> 
>>>> 
>>>>
>>>> In the example above, I obtain the tiddler's name by adding suffix 'EN' 
>>>> to current tiddler, which the macro DOES, but then its output 
&g

[tw5] Re: cannot transclude a tiddler name built from inside a macro

2021-08-08 Thread CarloGgi
Yes Soren, you are right: I have little understanding of the inner gears of 
text substitution and wikification in TW, nor did I find a thorough, 
comprehensive and self-contained guide to the matter so far: all the TW 
documentation I went through is a mess of scantly-explained (if ever), 
loosely-consistent, scattered bits of information, and this is a pity 
because the software has tremendous potentiality. Maybe you can point me to 
some good documentation anyway, of which I would be grateful.

Thanks and regards,
CG


On Sunday, August 8, 2021 at 8:22:13 PM UTC+3 Soren Bjornstad wrote:

> I second CJ in saying that the {{{ [addsuffix[whatever]] 
> }}} route is usually a better way to concatenate text, especially when you 
> don't know much TiddlyWiki.
>
> You're getting bitten by not understanding text substitution 
> <https://groktiddlywiki.com/read/#Text%20Substitution> and wikification 
> <https://groktiddlywiki.com/read/#Wikification>, which are both quite 
> complex and require you to understand how TiddlyWiki actually goes about 
> processing macros and rendering tiddlers. In contrast, your intuition will 
> usually work fine with filters.
>
> On Sunday, August 8, 2021 at 11:08:29 AM UTC-5 CarloGgi wrote:
>
>>
>> Hallo,
>> quite new to TW and I love it, though it is dramatically underdocumented 
>> and the whole docs are an almost unusable mess.
>>
>> To my biggest astonishment, when I try to dynamically build the name of a 
>> tiddler from inisde a macro, that macro output cannot be used from within a 
>> transclude widget.
>>
>> \define getMeTiddlerName(a_suffix) <>$a_suffix$ 
>>
>> <$list filter="whateveFilterHere">
>> <$transclude tiddler=<> /> 
>> 
>>
>> In the example above, I obtain the tiddler's name by adding suffix 'EN' 
>> to current tiddler, which the macro DOES, but then its output 
>> <> doesn't make transclude widget behave as expected.
>>
>> I also tried many combinations of single/double quotes, as for instance 
>> in:
>>
>> <$transclude tiddler="<>" /> 
>>
>> but no result at all: the transclude widget DOESN'T transclude the 
>> dynamically-built tiddler SOMETIDDLERNAME_EN
>>
>> Not even the simpler version with hard-coded suffix works:
>>
>> \define getMeTiddlerName() <>_EN 
>>
>> <$list filter="whateveFilterHere">
>> <$transclude tiddler=<> /> 
>> 
>>
>> Nor does it using double quotes for 'tiddler' parameter inside transclude 
>> widget:
>>
>> \define getMeTiddlerName() <>_EN 
>>
>> <$list filter="whateveFilterHere">
>> <$transclude tiddler="<>" /> 
>> 
>>
>> Thanks for helping, s frustrated!
>>
>> CG
>>
>

-- 
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/6f78cd25-fe04-4020-b477-c07b4f0c8ca3n%40googlegroups.com.


[tw5] cannot transclude a tiddler name built from inside a macro

2021-08-08 Thread CarloGgi

Hallo,
quite new to TW and I love it, though it is dramatically underdocumented 
and the whole docs are an almost unusable mess.

To my biggest astonishment, when I try to dynamically build the name of a 
tiddler from inisde a macro, that macro output cannot be used from within a 
transclude widget.

\define getMeTiddlerName(a_suffix) <>$a_suffix$ 

<$list filter="whateveFilterHere">
<$transclude tiddler=<> /> 


In the example above, I obtain the tiddler's name by adding suffix 'EN' to 
current tiddler, which the macro DOES, but then its output 
<> doesn't make transclude widget behave as expected.

I also tried many combinations of single/double quotes, as for instance in:

<$transclude tiddler="<>" /> 

but no result at all: the transclude widget DOESN'T transclude the 
dynamically-built tiddler SOMETIDDLERNAME_EN

Not even the simpler version with hard-coded suffix works:

\define getMeTiddlerName() <>_EN 

<$list filter="whateveFilterHere">
<$transclude tiddler=<> /> 


Nor does it using double quotes for 'tiddler' parameter inside transclude 
widget:

\define getMeTiddlerName() <>_EN 

<$list filter="whateveFilterHere">
<$transclude tiddler="<>" /> 


Thanks for helping, s frustrated!

CG

-- 
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/6cf88363-f9e5-4ab2-ae8a-bb27f5fb0078n%40googlegroups.com.