Re: [tw5] Re: Passing macro output to another macro?

2020-11-28 Thread clutterstack
Hi Petri,

I wonder if you could use list-links-draggable with a template that has an 
explicit draggable  widget in it. 
The draggable widget has an attribute "startactions" that I have used in 
macros to store a "parent" tiddler title into a field, so that I can 
shift-drag a tiddler to move it from one list to another. I haven't tried 
it in conjunction with list-links-draggable, though. 

Best,
Chris

On Friday, November 27, 2020 at 10:05:46 AM UTC-5 Petri M. wrote:

> Hi Tones,
>
> I am now trying to do this with <> instead of using 
> tags. I was thinking that maybe it would be easier to just use fields for 
> this but now I am not that sure...
>
> Do you know if there is a variable which stores the name of the tiddler 
> from which an item is being dragged from? Like actionTiddler has the name 
> of the tiddler being dragged, and targetTiddler (I think?) has the name of 
> where I am dragging it. I would like to remove an item from a list when it 
> is being dragged away from the dropzone. So if I have a tiddler "Parent" 
> and a tiddler "Child", where the tiddler "Parent" has a field "list" with 
> "Child" in it. So it would be
>
> * Parent
> * Child
>
> And now if I drag the "Child" away from the "Parent", I would like to 
> automatically change the "list" field of Parent to reflect that "Child" is 
> no longer its child.
>
> -Petri
>
> On Fri, Nov 27, 2020 at 12:37 AM TW Tones  wrote:
>
>> Petri,
>>
>> Nice code pattern you are suggesting to test if there is one tag, however 
>> this will not work if you decide to organise the same tiddlers with 
>> additional tags. 
>>
>> However if you want to go ahead remember, tags have special handling in 
>> tiddlywiki, but at the very same time the tags field is a field like any 
>> other. Thus if all tags (the 'tags' field) match's all tags.
>> I have not yet reproduced this today. I will provide the exact filter if 
>> I find it.
>>
>> The TOCP plugin allows you to instead use the parent field to store the 
>> parent rather than tags, this would be better in your case.
>>
>> Regards
>> Tones
>>
>> On Thursday, 26 November 2020 at 23:08:42 UTC+11 Petri M. wrote:
>>
>>> Hello Tones,
>>>
>>> Thank you for the input. I did notice that the issue with spaces in tags 
>>> was of my own doing, apparently I messed something up when I was trying to 
>>> make drag-and-dropping from list to list to remove the tag of the old list 
>>> and replace it with the tag of the new list. 
>>>
>>> Everything is working now in an empty tiddlywiki! 
>>>
>>> I was thinking of not messing with the drag-and-drop macro and just 
>>> figure out how to make a filter which only gives me the tiddlers I want. I 
>>> have been trying to figure out how I can make a filter which returns 
>>> tiddlers with tag "Task", but only if there are no other tags. So if I have 
>>> a tiddler "Parent" with a tag "Task" and a tiddler "Child" with tags 
>>> "Parent" and "Task", then the filter would only give me the "Parent" 
>>> tiddler. Seems like a very simple thing but I can't figure it out. I was 
>>> hoping I could've just made a filter that finds all the tiddlers with the 
>>> tag "Task" and then removes everything that has any tags in addition to 
>>> "Task".
>>>
>>> Any ideas? :)
>>>
>>> -Petri
>>>
>>> On Thu, Nov 26, 2020 at 12:16 AM TW Tones  wrote:
>>>
 Petri,

 I am only starting to make use of the drag and drop features myself. In 
 this case you are using the macro  list-tagged-draggable but you can build 
 your own. Its is defined in $:/core/macros/list

 I suspect the inability to use a tiddler title with spaces may be a 
 design weakness of the macro.

 A quick solution to current tiddler with spaces *may* be tag={{{ 
 [] }}}

 Tones
 On Thursday, 26 November 2020 at 01:29:17 UTC+11 Petri M. wrote:

