[tw5] Re: Create tiddler with tags from variable

2021-06-17 Thread Ed Heil
Just a note -- there is a straightforward way to get tiddler titles 
automatically bracketed, which I discovered eventually.

<$set name="myTags" filter=" [] [[OtherTag]]">
<$action-createtiddler $base="MyBase" tags=<> />


A SetWidget with "Filtered List Variable Assignment" automatically 
double-brackets items in the list provided to it.

https://tiddlywiki.com/#SetWidget



On Saturday, June 5, 2021 at 10:11:47 PM UTC-4 TW Tones wrote:

> I will just add if you \define something() and leave it empty it will 
> break things
>
> Tones
> On Saturday, 5 June 2021 at 02:49:38 UTC+10 Ed Heil wrote:
>
>> Mat's initial suggestion worked great.  I didn't need this to appear 
>> everywhere, or in edit mode.  Just in a certain class of tiddlers which are 
>> already being displayed through a special template (which is where this 
>> button will appear).
>>
>> Thanks, everyone!
>>
>>

-- 
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/7b61a30d-0b48-4ec6-ad5c-1359966b19b4n%40googlegroups.com.


[tw5] Re: Create tiddler with tags from variable

2021-06-05 Thread TW Tones
I will just add if you \define something() and leave it empty it will break 
things

Tones
On Saturday, 5 June 2021 at 02:49:38 UTC+10 Ed Heil wrote:

> Mat's initial suggestion worked great.  I didn't need this to appear 
> everywhere, or in edit mode.  Just in a certain class of tiddlers which are 
> already being displayed through a special template (which is where this 
> button will appear).
>
> Thanks, everyone!
>
>

-- 
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/eea62790-f271-4f77-83b9-6527e9ed2d9en%40googlegroups.com.


[tw5] Re: Create tiddler with tags from variable

2021-06-04 Thread Ed Heil
Mat's initial suggestion worked great.  I didn't need this to appear 
everywhere, or in edit mode.  Just in a certain class of tiddlers which are 
already being displayed through a special template (which is where this 
button will appear).

Thanks, everyone!

-- 
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/0f2229c0-38fc-4607-bd1b-f557eeaeb74cn%40googlegroups.com.


[tw5] Re: Create tiddler with tags from variable

2021-06-04 Thread Mat
iamdar...@gmail.com wrote:

> 1) Why am I tagging the Tiddler that has the code with /tags/EditTemplate 
> and not core/ui/EditTemplate as the others are listed when I'm reordering 
> the tags?
>

The $:/tags/EditTemplate is the common tag for all edittemplates. When you 
click that tag you see all tiddlers tagged such. They are typically 
tiddlers titled $:/core/ui/something because they are part of the core TW 
plugin. Your tiddler is not part of the core plugin so you can call it 
whatever you want (also with or without a prefixing $:/ )
 

> 2) I originally tried pasting Mat's code into the custom edit area of 
> Stroll, which also uses the /tags/EditTemplate tag but the define line 
> wouldn't activate. Given that both tiddlers follow the same instructions is 
> there a reason why one worked and one didn't? The only difference was the 
> existence of two other tags and some instructions already in the body of 
> the tiddler.
>

All pragmas, i.e all commands with a prefixing \ character, must be grouped 
at top of tiddler. If you study some system tiddlers, you'll understand 
what is meant with this. That could be one reason why your attempt didn't 
work. Another thing is that e.g a \define can be a single row or it is a 
multirow that ends with an \end marker. Again, check out some macros or 
similar and you'll get the idea.
 

> 3) Is there a specific place on the TiddlyWiki website where the above 
> information is described? When I was attempting to troubleshoot the \define 
> line not working I was having a heck of a time trying to follow what was 
> written so I'm curious if I was looking in the wrong place.
>

Yes, again, all \ prefixed stuff are called pragmas. You are specifically 
concerned with macros here, i.e the thingies that are created with a 
\define pragma (and that often end with  \end )

