[tw5] Re: Multiple sort order in Tiddlywiki

2020-03-16 Thread Chris Fischer
Hi Tony, I'm try to apply this solution in a fashion using a template. Let's suppose I have two tags called "Topic1" and "Topic2". I have a bunch of tiddlers tagged with one or both of these tags. On the Topic1 tiddler, I want to make a list of all the tiddlers tagged Topic1 sorted by two

[tw5] Re: Multiple sort order in Tiddlywiki

2019-12-11 Thread Mohammad
Good solution! Thanks Tony! On Thursday, December 12, 2019 at 5:04:57 AM UTC+3:30, TonyM wrote: > > Mohammad, > > Sorry for the delay in a response. > > I used all tiddlers to include only the subset of what would be most > likely in a query of state and region tiddlers. This acts to limit the

[tw5] Re: Multiple sort order in Tiddlywiki

2019-12-11 Thread TonyM
Mohammad, Sorry for the delay in a response. I used all tiddlers to include only the subset of what would be most likely in a query of state and region tiddlers. This acts to limit the default. I have no objection to your suggestion, however since this part of the filter needs to be the same

[tw5] Re: Multiple sort order in Tiddlywiki

2019-12-08 Thread Mohammad
On Saturday, December 7, 2019 at 8:42:44 AM UTC+3:30, TonyM wrote: > > I do not mean to sound competitive, but all you need is .nested lists > > <$list fiter="[all[tiddlers]each[state]get[state]sort[]]" variable=state> ><$list fiter="[all[tiddlers]stateeach[region]get[region]sort[]]" >

[tw5] Re: Multiple sort order in Tiddlywiki

2019-12-08 Thread Mohammad
Tony! Your solution seems smart one! I have corrected a bit the code and have attached a working example! I will add it to TW-Scripts. To test the demo, open tiddlywiki.com and drop the attached bundle into it! Cheers Mohammad -- You received this message because you are subscribed to the

[tw5] Re: Multiple sort order in Tiddlywiki

2019-12-07 Thread Mohammad
Thanks Mark! It works but its tricky. --Mohammad -- 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

[tw5] Re: Multiple sort order in Tiddlywiki

2019-12-07 Thread 'Mark S.' via TiddlyWiki
You'd have to implement the sorting algorithm by hand, right? You wouldn't be able to use the underlying JS engine. I imagine that that would be a lot slower. Writing in interpreted script vs. executable code. But, computers are getting faster these days. Not mine, mind you. But some

[tw5] Re: Multiple sort order in Tiddlywiki

2019-12-07 Thread 'Mark S.' via TiddlyWiki
Yes. There are multiple ways of doing this. When I first started, I wanted to have only one filter. Unfortunately, that wasn't possible. I ended up with more list widgets than a simple nested list approach. BUT, you can now add more levels of sorting without adding any more lists. So if you had

[tw5] Re: Multiple sort order in Tiddlywiki

2019-12-07 Thread TonyM
Jed, Good of you to think about this. Perhaps rather than take the path you are thinking what about looking at intermediate sorts or finding a way to do do nested filters. I am thinking of my nested list algorithium above which needs only the input and state and region to be provided.

[tw5] Re: Multiple sort order in Tiddlywiki

2019-12-07 Thread Jed Carty
I have been thinking about making an explicitly stable sort operator for tiddlywiki so this is easier. In general unstable sorts can be much faster than stable sorts so by default some (or most?) browsers use unstable sorting algorithms like quicksort. A stable sort keeps elements that have

[tw5] Re: Multiple sort order in Tiddlywiki

2019-12-06 Thread TonyM
I do not mean to sound competitive, but all you need is .nested lists <$list fiter="[all[tiddlers]each[state]get[state]sort[]]" variable=state> <$list fiter="[all[tiddlers]stateeach[region]get[region]sort[]]" variable=region> <$list fiter="[all[tiddlers]stateregionsort[]]">

[tw5] Re: Multiple sort order in Tiddlywiki

2019-12-06 Thread 'Mark S.' via TiddlyWiki
There are different approaches. The easiest would be to make a button that, when pressed, populates a fourth field that can then be sorted. Here's an approach that doesn't require two steps, but it does assume that "@@" is reserved: \define sortus() <$vars lb="[[" rb="]]"> <$list