Re: [tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-24 Thread PMario
On Friday, February 24, 2017 at 7:23:16 PM UTC+1, Daniel Cunningham wrote:

> So instead of: "death by whitespace?" it's simply: "Dude.  Whitespace 
> matters."  :-)
>

:) ... but you are right. It sometime hurts quite a bit. ... 

But we also have to deal with backwards compatibility. .. There are some 
things, that Jeremy mentioned, that he would do in a different way today. 
... But that's life. 

I think we have a  great product. A hell lot of flexibility. 

... and some 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 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/4f5243e9-93ee-43ae-9b2b-f9821ad105d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-24 Thread Daniel Cunningham
Hi Mario,

Thanks for your efforts at explaining.  Yes, I'm coming to a new
appreciation.   With TW, you can't treat declarations and invocations as a
matter of personal style.  You need to understand exactly how the
substitutions will take place.

So instead of: "death by whitespace?" it's simply: "Dude.  Whitespace
matters."  :-)

And it's very much worth learning, because of the results (and power) it
can give you.

Thanks, Mario.

-- Best regards,
   Daniel


On Fri, Feb 24, 2017 at 12:25 AM, PMario  wrote:

> On Friday, February 24, 2017 at 7:34:03 AM UTC+1, Daniel Cunningham wrote:
>>
>> Finally. some observations and questions for you veterans (keeping in
>> mind that I'm not at all familiar with the code base yet):
>>
>>- It kind of "bothered" me that the declaration "looks" like it has a
>>"default parameterization", but does not really.  In other words, when you
>>call the macro, if you don't explicitly supply all parameters, it will
>>fail.  That seems a bit fragile, right?
>>
>> Parameters do have default values, if you define them in the macro
> \define section.  IMO you just forgot the : ... see my other post..
>
>
>>
>>- Death by whitespace:  I found out if there's any leading whitespace
>>(before the macro definition) the tiddler fails.  Also, if there's any
>>whitespace in the filter list, it will fail.  Again, trying not to seem
>>harsh, but it feels rather fragile.  Am I being unfair?
>>
>> macros are TW syntax. So whitespace matters, most of the time. ... macro
> definitions have to start at the beginning of the line. Similar to headings
> and list syntax. ... It's wikitext  ...  powerful wikitext ;)
>
>
>
>>
>>- Is this "macro-ey" stuff kind of like the STL in C++?
>>
>> In the sense, that macros should abstract away complexity from enduses.
> .. yes.
>
> BUT TW macros are basically "text substitutions"  see:
> http://tiddlywiki.com/#Macros%20in%20WikiText:%5B%5BMacros%
> 20in%20WikiText%5D%5D%20Macros%20Pragma
>
>
>>
>>- Is this "fragility" due to the macro mechanism itself?
>>
>> I'm not exactly sure what you mean here? An example would be nice. ...
> Most of the time whitespace matters.
>
> TW syntax is used to produce formatted text. .. It's no general purpose
> programming language.
>
> have fun!
> mario
>
> --
> 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/0f_9pW6XKb4/unsubscribe.
> To unsubscribe from this group and all its topics, 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/b59da3f3-3669-48ef-8403-78b89ae45f4c%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2B0jAPiM7_nYusF%3DYukU7pN07tS4qGK59SAC1W60wDWCoh63Ow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-24 Thread Daniel Cunningham
Hi Mario,

You are quite the gentleman!  Rookie mistake on my part.  Many thanks for
spotting the error!

Best regards,
-- Daniel

On Fri, Feb 24, 2017 at 12:00 AM, PMario  wrote:

> Hi,
>
> I think there is a typo. IMO it should be:
>
> \define timeline2(limit:"100",format:"DDth  MMM
> ",subfilter:"",sortaction:"sort",dateField:"modified")
>
> see the : after sortaction!
>
> -m
>
> --
> 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/0f_9pW6XKb4/unsubscribe.
> To unsubscribe from this group and all its topics, 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/408bddbe-4010-4e91-8139-5feddbd00b45%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2B0jAPjh7CyZGxnG-GFitafdfNN58PQuXg5xHFFcs37hBWj05Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-24 Thread PMario


On Friday, February 24, 2017 at 7:34:03 AM UTC+1, Daniel Cunningham wrote:
>
>
>- Death by whitespace:  I found out if there's any leading whitespace 
>(before the macro definition) the tiddler fails.  Also, if there's any 
>whitespace in the filter list, it will fail.  Again, trying not to seem 
>harsh, but it feels rather fragile.  Am I being unfair?
>
> whitespace in filters indicates a "filter run" see: 
http://tiddlywiki.com/#Filter%20Run:%5B%5BFilter%20Run%5D%5D%20%5B%5BFilter%20Step%5D%5D%20%5B%5BTitle%20Selection%5D%5D%20%5B%5BTitle%20List%5D%5D%20ListField

... Filters in combination with the list-widget are the most powerful 
mechanic in TW. It could fill a book ;) ... but it also has a steep 
learning curve :)