As for getting the original name of a tiddler when you're in edit mode, I 
thought there should be some filter op for this (is[draft]) but maybe I'm 
wrong. Anyway, you should be able to do this to get the non-draft title 
when you're in the draft: 

\define t() [[$(nondraft)$]] OhterTAG

<$vars nondraft={{{ [removeprefix[Draft of 
']removesuffix[']] }}} >
<$button><$action-createtiddler $basetitle="MyBase" tags=<>/> x 



<:-)
 

-- 
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/9a6e73d0-3808-4d03-b370-6f7cc47232f3n%40googlegroups.com.


[tw5] Re: Create tiddler with tags from variable

2021-06-03 Thread Darth Mole
It would seem that I was somehow confusing myself earlier as when I reread 
Mat's instructions, after your reply TW, it seemed to click and I was able 
to get it working minus the "Draft of"  I just have three additional 
questions:

1) Why am I tagging the Tiddler that has the code with /tags/EditTemplate 
and not core/ui/EditTemplate as the others are listed when I'm reordering 
the tags?
2) I originally tried pasting Mat's code into the custom edit area of 
Stroll, which also uses the /tags/EditTemplate tag but the define line 
wouldn't activate. Given that both tiddlers follow the same instructions is 
there a reason why one worked and one didn't? The only difference was the 
existence of two other tags and some instructions already in the body of 
the tiddler.
3) Is there a specific place on the TiddlyWiki website where the above 
information is described? When I was attempting to troubleshoot the \define 
line not working I was having a heck of a time trying to follow what was 
written so I'm curious if I was looking in the wrong place.

Thank you!

On Thursday, June 3, 2021 at 6:37:15 PM UTC-4 TW Tones wrote:

> Mats Suggestion is simple. 
>
> Create a tiddler and insert his code
> Add the tag  $:/tags/EditTemplate" or "$:/tags/ViewTemplate" to place it 
> on the edit and/or view template
>
> This is your introduction to making solutions that apply across all 
> tiddlers. TiddlyWiki has a rich set of features to do what you are asking, 
> this is the main method.
>
> Tones
> On Friday, 4 June 2021 at 07:50:38 UTC+10 iamdar...@gmail.com wrote:
>
>> Yea, unfortunately I think this is beyond me at the moment. Thanks for 
>> the information though!
>>
>> On Thursday, June 3, 2021 at 3:33:23 PM UTC-4 Mat wrote:
>>
>>> *Mat*, where would you put your code so that it was available while 
 editing a tiddler?
>>>
>>>
>>> Hm, in edit mode? OK, you could try to put it in a tiddler that you tag 
>>> "$:/tags/EditTemplate" (and click that very tag to reorder where it is 
>>> positionend). You might have to edit the current tiddler or it will 
>>> probably be the Draft ending up as the tag. I'm about to go out so can't 
>>> check exactly which filter operator that is to get the "non Draft" but it's 
>>> there... 
>>>
>>> <:-) 
>>>
>>

-- 
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/f86658b0-5384-445d-a397-5714d6817704n%40googlegroups.com.


[tw5] Re: Create tiddler with tags from variable

2021-06-03 Thread TW Tones
Mats Suggestion is simple. 

Create a tiddler and insert his code
Add the tag  $:/tags/EditTemplate" or "$:/tags/ViewTemplate" to place it on 
the edit and/or view template

This is your introduction to making solutions that apply across all 
tiddlers. TiddlyWiki has a rich set of features to do what you are asking, 
this is the main method.

Tones
On Friday, 4 June 2021 at 07:50:38 UTC+10 iamdar...@gmail.com wrote:

> Yea, unfortunately I think this is beyond me at the moment. Thanks for the 
> information though!
>
> On Thursday, June 3, 2021 at 3:33:23 PM UTC-4 Mat wrote:
>
>> *Mat*, where would you put your code so that it was available while 
>>> editing a tiddler?
>>
>>
>> Hm, in edit mode? OK, you could try to put it in a tiddler that you tag 
>> "$:/tags/EditTemplate" (and click that very tag to reorder where it is 
>> positionend). You might have to edit the current tiddler or it will 
>> probably be the Draft ending up as the tag. I'm about to go out so can't 
>> check exactly which filter operator that is to get the "non Draft" but it's 
>> there... 
>>
>> <:-) 
>>
>

-- 
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/a25c8d53-d7cc-43e7-8354-fda456c1a38bn%40googlegroups.com.


[tw5] Re: Create tiddler with tags from variable

2021-06-03 Thread Darth Mole
Yea, unfortunately I think this is beyond me at the moment. Thanks for the 
information though!

On Thursday, June 3, 2021 at 3:33:23 PM UTC-4 Mat wrote:

> *Mat*, where would you put your code so that it was available while 
>> editing a tiddler?
>
>
> Hm, in edit mode? OK, you could try to put it in a tiddler that you tag 
> "$:/tags/EditTemplate" (and click that very tag to reorder where it is 
> positionend). You might have to edit the current tiddler or it will 
> probably be the Draft ending up as the tag. I'm about to go out so can't 
> check exactly which filter operator that is to get the "non Draft" but it's 
> there... 
>
> <:-) 
>

-- 
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/0da3c40f-d306-4265-be9b-a5c0e495b6aan%40googlegroups.com.


[tw5] Re: Create tiddler with tags from variable

2021-06-03 Thread Mat

>
> *Mat*, where would you put your code so that it was available while 
> editing a tiddler?


Hm, in edit mode? OK, you could try to put it in a tiddler that you tag 
"$:/tags/EditTemplate" (and click that very tag to reorder where it is 
positionend). You might have to edit the current tiddler or it will 
probably be the Draft ending up as the tag. I'm about to go out so can't 
check exactly which filter operator that is to get the "non Draft" but it's 
there... 

<:-) 

-- 
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/1644f9ce-4efe-43b8-9e71-4123177d86d8n%40googlegroups.com.


[tw5] Re: Create tiddler with tags from variable

2021-06-03 Thread Darth Mole
*Mat*, where would you put your code so that it was available while editing 
a tiddler?

On Thursday, June 3, 2021 at 1:04:09 PM UTC-4 Mat wrote:

> Seems to work:
>
> \define t() [[$(currentTiddler)$]] OhterTAG
>
> <$button>
> <$action-createtiddler $basetitle="MyBase" tags=<> />
> x
> 
>
>
> <:-)
> On Thursday, June 3, 2021 at 5:53:39 PM UTC+2 Ed Heil wrote:
>
>> Hello,
>>
>> I've been trying to do something that seems like it should be simple but 
>> maybe isn't.
>>
>> I'm in a tiddler called "Three Word Title."
>>
>> I wish to add a tiddler tagged with its name and one other tag, in 
>> response to hitting a button.
>>
>> I would think I'd use something like:
>>
>> <$action-createtiddler $base="MyBase" tags={{{ [] 
>> [[OtherTag]] +[join[ ]] }} />
>>
>> But of course that won't work, it will give it the tags "Three" "Word" 
>> "Title" and "OtherTag."
>>
>> Is there a bulletproof way to turn a list of tiddlers (returned by a 
>> filter) into a list with proper [[]] so it's suitable for use in a tags 
>> field?
>>
>> I could do this by creating the tiddler first, then saving the title, 
>> then sending a tm-add-tag message, but at that point I need a 
>> FieldManglerWidget and it just seems like this ought to be easier.
>>
>> I thought that maybe enlist or enlist-input should do the job but they 
>> don't seem to.
>>
>> I guess another way of summing up my problem would be that I want this:
>>
>> <$vars barBaz="bar baz">
>> "<$text text={{{ [[foo]] [] +[what operator do I want here?[]]  
>> }}}/>"
>> 
>>
>> to somehow produce 
>>
>> "[[foo]] [[bar baz]]"
>>
>>
>>

