[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 
>>>  and 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.


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

2021-08-08 Thread Soren Bjornstad
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 
>>  and 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/26075d79-3081-4fb1-a390-c25e1a112365n%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 
 <> 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 a topic in the 
>>> Google Groups "TiddlyWiki" 

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

2021-08-08 Thread Eric Shulman
\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 
>>> <> 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 a topic in the 
>> Google Groups "TiddlyWiki" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/tiddlywiki/hbSf3WtfLvM/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> tiddlywiki+...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/38033f26-43ce-495b-aede-bd4958445e21n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are 

[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 
>  and 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.


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

2021-08-08 Thread Carlo Giomini
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
>> <> 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 a topic in the
> Google Groups "TiddlyWiki" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tiddlywiki/hbSf3WtfLvM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/38033f26-43ce-495b-aede-bd4958445e21n%40googlegroups.com
> 
> .
>

-- 
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/CAAJsULYSgansahA6o5WBKgj42XvcZKThUS-UbOBps0H22ORvbw%40mail.gmail.com.


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

2021-08-08 Thread Carlo Giomini
Thanks for the prompt reply. I changed <>
 to $(currentTiddler)$ in the macro body, as

\define getMeTiddlerName(a_suffix) $(currentTiddler)$$a_suffix$

still, transclude widget doesn't transclude:

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


If I try to print to screen the macro output just for debug purposes, it
correctly shows the current tiddler's name added with the suffix, say

<>
outputs
SOMETIDDLERSNAME_EN
to screen.

Clueless...

CG


On Sun, Aug 8, 2021 at 7:34 PM 'Mark S.' via TiddlyWiki <
tiddlywiki@googlegroups.com> wrote:

> When you use <>, it's actually creating a *link* to that
> tiddler. What you want in your macro is the plain substitutable (new word!)
> text. So try:
>
> \define getMeTiddlerName(a_suffix) $(currentTiddler)$$a_suffix$
>
>
> On Sunday, August 8, 2021 at 9:08:29 AM UTC-7 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 a topic in the
> Google Groups "TiddlyWiki" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tiddlywiki/hbSf3WtfLvM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/68ec233c-e221-4803-9bba-225326fbbc16n%40googlegroups.com
> 
> .
>

-- 
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/CAAJsULbQ6w8xmZ7AfNY%2Bsz6kXi5ZTzqez4U30XmURCqoA%3DK5EQ%40mail.gmail.com.


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

2021-08-08 Thread Soren Bjornstad
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 
 and 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/b17503a1-f60e-449c-ad1c-a811eb9f8238n%40googlegroups.com.


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

2021-08-08 Thread Charlie Veniot
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 
> <> 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/38033f26-43ce-495b-aede-bd4958445e21n%40googlegroups.com.


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

2021-08-08 Thread 'Mark S.' via TiddlyWiki
When you use <>, it's actually creating a *link* to that 
tiddler. What you want in your macro is the plain substitutable (new word!) 
text. So try:

\define getMeTiddlerName(a_suffix) $(currentTiddler)$$a_suffix$


On Sunday, August 8, 2021 at 9:08:29 AM UTC-7 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/68ec233c-e221-4803-9bba-225326fbbc16n%40googlegroups.com.