Keep in mind: The whole TW UI we use, is built with wikitext. There is no 
other wiki system I know, that gives end-users that degree of freedom.  In 
the sense of tweakability. __and__ If you mess it up. Just delete your 
stuff and the core "shadow tiddlers" take over again.

-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 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/062b1c48-8871-412d-8922-837364d4f014%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-24 Thread PMario
On Friday, February 24, 2017 at 7:34:03 AM UTC+1, Daniel Cunningham wrote:
>
> Finally. some observations and questions for you veterans (keeping in mind 
> that I'm not at all familiar with the code base yet):
>
>- It kind of "bothered" me that the declaration "looks" like it has a 
>"default parameterization", but does not really.  In other words, when you 
>call the macro, if you don't explicitly supply all parameters, it will 
>fail.  That seems a bit fragile, right?
>
> Parameters do have default values, if you define them in the macro \define 
section.  IMO you just forgot the : ... see my other post..
 

>
>- Death by whitespace:  I found out if there's any leading whitespace 
>(before the macro definition) the tiddler fails.  Also, if there's any 
>whitespace in the filter list, it will fail.  Again, trying not to seem 
>harsh, but it feels rather fragile.  Am I being unfair?
>
> macros are TW syntax. So whitespace matters, most of the time. ... macro 
definitions have to start at the beginning of the line. Similar to headings 
and list syntax. ... It's wikitext  ...  powerful wikitext ;) 

 

>
>- Is this "macro-ey" stuff kind of like the STL in C++?
>
> In the sense, that macros should abstract away complexity from enduses. .. 
yes. 

BUT TW macros are basically "text substitutions"  see: 
http://tiddlywiki.com/#Macros%20in%20WikiText:%5B%5BMacros%20in%20WikiText%5D%5D%20Macros%20Pragma
 

>
>- Is this "fragility" due to the macro mechanism itself?
>
> I'm not exactly sure what you mean here? An example would be nice. ... 
Most of the time whitespace matters. 

TW syntax is used to produce formatted text. .. It's no general purpose 
programming language.
 
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 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/b59da3f3-3669-48ef-8403-78b89ae45f4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-24 Thread PMario
Hi, 

I think there is a typo. IMO it should be:

\define timeline2(limit:"100",format:"DDth  MMM 
",subfilter:"",sortaction:"sort",dateField:"modified")

see the : after sortaction!

-m

-- 
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/408bddbe-4010-4e91-8139-5feddbd00b45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-23 Thread Daniel Cunningham
Sorry It was when I tried to add a comment above the macro that I threw the 
error.  I need to study up on TW5 comment syntax.

On Thursday, February 23, 2017 at 11:15:35 PM UTC-8, Daniel Cunningham 
wrote:
>
> Uhhh, scratch the "leading whitespace fragility" question.  I need to 
> chase my own sloppiness down...  :-)
>
>
> On Thursday, February 23, 2017 at 10:34:03 PM UTC-8, Daniel Cunningham 
> wrote:
>>
>> Hi Mark,
>>
>> Thanks for that follow-up!  I'm beginning to see (thanks to you and 
>> Mario) how this works.
>>
>> OK, so I now get how you can negate the sort order inside the macro (with 
>> a bang).  And then I see from the docs that the way that expression 
>> evaluates is L-to-R via that "railroad" style filter syntax 
>> .
>>
>> And now I see how you can't get to the juicy inner goodness unless you 
>> explicitly flip that bang in the middle...
>>
>> ...which bothered me.  So I extended your initial idea to allow an 
>> additional parameterization from outside:
>>
>> \define timeline2(limit:"100",format:"DDth  MMM 
>> ",subfilter:"",sortaction"sort",dateField:"modified")
>> 
>> <$list 
>> filter="[!is[system]$subfilter$has[$dateField$]$sortaction$[$dateField$]limit[$limit$]eachday[$dateField$]]">
>>
>> [...]
>>
>> <$macrocall $name="timeline2" subfilter="" 
>> format={{$:/language/RecentChanges/DateFormat}} sortaction="sort" 
>> dateField="created"/>
>>
>> And so, I can make a call using a sortaction of "sort" or "!sort", and 
>> control it from outside.  Which works.  And taught me a lot, so thanks to 
>> you & Mario for investing your time explaining that to me.
>>
>> Finally. some observations and questions for you veterans (keeping in 
>> mind that I'm not at all familiar with the code base yet):
>>
>>- Keep in mind I'm not a "macro-ey" kinda guy.  I'm more of 
>>"function-ey" or "object/method-ey" dude, so I'm sure you should take 
>> this 
>>with a bowling ball sized grain of salf... 
>>- It kind of "bothered" me that the declaration "looks" like it has a 
>>"default parameterization", but does not really.  In other words, when 
>> you 
>>call the macro, if you don't explicitly supply all parameters, it will 
>>fail.  That seems a bit fragile, right?
>>- Death by whitespace:  I found out if there's any leading whitespace 
>>(before the macro definition) the tiddler fails.  Also, if there's any 
>>whitespace in the filter list, it will fail.  Again, trying not to seem 
>>harsh, but it feels rather fragile.  Am I being unfair?
>>- Is this "macro-ey" stuff kind of like the STL in C++?
>>- Is this "fragility" due to the macro mechanism itself?  Or is it a 
>>characteristic of JavaScript?  Or CSS?  Or HTML?  Or some intersection of 
>>those elements?
>>
>>
>> And, again, most of all... THANKS for your explanations, which have been 
>> very useful in helping me to spin up on the awesomeness that is TiddlyWiki!
>>
>>
>>
>> On Thursday, February 23, 2017 at 5:42:43 PM UTC-8, Mark S. wrote:
>>>
>>> Hi Daniel,
>>>
>>> Mario's syntax uses the macrocall widget, which is a somewhat more 
>>> formal way of calling a macro that works better in some situations.
>>>
>>> The problem with the timeline macro is that it doesn't give you access 
>>> to the sorting order (A/D), as you can see in this filter:
>>>
>>> [!is[system]$subfilter$has[$dateField$]*!**sort*[$dateField$]limit[
>>> $limit$]eachday[$dateField$]]
>>>
>>> You can't reach the *!sort* in the macro invocation. You can try 
>>> putting the following into a tiddler, which is modified from the original 
>>> timeline code:
>>>
>>> \define timeline2(limit:"100",format:"DDth MMM ",subfilter:"",
>>> dateField:"modified")
>>> 
>>> <$list filter=
>>> "[!is[system]$subfilter$has[$dateField$]sort[$dateField$]limit[$limit$]eachday[$dateField$]]"
>>> >
>>> 
>>> <$view field="$dateField$" format="date" template="$format$"/>
>>> <$list filter=
>>> "[sameday:$dateField${!!$dateField$}!is[system]$subfilter$sort[$dateField$]]"
>>> >
>>> 
>>> <$link to={{!!title}}>
>>> <>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> \end
>>> <$macrocall $name="timeline2" subfilter="" format={{$:/language/
>>> RecentChanges/DateFormat}} dateField="created"/>
>>>
>>> It seemed to work in my quick test, though I didn't look at dates too 
>>> closely. 
>>>
>>> Good luck!
>>> Mark
>>>
>>>
>>> On Thursday, February 23, 2017 at 4:12:26 PM UTC-8, Daniel Cunningham 
>>> wrote:

 Many thanks, Mario!  I tried that, and it works.  

 But rather than change a shadow tiddler, I elected to put in into a 
 "end-user" tiddler, that I can then place in the sidebar with a 
 "$:tags/SideBar" tag.  That gives me the functionality I was looking for.  
 Also, I won't shoot myself in the foot if core changes during my "learning 
 curve".  :-)

 As a follow-up, the results are still in descending order (same as the 
 original Recent tab functionality).  So, 

[tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-23 Thread Daniel Cunningham
Uhhh, scratch the "leading whitespace fragility" question.  I need to chase 
my own sloppiness down...  :-)


On Thursday, February 23, 2017 at 10:34:03 PM UTC-8, Daniel Cunningham 
wrote:
>
> Hi Mark,
>
> Thanks for that follow-up!  I'm beginning to see (thanks to you and Mario) 
> how this works.
>
> OK, so I now get how you can negate the sort order inside the macro (with 
> a bang).  And then I see from the docs that the way that expression 
> evaluates is L-to-R via that "railroad" style filter syntax 
> .
>
> And now I see how you can't get to the juicy inner goodness unless you 
> explicitly flip that bang in the middle...
>
> ...which bothered me.  So I extended your initial idea to allow an 
> additional parameterization from outside:
>
> \define timeline2(limit:"100",format:"DDth  MMM 
> ",subfilter:"",sortaction"sort",dateField:"modified")
> 
> <$list 
> filter="[!is[system]$subfilter$has[$dateField$]$sortaction$[$dateField$]limit[$limit$]eachday[$dateField$]]">
>
> [...]
>
> <$macrocall $name="timeline2" subfilter="" 
> format={{$:/language/RecentChanges/DateFormat}} sortaction="sort" 
> dateField="created"/>
>
> And so, I can make a call using a sortaction of "sort" or "!sort", and 
> control it from outside.  Which works.  And taught me a lot, so thanks to 
> you & Mario for investing your time explaining that to me.
>
> Finally. some observations and questions for you veterans (keeping in mind 
> that I'm not at all familiar with the code base yet):
>
>- Keep in mind I'm not a "macro-ey" kinda guy.  I'm more of 
>"function-ey" or "object/method-ey" dude, so I'm sure you should take this 
>with a bowling ball sized grain of salf... 
>- It kind of "bothered" me that the declaration "looks" like it has a 
>"default parameterization", but does not really.  In other words, when you 
>call the macro, if you don't explicitly supply all parameters, it will 
>fail.  That seems a bit fragile, right?
>- Death by whitespace:  I found out if there's any leading whitespace 
>(before the macro definition) the tiddler fails.  Also, if there's any 
>whitespace in the filter list, it will fail.  Again, trying not to seem 
>harsh, but it feels rather fragile.  Am I being unfair?
>- Is this "macro-ey" stuff kind of like the STL in C++?
>- Is this "fragility" due to the macro mechanism itself?  Or is it a 
>characteristic of JavaScript?  Or CSS?  Or HTML?  Or some intersection of 
>those elements?
>
>
> And, again, most of all... THANKS for your explanations, which have been 
> very useful in helping me to spin up on the awesomeness that is TiddlyWiki!
>
>
>
> On Thursday, February 23, 2017 at 5:42:43 PM UTC-8, Mark S. wrote:
>>
>> Hi Daniel,
>>
>> Mario's syntax uses the macrocall widget, which is a somewhat more formal 
>> way of calling a macro that works better in some situations.
>>
>> The problem with the timeline macro is that it doesn't give you access to 
>> the sorting order (A/D), as you can see in this filter:
>>
>> [!is[system]$subfilter$has[$dateField$]*!**sort*[$dateField$]limit[
>> $limit$]eachday[$dateField$]]
>>
>> You can't reach the *!sort* in the macro invocation. You can try putting 
>> the following into a tiddler, which is modified from the original timeline 
>> code:
>>
>> \define timeline2(limit:"100",format:"DDth MMM ",subfilter:"",
>> dateField:"modified")
>> 
>> <$list filter=
>> "[!is[system]$subfilter$has[$dateField$]sort[$dateField$]limit[$limit$]eachday[$dateField$]]"
>> >
>> 
>> <$view field="$dateField$" format="date" template="$format$"/>
>> <$list filter=
>> "[sameday:$dateField${!!$dateField$}!is[system]$subfilter$sort[$dateField$]]"
>> >
>> 
>> <$link to={{!!title}}>
>> <>
>> 
>> 
>> 
>> 
>> 
>> 
>> \end
>> <$macrocall $name="timeline2" subfilter="" format={{$:/language/
>> RecentChanges/DateFormat}} dateField="created"/>
>>
>> It seemed to work in my quick test, though I didn't look at dates too 
>> closely. 
>>
>> Good luck!
>> Mark
>>
>>
>> On Thursday, February 23, 2017 at 4:12:26 PM UTC-8, Daniel Cunningham 
>> wrote:
>>>
>>> Many thanks, Mario!  I tried that, and it works.  
>>>
>>> But rather than change a shadow tiddler, I elected to put in into a 
>>> "end-user" tiddler, that I can then place in the sidebar with a 
>>> "$:tags/SideBar" tag.  That gives me the functionality I was looking for.  
>>> Also, I won't shoot myself in the foot if core changes during my "learning 
>>> curve".  :-)
>>>
>>> As a follow-up, the results are still in descending order (same as the 
>>> original Recent tab functionality).  So, to get ascending order, I recon I 
>>> should apply a sort operator to the results of your code segment.  But the 
>>> syntax of your code is very different than that shown in the docs -- can 
>>> you give guidance on this?
>>>
>>> Best,
>>>
>>> -- Daniel
>>>
>>>
>>> On Wednesday, February 22, 2017 at 4:22:50 PM UTC-8, PMario wrote:

 

[tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-23 Thread Daniel Cunningham
Hi Mark,

Thanks for that follow-up!  I'm beginning to see (thanks to you and Mario) 
how this works.

OK, so I now get how you can negate the sort order inside the macro (with a 
bang).  And then I see from the docs that the way that expression evaluates 
is L-to-R via that "railroad" style filter syntax 
.

And now I see how you can't get to the juicy inner goodness unless you 
explicitly flip that bang in the middle...

...which bothered me.  So I extended your initial idea to allow an 
additional parameterization from outside:

\define timeline2(limit:"100",format:"DDth  MMM 
",subfilter:"",sortaction"sort",dateField:"modified")

<$list 
filter="[!is[system]$subfilter$has[$dateField$]$sortaction$[$dateField$]limit[$limit$]eachday[$dateField$]]">

[...]

<$macrocall $name="timeline2" subfilter="" 
format={{$:/language/RecentChanges/DateFormat}} sortaction="sort" 
dateField="created"/>

And so, I can make a call using a sortaction of "sort" or "!sort", and 
control it from outside.  Which works.  And taught me a lot, so thanks to 
you & Mario for investing your time explaining that to me.

Finally. some observations and questions for you veterans (keeping in mind 
that I'm not at all familiar with the code base yet):

   - Keep in mind I'm not a "macro-ey" kinda guy.  I'm more of 
   "function-ey" or "object/method-ey" dude, so I'm sure you should take this 
   with a bowling ball sized grain of salf... 
   - It kind of "bothered" me that the declaration "looks" like it has a 
   "default parameterization", but does not really.  In other words, when you 
   call the macro, if you don't explicitly supply all parameters, it will 
   fail.  That seems a bit fragile, right?
   - Death by whitespace:  I found out if there's any leading whitespace 
   (before the macro definition) the tiddler fails.  Also, if there's any 
   whitespace in the filter list, it will fail.  Again, trying not to seem 
   harsh, but it feels rather fragile.  Am I being unfair?
   - Is this "macro-ey" stuff kind of like the STL in C++?
   - Is this "fragility" due to the macro mechanism itself?  Or is it a 
   characteristic of JavaScript?  Or CSS?  Or HTML?  Or some intersection of 
   those elements?
   

And, again, most of all... THANKS for your explanations, which have been 
very useful in helping me to spin up on the awesomeness that is TiddlyWiki!



On Thursday, February 23, 2017 at 5:42:43 PM UTC-8, Mark S. wrote:
>
> Hi Daniel,
>
> Mario's syntax uses the macrocall widget, which is a somewhat more formal 
> way of calling a macro that works better in some situations.
>
> The problem with the timeline macro is that it doesn't give you access to 
> the sorting order (A/D), as you can see in this filter:
>
> [!is[system]$subfilter$has[$dateField$]*!**sort*[$dateField$]limit[$limit$
> ]eachday[$dateField$]]
>
> You can't reach the *!sort* in the macro invocation. You can try putting 
> the following into a tiddler, which is modified from the original timeline 
> code:
>
> \define timeline2(limit:"100",format:"DDth MMM ",subfilter:"",
> dateField:"modified")
> 
> <$list filter=
> "[!is[system]$subfilter$has[$dateField$]sort[$dateField$]limit[$limit$]eachday[$dateField$]]"
> >
> 
> <$view field="$dateField$" format="date" template="$format$"/>
> <$list filter=
> "[sameday:$dateField${!!$dateField$}!is[system]$subfilter$sort[$dateField$]]"
> >
> 
> <$link to={{!!title}}>
> <>
> 
> 
> 
> 
> 
> 
> \end
> <$macrocall $name="timeline2" subfilter="" format={{$:/language/
> RecentChanges/DateFormat}} dateField="created"/>
>
> It seemed to work in my quick test, though I didn't look at dates too 
> closely. 
>
> Good luck!
> Mark
>
>
> On Thursday, February 23, 2017 at 4:12:26 PM UTC-8, Daniel Cunningham 
> wrote:
>>
>> Many thanks, Mario!  I tried that, and it works.  
>>
>> But rather than change a shadow tiddler, I elected to put in into a 
>> "end-user" tiddler, that I can then place in the sidebar with a 
>> "$:tags/SideBar" tag.  That gives me the functionality I was looking for.  
>> Also, I won't shoot myself in the foot if core changes during my "learning 
>> curve".  :-)
>>
>> As a follow-up, the results are still in descending order (same as the 
>> original Recent tab functionality).  So, to get ascending order, I recon I 
>> should apply a sort operator to the results of your code segment.  But the 
>> syntax of your code is very different than that shown in the docs -- can 
>> you give guidance on this?
>>
>> Best,
>>
>> -- Daniel
>>
>>
>> On Wednesday, February 22, 2017 at 4:22:50 PM UTC-8, PMario wrote:
>>>
>>> On Wednesday, February 22, 2017 at 11:48:49 PM UTC+1, Daniel Cunningham 
>>> wrote:

 And then what you are saying is that since this is embedded in the 
 timeline macro, any sort criteria I try to apply to "created" will be to 
 no 
 avail?

>>>
>>> Have a look at the docs: http://tiddlywiki.com/#timeline%20Macro
>>>  
>>>

 

[tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-23 Thread 'Mark S.' via TiddlyWiki
Hi Daniel,

Mario's syntax uses the macrocall widget, which is a somewhat more formal 
way of calling a macro that works better in some situations.

The problem with the timeline macro is that it doesn't give you access to 
the sorting order (A/D), as you can see in this filter:

[!is[system]$subfilter$has[$dateField$]*!**sort*[$dateField$]limit[$limit$]
eachday[$dateField$]]

You can't reach the *!sort* in the macro invocation. You can try putting 
the following into a tiddler, which is modified from the original timeline 
code:

\define timeline2(limit:"100",format:"DDth MMM ",subfilter:"",dateField:
"modified")

<$list filter=
"[!is[system]$subfilter$has[$dateField$]sort[$dateField$]limit[$limit$]eachday[$dateField$]]"
>

<$view field="$dateField$" format="date" template="$format$"/>
<$list filter=
"[sameday:$dateField${!!$dateField$}!is[system]$subfilter$sort[$dateField$]]"
>

<$link to={{!!title}}>
<>






\end
<$macrocall $name="timeline2" subfilter="" format={{$:/language/
RecentChanges/DateFormat}} dateField="created"/>

It seemed to work in my quick test, though I didn't look at dates too 
closely. 

Good luck!
Mark


On Thursday, February 23, 2017 at 4:12:26 PM UTC-8, Daniel Cunningham wrote:
>
> Many thanks, Mario!  I tried that, and it works.  
>
> But rather than change a shadow tiddler, I elected to put in into a 
> "end-user" tiddler, that I can then place in the sidebar with a 
> "$:tags/SideBar" tag.  That gives me the functionality I was looking for.  
> Also, I won't shoot myself in the foot if core changes during my "learning 
> curve".  :-)
>
> As a follow-up, the results are still in descending order (same as the 
> original Recent tab functionality).  So, to get ascending order, I recon I 
> should apply a sort operator to the results of your code segment.  But the 
> syntax of your code is very different than that shown in the docs -- can 
> you give guidance on this?
>
> Best,
>
> -- Daniel
>
>
> On Wednesday, February 22, 2017 at 4:22:50 PM UTC-8, PMario wrote:
>>
>> On Wednesday, February 22, 2017 at 11:48:49 PM UTC+1, Daniel Cunningham 
>> wrote:
>>>
>>> And then what you are saying is that since this is embedded in the 
>>> timeline macro, any sort criteria I try to apply to "created" will be to no 
>>> avail?
>>>
>>
>> Have a look at the docs: http://tiddlywiki.com/#timeline%20Macro
>>  
>>
>>>
>>> Unless... I clone the macro & modfify it to use the "created" field?
>>>
>>
>> Edit: $:/core/ui/SideBar/Recent 
>> 
>>
>> like so: <$macrocall $name="timeline" 
>> format={{$:/language/RecentChanges/DateFormat}} dateField="created"/>
>>
>> and you should be good to go. 
>>
>> 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 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/7e045124-c89f-476b-9d3e-6992563bb9c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-23 Thread Daniel Cunningham
Many thanks, Mario!  I tried that, and it works.  

But rather than change a shadow tiddler, I elected to put in into a 
"end-user" tiddler, that I can then place in the sidebar with a 
"$:tags/SideBar" tag.  That gives me the functionality I was looking for.  
Also, I won't shoot myself in the foot if core changes during my "learning 
curve".  :-)

As a follow-up, the results are still in descending order (same as the 
original Recent tab functionality).  So, to get ascending order, I recon I 
should apply a sort operator to the results of your code segment.  But the 
syntax of your code is very different than that shown in the docs -- can 
you give guidance on this?

Best,

-- Daniel


On Wednesday, February 22, 2017 at 4:22:50 PM UTC-8, PMario wrote:
>
> On Wednesday, February 22, 2017 at 11:48:49 PM UTC+1, Daniel Cunningham 
> wrote:
>>
>> And then what you are saying is that since this is embedded in the 
>> timeline macro, any sort criteria I try to apply to "created" will be to no 
>> avail?
>>
>
> Have a look at the docs: http://tiddlywiki.com/#timeline%20Macro
>  
>
>>
>> Unless... I clone the macro & modfify it to use the "created" field?
>>
>
> Edit: $:/core/ui/SideBar/Recent 
> 
>
> like so: <$macrocall $name="timeline" 
> format={{$:/language/RecentChanges/DateFormat}} dateField="created"/>
>
> and you should be good to go. 
>
> 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 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/41c0cc43-6424-4751-829c-161c912420ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-22 Thread 'Mark S.' via TiddlyWiki
I've made a PR for this fix.

On Wednesday, February 22, 2017 at 7:32:35 PM UTC-8, Mark S. wrote:
>
> So this line in the documentation is incorrect:
>
> [!is[system]$subfilter$has[modified]!sort[modified]limit[$limit$]eachday[
> modified]]
>
> and should read instead
>
> [!is[system]$subfilter$has[$dateField$]!sort[$dateField$]limit[$limit$]
> eachday[$dateField$]]
>
> Mark
>
>

-- 
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/b0c300cb-a728-4e30-b674-d75726855394%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-22 Thread 'Mark S.' via TiddlyWiki
So this line in the documentation is incorrect:

[!is[system]$subfilter$has[modified]!sort[modified]limit[$limit$]eachday[
modified]]

and should read instead

[!is[system]$subfilter$has[$dateField$]!sort[$dateField$]limit[$limit$]
eachday[$dateField$]]

Mark

On Wednesday, February 22, 2017 at 4:22:50 PM UTC-8, PMario wrote:
>
> On Wednesday, February 22, 2017 at 11:48:49 PM UTC+1, Daniel Cunningham 
> wrote:
>>
>> And then what you are saying is that since this is embedded in the 
>> timeline macro, any sort criteria I try to apply to "created" will be to no 
>> avail?
>>
>
> Have a look at the docs: http://tiddlywiki.com/#timeline%20Macro
>  
>
>>
>> Unless... I clone the macro & modfify it to use the "created" field?
>>
>
> Edit: $:/core/ui/SideBar/Recent 
> 
>
> like so: <$macrocall $name="timeline" 
> format={{$:/language/RecentChanges/DateFormat}} dateField="created"/>
>
> and you should be good to go. 
>
> 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 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/5864e306-3157-4bd9-bb70-bc3ece99bd20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-22 Thread PMario
On Wednesday, February 22, 2017 at 11:48:49 PM UTC+1, Daniel Cunningham 
wrote:
>
> And then what you are saying is that since this is embedded in the 
> timeline macro, any sort criteria I try to apply to "created" will be to no 
> avail?
>

Have a look at the docs: http://tiddlywiki.com/#timeline%20Macro
 

>
> Unless... I clone the macro & modfify it to use the "created" field?
>

Edit: $:/core/ui/SideBar/Recent 


like so: <$macrocall $name="timeline" 
format={{$:/language/RecentChanges/DateFormat}} dateField="created"/>

and you should be good to go. 

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 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/65f3bb10-f484-4a51-aba2-1c28f8452377%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-22 Thread Daniel Cunningham
A!  Thanks much, Mark!  I saw that documentation, but did not realize 
its implications. 

So, just to be clear, it's saying?...

   1. look at stuff that's not a system tiddler;
   2. filter anything that's got a "modified" field;
   3. do a reverse sort on the "modified" date;
   4. and then, if the user put some limits on the listing, use those 
   limits.

And then what you are saying is that since this is embedded in the timeline 
macro, any sort criteria I try to apply to "created" will be to no avail?

Unless... I clone the macro & modfify it to use the "created" field?

Thanks again!



On Wednesday, February 22, 2017 at 2:19:59 PM UTC-8, Mark S. wrote:
>
> Per the documentation, timeline uses this filter:
>
> [!is[system]$subfilter$has[modified]!sort[modified]limit[$limit$]eachday[
> modified]]
>
> This means that a sort on the modified field is applied after the 
> subfilter and will take precedence over a sort order specified in the 
> subfilter.
>
> I guess I would consider cloning $:/core/macros/timeline perhaps creating 
> a macro "timeline2" and then change the sort in the filter expression to 
> work your way. If you clone and modify, remember that you have to save and 
> refresh before the new macro will take effect. Also be sure to have a 
> backup of your TW file before you start.
>
> Good luck,
> Mark
>
> On Wednesday, February 22, 2017 at 10:42:58 AM UTC-8, Daniel Cunningham 
> wrote:
>>
>> Hi All -- new TW5 user here.  Really love the product so far.  
>>
>> I've run into a behavior that might be a bug, or (more likely) me just 
>> not understanding the syntax.  I'm trying to display a list of tiddlers by 
>> date created (not just modified).  And it seems to me that the negation 
>> operator in my subfilter is not acting upon my sort criteria.  
>>
>> I thought the code below would produce different ordered lists, but it 
>> does not.   
>>
>> !! List tiddlers by creation (not modification) date:
>>
>> !!! Show oldest on top, newest on bottom?
>>
>> <> subfilter:"sort[created]"
>> format:"ddd 0DD MMM ">>
>>
>> ---
>>
>> !!! Show newest on top, oldest on bottom?
>>
>> <> subfilter:"!sort[created]"
>> format:"ddd 0DD MMM ">>
>>
>>
>> This is with a freshly downloaded "empty" TW5 instance.
>>
>> My preference is to do this in "vanilla" TW5, because (1) I want to make 
>> sure I actually understand the syntax, and (2) I'm not sure which plug-in 
>> "pet" I want to adopt yet (I want to take them ALL home, but I know that's 
>> not wise).
>>
>> -- Daniel
>>
>

-- 
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/c64227d8-06fc-40aa-ad1f-cc2985767a28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: (TW5) Problem with operator on: subfilter:"sort[created]" ?

2017-02-22 Thread 'Mark S.' via TiddlyWiki
Per the documentation, timeline uses this filter:

[!is[system]$subfilter$has[modified]!sort[modified]limit[$limit$]eachday[
modified]]

This means that a sort on the modified field is applied after the subfilter 
and will take precedence over a sort order specified in the subfilter.

I guess I would consider cloning $:/core/macros/timeline perhaps creating a 
macro "timeline2" and then change the sort in the filter expression to work 
your way. If you clone and modify, remember that you have to save and 
refresh before the new macro will take effect. Also be sure to have a 
backup of your TW file before you start.

Good luck,
Mark

On Wednesday, February 22, 2017 at 10:42:58 AM UTC-8, Daniel Cunningham 
wrote:
>
> Hi All -- new TW5 user here.  Really love the product so far.  
>
> I've run into a behavior that might be a bug, or (more likely) me just not 
> understanding the syntax.  I'm trying to display a list of tiddlers by date 
> created (not just modified).  And it seems to me that the negation operator 
> in my subfilter is not acting upon my sort criteria.  
>
> I thought the code below would produce different ordered lists, but it 
> does not.   
>
> !! List tiddlers by creation (not modification) date:
>
> !!! Show oldest on top, newest on bottom?
>
> < subfilter:"sort[created]"
> format:"ddd 0DD MMM ">>
>
> ---
>
> !!! Show newest on top, oldest on bottom?
>
> < subfilter:"!sort[created]"
> format:"ddd 0DD MMM ">>
>
>
> This is with a freshly downloaded "empty" TW5 instance.
>
> My preference is to do this in "vanilla" TW5, because (1) I want to make 
> sure I actually understand the syntax, and (2) I'm not sure which plug-in 
> "pet" I want to adopt yet (I want to take them ALL home, but I know that's 
> not wise).
>
> -- Daniel
>

-- 
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/c846e192-b13e-43e3-97ba-e81fab1f20b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.