-- 
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/2b9f921a-d7a7-4c3f-9f7e-791b8623f273n%40googlegroups.com.


[tw5] Re: Create tiddler with tags from variable

2021-06-03 Thread Mat
Seems to work:

\define t() [[$(currentTiddler)$]] OhterTAG

<$button>
<$action-createtiddler $basetitle="MyBase" tags=<> />
x



<:-)
On Thursday, June 3, 2021 at 5:53:39 PM UTC+2 Ed Heil wrote:

> Hello,
>
> I've been trying to do something that seems like it should be simple but 
> maybe isn't.
>
> I'm in a tiddler called "Three Word Title."
>
> I wish to add a tiddler tagged with its name and one other tag, in 
> response to hitting a button.
>
> I would think I'd use something like:
>
> <$action-createtiddler $base="MyBase" tags={{{ [] 
> [[OtherTag]] +[join[ ]] }} />
>
> But of course that won't work, it will give it the tags "Three" "Word" 
> "Title" and "OtherTag."
>
> Is there a bulletproof way to turn a list of tiddlers (returned by a 
> filter) into a list with proper [[]] so it's suitable for use in a tags 
> field?
>
> I could do this by creating the tiddler first, then saving the title, then 
> sending a tm-add-tag message, but at that point I need a FieldManglerWidget 
> and it just seems like this ought to be easier.
>
> I thought that maybe enlist or enlist-input should do the job but they 
> don't seem to.
>
> I guess another way of summing up my problem would be that I want this:
>
> <$vars barBaz="bar baz">
> "<$text text={{{ [[foo]] [] +[what operator do I want here?[]]  
> }}}/>"
> 
>
> to somehow produce 
>
> "[[foo]] [[bar baz]]"
>
>
>

-- 
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/8821d8e8-ced7-4742-b2ff-6d65818725e1n%40googlegroups.com.


[tw5] Re: Create tiddler with tags from variable

2021-06-03 Thread Darth Mole
Hello,

I know this doesn't get you exactly what you are looking for but I thought 
it may help. There is a toolbar option "new here" (shown below) that can be 
turned on that creates a new tiddler with the name of the current tiddler 
as a tag. However, as you point out with the tm-add-tag situation the 
option "new here" option doesn't show when editing, only when viewing the 
tiddler/post save.

[image: Screenshot from 2021-06-03 12-53-27.png]

Sorry if the above setting is the exact same thing as the tm-add-tag 
scenario you mentioned.

On Thursday, June 3, 2021 at 11:53:39 AM UTC-4 Ed Heil wrote:

> Hello,
>
> I've been trying to do something that seems like it should be simple but 
> maybe isn't.
>
> I'm in a tiddler called "Three Word Title."
>
> I wish to add a tiddler tagged with its name and one other tag, in 
> response to hitting a button.
>
> I would think I'd use something like:
>
> <$action-createtiddler $base="MyBase" tags={{{ [] 
> [[OtherTag]] +[join[ ]] }} />
>
> But of course that won't work, it will give it the tags "Three" "Word" 
> "Title" and "OtherTag."
>
> Is there a bulletproof way to turn a list of tiddlers (returned by a 
> filter) into a list with proper [[]] so it's suitable for use in a tags 
> field?
>
> I could do this by creating the tiddler first, then saving the title, then 
> sending a tm-add-tag message, but at that point I need a FieldManglerWidget 
> and it just seems like this ought to be easier.
>
> I thought that maybe enlist or enlist-input should do the job but they 
> don't seem to.
>
> I guess another way of summing up my problem would be that I want this:
>
> <$vars barBaz="bar baz">
> "<$text text={{{ [[foo]] [] +[what operator do I want here?[]]  
> }}}/>"
> 
>
> to somehow produce 
>
> "[[foo]] [[bar baz]]"
>
>
>

-- 
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/755a1c03-b654-4314-9779-cbcb135c87f7n%40googlegroups.com.