> Oh and apparently using <$macrocall $name="list-tagged-draggable" 
> itemTemplate="TODO task list template children" tag=<>/> 
> will break the tags if the currentTiddler has spaces in its name. Putting 
> quotes around the macro <> will just tag it with 
> "<>" and not with "this is my current tag".
>
> BR,
> Petri M
> On Wednesday, November 25, 2020 at 3:53:59 PM UTC+2 Petri M. wrote:
>
>> Hi Tones,
>>
>> Ohh thank you so much! I looked into the <$macrocall/> and tried to 
>> use it directly with the <> macro and it worked 
>> perfectly. Well almost perfectly. 
>>
>> There is one issue. If I use <$macrocall 
>> $name="list-tagged-draggable" tag=<>/> then everything 
>> works fine and I am able to make subtasks of subtasks by just dragging 
>> them, which is exactly what I want. However, I cannot figure out on how 
>> to 
>> do the indentation. Inline css with @@margin-left:10px ... @@ does 
>> absolutely nothing. I can fix this by using something like
>> <$macrocall 

Re: [tw5] Re: Passing macro output to another macro?

2020-11-27 Thread P M
Hi Tones,

I am now trying to do this with <> instead of using
tags. I was thinking that maybe it would be easier to just use fields for
this but now I am not that sure...

Do you know if there is a variable which stores the name of the tiddler
from which an item is being dragged from? Like actionTiddler has the name
of the tiddler being dragged, and targetTiddler (I think?) has the name of
where I am dragging it. I would like to remove an item from a list when it
is being dragged away from the dropzone. So if I have a tiddler "Parent"
and a tiddler "Child", where the tiddler "Parent" has a field "list" with
"Child" in it. So it would be

* Parent
* Child

And now if I drag the "Child" away from the "Parent", I would like to
automatically change the "list" field of Parent to reflect that "Child" is
no longer its child.

-Petri

On Fri, Nov 27, 2020 at 12:37 AM TW Tones  wrote:

> Petri,
>
> Nice code pattern you are suggesting to test if there is one tag, however
> this will not work if you decide to organise the same tiddlers with
> additional tags.
>
> However if you want to go ahead remember, tags have special handling in
> tiddlywiki, but at the very same time the tags field is a field like any
> other. Thus if all tags (the 'tags' field) match's all tags.
> I have not yet reproduced this today. I will provide the exact filter if I
> find it.
>
> The TOCP plugin allows you to instead use the parent field to store the
> parent rather than tags, this would be better in your case.
>
> Regards
> Tones
>
> On Thursday, 26 November 2020 at 23:08:42 UTC+11 Petri M. wrote:
>
>> Hello Tones,
>>
>> Thank you for the input. I did notice that the issue with spaces in tags
>> was of my own doing, apparently I messed something up when I was trying to
>> make drag-and-dropping from list to list to remove the tag of the old list
>> and replace it with the tag of the new list.
>>
>> Everything is working now in an empty tiddlywiki!
>>
>> I was thinking of not messing with the drag-and-drop macro and just
>> figure out how to make a filter which only gives me the tiddlers I want. I
>> have been trying to figure out how I can make a filter which returns
>> tiddlers with tag "Task", but only if there are no other tags. So if I have
>> a tiddler "Parent" with a tag "Task" and a tiddler "Child" with tags
>> "Parent" and "Task", then the filter would only give me the "Parent"
>> tiddler. Seems like a very simple thing but I can't figure it out. I was
>> hoping I could've just made a filter that finds all the tiddlers with the
>> tag "Task" and then removes everything that has any tags in addition to
>> "Task".
>>
>> Any ideas? :)
>>
>> -Petri
>>
>> On Thu, Nov 26, 2020 at 12:16 AM TW Tones  wrote:
>>
>>> Petri,
>>>
>>> I am only starting to make use of the drag and drop features myself. In
>>> this case you are using the macro  list-tagged-draggable but you can build
>>> your own. Its is defined in $:/core/macros/list
>>>
>>> I suspect the inability to use a tiddler title with spaces may be a
>>> design weakness of the macro.
>>>
>>> A quick solution to current tiddler with spaces *may* be tag={{{
>>> [] }}}
>>>
>>> Tones
>>> On Thursday, 26 November 2020 at 01:29:17 UTC+11 Petri M. wrote:
>>>
 Oh and apparently using <$macrocall $name="list-tagged-draggable"
 itemTemplate="TODO task list template children" tag=<>/>
 will break the tags if the currentTiddler has spaces in its name. Putting
 quotes around the macro <> will just tag it with
 "<>" and not with "this is my current tag".

 BR,
 Petri M
 On Wednesday, November 25, 2020 at 3:53:59 PM UTC+2 Petri M. wrote:

> Hi Tones,
>
> Ohh thank you so much! I looked into the <$macrocall/> and tried to
> use it directly with the <> macro and it worked
> perfectly. Well almost perfectly.
>
> There is one issue. If I use <$macrocall $name="list-tagged-draggable"
> tag=<>/> then everything works fine and I am able to make
> subtasks of subtasks by just dragging them, which is exactly what I want.
> However, I cannot figure out on how to do the indentation. Inline css with
> @@margin-left:10px ... @@ does absolutely nothing. I can fix this by using
> something like
> <$macrocall $name="list-tagged-draggable" itemTemplate="TODO task list
> template" tag=<>/> where I add the inline css in the
> template file itself. But now I lose the ability to make subtasks of
> subtasks. I would like to have the indentation so that each subtask is
> slightly indented so it is easier to see.
>
> ps. though I do have to say that I did not undertand much about the
> rest of your comment. Did you mean that I could use <<$macrocall $name=tag
> tag=<> /> or {{||$:/core/ui/EditTemplate/tags}} in my example 
> code
> that I said works? What did you mean by all the bullet points?
>
> BR,
> Petri M
> On Tuesday, November 24, 2020 at 12:03:46 AM UTC+2 TW 

Re: [tw5] Re: Passing macro output to another macro?

2020-11-26 Thread TW Tones
Petri,

Nice code pattern you are suggesting to test if there is one tag, however 
this will not work if you decide to organise the same tiddlers with 
additional tags. 

However if you want to go ahead remember, tags have special handling in 
tiddlywiki, but at the very same time the tags field is a field like any 
other. Thus if all tags (the 'tags' field) match's all tags.
I have not yet reproduced this today. I will provide the exact filter if I 
find it.

The TOCP plugin allows you to instead use the parent field to store the 
parent rather than tags, this would be better in your case.

Regards
Tones

On Thursday, 26 November 2020 at 23:08:42 UTC+11 Petri M. wrote:

> Hello Tones,
>
> Thank you for the input. I did notice that the issue with spaces in tags 
> was of my own doing, apparently I messed something up when I was trying to 
> make drag-and-dropping from list to list to remove the tag of the old list 
> and replace it with the tag of the new list. 
>
> Everything is working now in an empty tiddlywiki! 
>
> I was thinking of not messing with the drag-and-drop macro and just figure 
> out how to make a filter which only gives me the tiddlers I want. I have 
> been trying to figure out how I can make a filter which returns tiddlers 
> with tag "Task", but only if there are no other tags. So if I have a 
> tiddler "Parent" with a tag "Task" and a tiddler "Child" with tags "Parent" 
> and "Task", then the filter would only give me the "Parent" tiddler. Seems 
> like a very simple thing but I can't figure it out. I was hoping I could've 
> just made a filter that finds all the tiddlers with the tag "Task" and then 
> removes everything that has any tags in addition to "Task".
>
> Any ideas? :)
>
> -Petri
>
> On Thu, Nov 26, 2020 at 12:16 AM TW Tones  wrote:
>
>> Petri,
>>
>> I am only starting to make use of the drag and drop features myself. In 
>> this case you are using the macro  list-tagged-draggable but you can build 
>> your own. Its is defined in $:/core/macros/list
>>
>> I suspect the inability to use a tiddler title with spaces may be a 
>> design weakness of the macro.
>>
>> A quick solution to current tiddler with spaces *may* be tag={{{ 
>> [] }}}
>>
>> Tones
>> On Thursday, 26 November 2020 at 01:29:17 UTC+11 Petri M. wrote:
>>
>>> Oh and apparently using <$macrocall $name="list-tagged-draggable" 
>>> itemTemplate="TODO task list template children" tag=<>/> 
>>> will break the tags if the currentTiddler has spaces in its name. Putting 
>>> quotes around the macro <> will just tag it with 
>>> "<>" and not with "this is my current tag".
>>>
>>> BR,
>>> Petri M
>>> On Wednesday, November 25, 2020 at 3:53:59 PM UTC+2 Petri M. wrote:
>>>
 Hi Tones,

 Ohh thank you so much! I looked into the <$macrocall/> and tried to use 
 it directly with the <> macro and it worked 
 perfectly. Well almost perfectly. 

 There is one issue. If I use <$macrocall $name="list-tagged-draggable" 
 tag=<>/> then everything works fine and I am able to make 
 subtasks of subtasks by just dragging them, which is exactly what I want. 
 However, I cannot figure out on how to do the indentation. Inline css with 
 @@margin-left:10px ... @@ does absolutely nothing. I can fix this by using 
 something like
 <$macrocall $name="list-tagged-draggable" itemTemplate="TODO task list 
 template" tag=<>/> where I add the inline css in the 
 template file itself. But now I lose the ability to make subtasks of 
 subtasks. I would like to have the indentation so that each subtask is 
 slightly indented so it is easier to see.

 ps. though I do have to say that I did not undertand much about the 
 rest of your comment. Did you mean that I could use <<$macrocall $name=tag 
 tag=<> /> or {{||$:/core/ui/EditTemplate/tags}} in my example 
 code 
 that I said works? What did you mean by all the bullet points? 

 BR,
 Petri M
 On Tuesday, November 24, 2020 at 12:03:46 AM UTC+2 TW Tones wrote:

> Petrie,
>
> If the list you wish to make draggable is the list of items tagging 
> the parent, then you need to name the parent. In your example the 
> currentTiddler changes, you could use the variable=varname on your $list 
> so 
> you can reference both the "sub tiddlers" and parent.
>
> Another option is to use <<$macrocall $name=tag tag=<> /> 
> because the tag pill list is draggable. or  
> {{||$:/core/ui/EditTemplate/tags}}  to act on currentTiddler.
>
>
>- This will permit spaces ion tags >
>- <$link /> is the same as
>
>
>- 
>   - <$link to=<>>
>   <$view field="title"/>
> 
>   
>
>- 
>
>
> Tones
>  
>
> On Monday, 23 November 2020 at 22:51:59 UTC+11 Petri M. wrote:
>
>> I can't figure this one out. I have a simple task list which I 
>> 

Re: [tw5] Re: Passing macro output to another macro?

2020-11-26 Thread P M
Hello Tones,

Thank you for the input. I did notice that the issue with spaces in tags
was of my own doing, apparently I messed something up when I was trying to
make drag-and-dropping from list to list to remove the tag of the old list
and replace it with the tag of the new list.

Everything is working now in an empty tiddlywiki!

I was thinking of not messing with the drag-and-drop macro and just figure
out how to make a filter which only gives me the tiddlers I want. I have
been trying to figure out how I can make a filter which returns tiddlers
with tag "Task", but only if there are no other tags. So if I have a
tiddler "Parent" with a tag "Task" and a tiddler "Child" with tags "Parent"
and "Task", then the filter would only give me the "Parent" tiddler. Seems
like a very simple thing but I can't figure it out. I was hoping I could've
just made a filter that finds all the tiddlers with the tag "Task" and then
removes everything that has any tags in addition to "Task".

Any ideas? :)

-Petri

On Thu, Nov 26, 2020 at 12:16 AM TW Tones  wrote:

> Petri,
>
> I am only starting to make use of the drag and drop features myself. In
> this case you are using the macro  list-tagged-draggable but you can build
> your own. Its is defined in $:/core/macros/list
>
> I suspect the inability to use a tiddler title with spaces may be a design
> weakness of the macro.
>
> A quick solution to current tiddler with spaces *may* be tag={{{
> [] }}}
>
> Tones
> On Thursday, 26 November 2020 at 01:29:17 UTC+11 Petri M. wrote:
>
>> Oh and apparently using <$macrocall $name="list-tagged-draggable"
>> itemTemplate="TODO task list template children" tag=<>/>
>> will break the tags if the currentTiddler has spaces in its name. Putting
>> quotes around the macro <> will just tag it with
>> "<>" and not with "this is my current tag".
>>
>> BR,
>> Petri M
>> On Wednesday, November 25, 2020 at 3:53:59 PM UTC+2 Petri M. wrote:
>>
>>> Hi Tones,
>>>
>>> Ohh thank you so much! I looked into the <$macrocall/> and tried to use
>>> it directly with the <> macro and it worked
>>> perfectly. Well almost perfectly.
>>>
>>> There is one issue. If I use <$macrocall $name="list-tagged-draggable"
>>> tag=<>/> then everything works fine and I am able to make
>>> subtasks of subtasks by just dragging them, which is exactly what I want.
>>> However, I cannot figure out on how to do the indentation. Inline css with
>>> @@margin-left:10px ... @@ does absolutely nothing. I can fix this by using
>>> something like
>>> <$macrocall $name="list-tagged-draggable" itemTemplate="TODO task list
>>> template" tag=<>/> where I add the inline css in the
>>> template file itself. But now I lose the ability to make subtasks of
>>> subtasks. I would like to have the indentation so that each subtask is
>>> slightly indented so it is easier to see.
>>>
>>> ps. though I do have to say that I did not undertand much about the rest
>>> of your comment. Did you mean that I could use <<$macrocall $name=tag
>>> tag=<> /> or {{||$:/core/ui/EditTemplate/tags}} in my example code
>>> that I said works? What did you mean by all the bullet points?
>>>
>>> BR,
>>> Petri M
>>> On Tuesday, November 24, 2020 at 12:03:46 AM UTC+2 TW Tones wrote:
>>>
 Petrie,

 If the list you wish to make draggable is the list of items tagging the
 parent, then you need to name the parent. In your example the
 currentTiddler changes, you could use the variable=varname on your $list so
 you can reference both the "sub tiddlers" and parent.

 Another option is to use <<$macrocall $name=tag tag=<> />
 because the tag pill list is draggable. or
 {{||$:/core/ui/EditTemplate/tags}}  to act on currentTiddler.


- This will permit spaces ion tags <>>>tag:"$tag$">>
- <$link /> is the same as


-
   - <$link to=<>>
   <$view field="title"/>
   


-


 Tones


 On Monday, 23 November 2020 at 22:51:59 UTC+11 Petri M. wrote:

> I can't figure this one out. I have a simple task list which I
> populate via <> macro with a template:
>
> <$checkbox tag="Task done">
> <$link to=<>>
> <$view field="title"/>
> 
>
> and this works fine. However, I would like to add to this template a
> part which adds *another *checkbox list for *subtasks*, so tasks with
> the same title as the task in question. Something like this works:
>
> <$list filter="[tag]">
> 
> @@margin-left:10px;
> <$checkbox tag="Task done">
> <$link to=<>>
> <$view field="title"/>
> 
> @@
> 
>
> But I would like to have the sublist be draggable just like my parent
> list, hence it should be populated via the <>
> macro. However, apparently I cant use <$list-tagged-draggable>
>  because it does nothing, so I can't use the
> same format as in the example. Then I tried to use the macro itself with
> 

[tw5] Re: Passing macro output to another macro?

2020-11-25 Thread TW Tones
Petri,

I am only starting to make use of the drag and drop features myself. In 
this case you are using the macro  list-tagged-draggable but you can build 
your own. Its is defined in $:/core/macros/list

I suspect the inability to use a tiddler title with spaces may be a design 
weakness of the macro.

A quick solution to current tiddler with spaces *may* be tag={{{ 
[] }}}

Tones
On Thursday, 26 November 2020 at 01:29:17 UTC+11 Petri M. wrote:

> Oh and apparently using <$macrocall $name="list-tagged-draggable" 
> itemTemplate="TODO task list template children" tag=<>/> 
> will break the tags if the currentTiddler has spaces in its name. Putting 
> quotes around the macro <> will just tag it with 
> "<>" and not with "this is my current tag".
>
> BR,
> Petri M
> On Wednesday, November 25, 2020 at 3:53:59 PM UTC+2 Petri M. wrote:
>
>> Hi Tones,
>>
>> Ohh thank you so much! I looked into the <$macrocall/> and tried to use 
>> it directly with the <> macro and it worked 
>> perfectly. Well almost perfectly. 
>>
>> There is one issue. If I use <$macrocall $name="list-tagged-draggable" 
>> tag=<>/> then everything works fine and I am able to make 
>> subtasks of subtasks by just dragging them, which is exactly what I want. 
>> However, I cannot figure out on how to do the indentation. Inline css with 
>> @@margin-left:10px ... @@ does absolutely nothing. I can fix this by using 
>> something like
>> <$macrocall $name="list-tagged-draggable" itemTemplate="TODO task list 
>> template" tag=<>/> where I add the inline css in the 
>> template file itself. But now I lose the ability to make subtasks of 
>> subtasks. I would like to have the indentation so that each subtask is 
>> slightly indented so it is easier to see.
>>
>> ps. though I do have to say that I did not undertand much about the rest 
>> of your comment. Did you mean that I could use <<$macrocall $name=tag 
>> tag=<> /> or {{||$:/core/ui/EditTemplate/tags}} in my example code 
>> that I said works? What did you mean by all the bullet points? 
>>
>> BR,
>> Petri M
>> On Tuesday, November 24, 2020 at 12:03:46 AM UTC+2 TW Tones wrote:
>>
>>> Petrie,
>>>
>>> If the list you wish to make draggable is the list of items tagging the 
>>> parent, then you need to name the parent. In your example the 
>>> currentTiddler changes, you could use the variable=varname on your $list so 
>>> you can reference both the "sub tiddlers" and parent.
>>>
>>> Another option is to use <<$macrocall $name=tag tag=<> /> 
>>> because the tag pill list is draggable. or  
>>> {{||$:/core/ui/EditTemplate/tags}}  to act on currentTiddler.
>>>
>>>
>>>- This will permit spaces ion tags <>>tag:"$tag$">>
>>>- <$link /> is the same as
>>>
>>>
>>>- 
>>>   - <$link to=<>>
>>>   <$view field="title"/>
>>> 
>>>   
>>>
>>>- 
>>>
>>>
>>> Tones
>>>  
>>>
>>> On Monday, 23 November 2020 at 22:51:59 UTC+11 Petri M. wrote:
>>>
 I can't figure this one out. I have a simple task list which I populate 
 via <> macro with a template:

 <$checkbox tag="Task done">
 <$link to=<>>
 <$view field="title"/>
 

 and this works fine. However, I would like to add to this template a 
 part which adds *another *checkbox list for *subtasks*, so tasks with 
 the same title as the task in question. Something like this works: 

 <$list filter="[tag]">
 
 @@margin-left:10px;
 <$checkbox tag="Task done">
 <$link to=<>>
 <$view field="title"/>
 
 @@
 

 But I would like to have the sublist be draggable just like my parent 
 list, hence it should be populated via the <> 
 macro. However, apparently I cant use <$list-tagged-draggable> 
  because it does nothing, so I can't use the 
 same format as in the example. Then I tried to use the macro itself with 
 something like <>>> but 
 this does not work. I tried to put the macro in a helper macro:

 \define childlist(tag:"asd")
 <>
 \end

 but I could not figure out on how the hell do I pass the output of the 
 <> 
 to this macro. I tried using $tag$, $(tag)$ and calling with 
 <> and with $(currentTiddler)$ but nothing seem to 
 work.

 Can someone shine some light on this issue?

>>>

-- 
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/edcc979a-db9d-4611-a836-3913ef39af65n%40googlegroups.com.


[tw5] Re: Passing macro output to another macro?

2020-11-25 Thread Petri M.
Oh and apparently using <$macrocall $name="list-tagged-draggable" 
itemTemplate="TODO task list template children" tag=<>/> 
will break the tags if the currentTiddler has spaces in its name. Putting 
quotes around the macro <> will just tag it with 
"<>" and not with "this is my current tag".

BR,
Petri M
On Wednesday, November 25, 2020 at 3:53:59 PM UTC+2 Petri M. wrote:

> Hi Tones,
>
> Ohh thank you so much! I looked into the <$macrocall/> and tried to use it 
> directly with the <> macro and it worked perfectly. 
> Well almost perfectly. 
>
> There is one issue. If I use <$macrocall $name="list-tagged-draggable" 
> tag=<>/> then everything works fine and I am able to make 
> subtasks of subtasks by just dragging them, which is exactly what I want. 
> However, I cannot figure out on how to do the indentation. Inline css with 
> @@margin-left:10px ... @@ does absolutely nothing. I can fix this by using 
> something like
> <$macrocall $name="list-tagged-draggable" itemTemplate="TODO task list 
> template" tag=<>/> where I add the inline css in the 
> template file itself. But now I lose the ability to make subtasks of 
> subtasks. I would like to have the indentation so that each subtask is 
> slightly indented so it is easier to see.
>
> ps. though I do have to say that I did not undertand much about the rest 
> of your comment. Did you mean that I could use <<$macrocall $name=tag 
> tag=<> /> or {{||$:/core/ui/EditTemplate/tags}} in my example code 
> that I said works? What did you mean by all the bullet points? 
>
> BR,
> Petri M
> On Tuesday, November 24, 2020 at 12:03:46 AM UTC+2 TW Tones wrote:
>
>> Petrie,
>>
>> If the list you wish to make draggable is the list of items tagging the 
>> parent, then you need to name the parent. In your example the 
>> currentTiddler changes, you could use the variable=varname on your $list so 
>> you can reference both the "sub tiddlers" and parent.
>>
>> Another option is to use <<$macrocall $name=tag tag=<> /> 
>> because the tag pill list is draggable. or  
>> {{||$:/core/ui/EditTemplate/tags}}  to act on currentTiddler.
>>
>>
>>- This will permit spaces ion tags <>tag:"$tag$">>
>>- <$link /> is the same as
>>
>>
>>- 
>>   - <$link to=<>>
>>   <$view field="title"/>
>> 
>>   
>>
>>- 
>>
>>
>> Tones
>>  
>>
>> On Monday, 23 November 2020 at 22:51:59 UTC+11 Petri M. wrote:
>>
>>> I can't figure this one out. I have a simple task list which I populate 
>>> via <> macro with a template:
>>>
>>> <$checkbox tag="Task done">
>>> <$link to=<>>
>>> <$view field="title"/>
>>> 
>>>
>>> and this works fine. However, I would like to add to this template a 
>>> part which adds *another *checkbox list for *subtasks*, so tasks with 
>>> the same title as the task in question. Something like this works: 
>>>
>>> <$list filter="[tag]">
>>> 
>>> @@margin-left:10px;
>>> <$checkbox tag="Task done">
>>> <$link to=<>>
>>> <$view field="title"/>
>>> 
>>> @@
>>> 
>>>
>>> But I would like to have the sublist be draggable just like my parent 
>>> list, hence it should be populated via the <> 
>>> macro. However, apparently I cant use <$list-tagged-draggable> 
>>>  because it does nothing, so I can't use the 
>>> same format as in the example. Then I tried to use the macro itself with 
>>> something like <>>> but 
>>> this does not work. I tried to put the macro in a helper macro:
>>>
>>> \define childlist(tag:"asd")
>>> <>
>>> \end
>>>
>>> but I could not figure out on how the hell do I pass the output of the 
>>> <> 
>>> to this macro. I tried using $tag$, $(tag)$ and calling with 
>>> <> and with $(currentTiddler)$ but nothing seem to work.
>>>
>>> Can someone shine some light on this issue?
>>>
>>

-- 
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/49cef8e5-61d1-4e1b-9540-e4bea138deafn%40googlegroups.com.


[tw5] Re: Passing macro output to another macro?

2020-11-25 Thread Petri M.
Hi Tones,

Ohh thank you so much! I looked into the <$macrocall/> and tried to use it 
directly with the <> macro and it worked perfectly. 
Well almost perfectly. 

There is one issue. If I use <$macrocall $name="list-tagged-draggable" 
tag=<>/> then everything works fine and I am able to make 
subtasks of subtasks by just dragging them, which is exactly what I want. 
However, I cannot figure out on how to do the indentation. Inline css with 
@@margin-left:10px ... @@ does absolutely nothing. I can fix this by using 
something like
<$macrocall $name="list-tagged-draggable" itemTemplate="TODO task list 
template" tag=<>/> where I add the inline css in the 
template file itself. But now I lose the ability to make subtasks of 
subtasks. I would like to have the indentation so that each subtask is 
slightly indented so it is easier to see.

ps. though I do have to say that I did not undertand much about the rest of 
your comment. Did you mean that I could use <<$macrocall $name=tag 
tag=<> /> or {{||$:/core/ui/EditTemplate/tags}} in my example code 
that I said works? What did you mean by all the bullet points? 

BR,
Petri M
On Tuesday, November 24, 2020 at 12:03:46 AM UTC+2 TW Tones wrote:

> Petrie,
>
> If the list you wish to make draggable is the list of items tagging the 
> parent, then you need to name the parent. In your example the 
> currentTiddler changes, you could use the variable=varname on your $list so 
> you can reference both the "sub tiddlers" and parent.
>
> Another option is to use <<$macrocall $name=tag tag=<> /> because 
> the tag pill list is draggable. or  {{||$:/core/ui/EditTemplate/tags}}  to 
> act on currentTiddler.
>
>
>- This will permit spaces ion tags >
>- <$link /> is the same as
>
>
>- 
>   - <$link to=<>>
>   <$view field="title"/>
> 
>   
>
>- 
>
>
> Tones
>  
>
> On Monday, 23 November 2020 at 22:51:59 UTC+11 Petri M. wrote:
>
>> I can't figure this one out. I have a simple task list which I populate 
>> via <> macro with a template:
>>
>> <$checkbox tag="Task done">
>> <$link to=<>>
>> <$view field="title"/>
>> 
>>
>> and this works fine. However, I would like to add to this template a part 
>> which adds *another *checkbox list for *subtasks*, so tasks with the 
>> same title as the task in question. Something like this works: 
>>
>> <$list filter="[tag]">
>> 
>> @@margin-left:10px;
>> <$checkbox tag="Task done">
>> <$link to=<>>
>> <$view field="title"/>
>> 
>> @@
>> 
>>
>> But I would like to have the sublist be draggable just like my parent 
>> list, hence it should be populated via the <> 
>> macro. However, apparently I cant use <$list-tagged-draggable> 
>>  because it does nothing, so I can't use the 
>> same format as in the example. Then I tried to use the macro itself with 
>> something like <>>> but this 
>> does not work. I tried to put the macro in a helper macro:
>>
>> \define childlist(tag:"asd")
>> <>
>> \end
>>
>> but I could not figure out on how the hell do I pass the output of the 
>> <> 
>> to this macro. I tried using $tag$, $(tag)$ and calling with 
>> <> and with $(currentTiddler)$ but nothing seem to work.
>>
>> Can someone shine some light on this issue?
>>
>

-- 
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/349212ad-2a2b-41d0-9990-b1aed190ab15n%40googlegroups.com.


[tw5] Re: Passing macro output to another macro?

2020-11-23 Thread TW Tones
Petrie,

If the list you wish to make draggable is the list of items tagging the 
parent, then you need to name the parent. In your example the 
currentTiddler changes, you could use the variable=varname on your $list so 
you can reference both the "sub tiddlers" and parent.

Another option is to use <<$macrocall $name=tag tag=<> /> because 
the tag pill list is draggable. or  {{||$:/core/ui/EditTemplate/tags}}  to 
act on currentTiddler.


   - This will permit spaces ion tags <>
   - <$link /> is the same as
  - <$link to=<>>
  <$view field="title"/>

  

Tones
 

On Monday, 23 November 2020 at 22:51:59 UTC+11 Petri M. wrote:

> I can't figure this one out. I have a simple task list which I populate 
> via <> macro with a template:
>
> <$checkbox tag="Task done">
> <$link to=<>>
> <$view field="title"/>
> 
>
> and this works fine. However, I would like to add to this template a part 
> which adds *another *checkbox list for *subtasks*, so tasks with the same 
> title as the task in question. Something like this works: 
>
> <$list filter="[tag]">
> 
> @@margin-left:10px;
> <$checkbox tag="Task done">
> <$link to=<>>
> <$view field="title"/>
> 
> @@
> 
>
> But I would like to have the sublist be draggable just like my parent 
> list, hence it should be populated via the <> 
> macro. However, apparently I cant use <$list-tagged-draggable> 
>  because it does nothing, so I can't use the 
> same format as in the example. Then I tried to use the macro itself with 
> something like <>>> but this 
> does not work. I tried to put the macro in a helper macro:
>
> \define childlist(tag:"asd")
> <>
> \end
>
> but I could not figure out on how the hell do I pass the output of the 
> <> 
> to this macro. I tried using $tag$, $(tag)$ and calling with 
> <> and with $(currentTiddler)$ but nothing seem to work.
>
> Can someone shine some light on this issue?
>

-- 
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/de939cfe-359f-4ac9-b31d-e319beb4ababn%40googlegroups.com.