sort:version:reverse?

57 views
Skip to first unread message

Cade Roux

unread,
Apr 16, 2024, 12:29:33 PMApr 16
to TiddlyWiki
I have change logs with a field for version information, and I am trying to sort them in reverse order and it doesn't appear to be working.  The change log tiddlers themselves are also lists, but I cleared all that out and loaded these into the latest TW version to make a minimal reproducible case.  If I take out the sort entirely, the 10.0 comes to the top as you would expect for them to be sorted by title.  But the sort either with or without :reverse is the same.
Screenshot 2024-04-16 112417.png
<ul><$list filter="[ascend.change[index]] :sort:version:reverse[get[ascend.version]]"><li><$link to={{!!title}} /><br/><$transclude/></li></$list></ul>

Screenshot 2024-04-16 112528.png
What am I doing wrong?

springer

unread,
Apr 16, 2024, 6:59:58 PMApr 16
to TiddlyWiki
Hello Cade! As you might note with other posts at google groups, the community for this discussion has migrated to talk.tiddlywiki.org.

Although we (at that forum) can still *see* posts from the google group, we can't reply easily to them. 

So please come on over to google groups.

Meanwhile, I can suggest that the documentation on the reverse Operator shows that it doesn't take a parameter, nor does it work as a parameter within the sort filter run prefix; instead it works at the "caboose" end of any filter to flip the list order. Something like this works at Tiddlywiki.com:

`{{{ [has[version]] :sort:version[get[version]] +[reverse[]] }}}`

springer

unread,
Apr 16, 2024, 7:01:18 PMApr 16
to TiddlyWiki
Of course, I meant "come on over *from* google groups, and join us at talk.tiddlywiki.org"

Cade Roux

unread,
Apr 16, 2024, 7:31:00 PMApr 16
to TiddlyWiki
I see, I can use that separate reverse operator instead of doing it in the initial sort.

I'm still not sure how to use the reverse documented here in the flaglist in the :sort filter run prefix:


Screenshot 2024-04-16 182937.png

I'll post any future questions in the other forums.

Thanks,

Cade

springer

unread,
Apr 16, 2024, 7:39:12 PMApr 16
to TiddlyWiki
Interesting! The documentation DOES imply that you can tuck :reverse into the very place where you had it!

Perhaps this is just an error in documentation? In fact it works fine if it comes *before* the sort-type parameter:

`{{{ [has[version]] :sort:reverse:version[get[version]] }}}`

PMario

unread,
Apr 17, 2024, 2:33:00 AMApr 17
to TiddlyWiki
I'm not 100% sure yet, but there seems to be a bug. I'll have a closer look.
A fast look to the code suggests, that the documentation is right.
But I can confirm, that it does not work as intended with my test tiddlers.
-m

PMario

unread,
Apr 17, 2024, 2:55:36 AMApr 17
to TiddlyWiki
Reply all
Reply to author
Forward
0 new messages