Thanks BJ. I had great hopes for this approach. But in this case, 
<<text2convert>> is empty and doesn't even show up when dropped in ... as 
shown below.

I had to tweak your suggested code to match up parameter and argument 
names. I put the label THIS IS EMPTY to show where there's no contents at 
all being retrieved. Here's what it looks like:

\define convertto() $(name_of_tiddler)$-converted
\define amacro(x)
<$set name="name_of_tiddler"  value=$x$>
<$set name="text2convert"  value={{$x$}}  >

<$button>
<$action-setfield
    $tiddler=<<convertto>>
    text=<<html2tw>>   />
<$action-navigate $to=<<convertto>>/>
Convert Tiddler Text
</$button>
<p/>Using text from ''<<name_of_tiddler>>'' and sending to ''<<convertto>>''
. 

THIS IS EMPTY: <<text2convert>>
</$set>
</$set>

\end

<$edit-text tiddler="$:/html2tw/title" rows="1" size="50" placeholder="Name 
of tiddler to convert"  tag="input"   ></$edit-text>

<$macrocall $name="amacro" x="""{{$:/html2tw/title}}"""/>


Maybe some other tweak?

Thanks,
Mark


On Friday, March 25, 2016 at 1:55:17 PM UTC-7, BJ wrote:
>
> Hi mark,
> this is a typical tw5 'gotcha'
>
> <$set name="text2convert"  value=<<textin2>>  >
>
> the macro only does basic text substitution.
>
> You need to use this pattern
>
> <$set name="text2convert"  value={{$x$}}  >
>
> and so must put your code inside a macro
>
>
>
> \define amacro(x)
> <$set name="name_of_tiddler"  value=$x$> 
> <$set name="text2convert"  value={{$x$}}  >
> <$button>
> <$action-setfield 
>     $tiddler=<<convertto>> 
>     text=<<html2tw>>   />
> <$action-navigate $to=<<convertto>>/>
> Convert Tiddler Text
> </$button>
> \end
>
>
> <$macrocall $name="amacro" tname={{$:/html2tw/title}}/>
>
> all the best
>
> BJ
>
> On Friday, March 25, 2016 at 8:14:56 PM UTC, Mark S. wrote:
>>
>> Hi Jed,
>>
>> I've tried this in all sorts of iterations. I was hoping that wrapping a 
>> macro in a macro could finally force it to acknowledge the actual text in 
>> the dereferenced name tiddler.
>>
>> Your variation put this into the "converted" tiddler:
>>
>> *{{TitleIUsedInTheForm}}*
>>
>> So the literal string with brackets is getting passed rather than the 
>> transcluded text. It seems like it ought to be easy. 
>>
>> Thanks for trying,
>> Mark
>>
>> On Friday, March 25, 2016 at 12:12:38 PM UTC-7, Jed Carty wrote:
>>>
>>> It is probably the <$set name="text2convert"  value=<<textin2>>  > line 
>>> that does it.
>>>
>>> Why don't you just use one macro instead of creating a macro that just 
>>> calls a second macro? Make textin:
>>>
>>> \define textin() {{$(name_of_tiddler)$}}
>>>
>>> and use that as the value for text2convert instead of textin2
>>>
>>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d041fe90-1fa5-4f82-938f-e6dc9c571f61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to