[tw5] Re: Seeking way to *enlist* but with duplicate preservation

2019-04-26 Thread David Nebauer
I've been looking further into this feature. The alteration to $tw.utils. parseStringArray to enable it to return a list *with* duplicate items was a contribution from inmysocks, aka Jed Carty, in October 2018 (see TW github pull request 2027 ).

[tw5] Re: Seeking way to *enlist* but with duplicate preservation

2019-04-25 Thread David Nebauer
I should add that my real-world project handles duplicate values flawlessly now that it uses enliatallowduplicates instead of enlist. I hope this topic is of assistance to others who have, or will have, the same need as I did. Regards, David. On Friday, 26 April 2019 15:24:05 UTC+9:30, David N

[tw5] Re: Seeking way to *enlist* but with duplicate preservation

2019-04-25 Thread David Nebauer
Solved. In fact, the solution was so simple I'm worried it's a trap! I have created a new filter operator -- enlistallowduplicates -- which differs from enlist by a single parameter. Here is the non-comment part of enlist.js: (function(){ /*jslint node: true, browser: true */ /*global $tw: fal

[tw5] Re: Seeking way to *enlist* but with duplicate preservation

2019-04-25 Thread TonyM
David, An aside, When it comes to numbers or a list of numbers it is safe to use space to delimit them because numbers do not typically contain spaces like tiddler titles may, EXCEPT IN YOUR EXAMPLE WHERE NUMBERS ARE EXPRESSED IN WORDS. What I was think was to use a method such as split[ ] to

[tw5] Re: Seeking way to *enlist* but with duplicate preservation

2019-04-25 Thread TonyM
Mark Split in 5.1.20 prerelease is like that exactly with space. Tony -- 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

[tw5] Re: Seeking way to *enlist* but with duplicate preservation

2019-04-25 Thread 'Mark S.' via TiddlyWiki
Gosh, no wonder I always have this sense of Deja vu. It turns out that I wrote an "enlist2" filter in 2017 that can split on spaces without duplication. Unfortunately, this means your tiddler titles can't have spaces. I can imagine an enhanced version that could split on [[ ]] as well. https:/

[tw5] Re: Seeking way to *enlist* but with duplicate preservation

2019-04-25 Thread David Nebauer
Thanks, Tony. With your suggestion about incrementing a data tiddler, did you mean something like this for a 3-column table? 1: Row 1 Col 1 value 2: Row 1 Col 2 value 3: Row 1 Col 3 value 4: Row 2 Col 1 value 5: Row 2 Col 2 value 6: Row 2 Col 3 value 7: Row 3 Col 1 value 8: Row 3 Col 2 value 9: R

[tw5] Re: Seeking way to *enlist* but with duplicate preservation

2019-04-25 Thread David Nebauer
Mark S., I'll keep that as a backup strategy. I'm still hoping I'll stumble across a more elegant, less fiddly solution. Regards, David. On Thursday, 25 April 2019 00:27:50 UTC+9:30, Mark S. wrote: > > You'll hate this idea, but you could put a uniqueness enforcer in front of > each row item (e

[tw5] Re: Seeking way to *enlist* but with duplicate preservation

2019-04-24 Thread TonyM
Fyi This has being discussed in other threads, I have added more to the maths github issue. This treatment of titles makes sense when handling sets of titles and deduplication is built into most operators this is where the challenge lays. I think we need Jeremy Mario or other gurus to resolve t

[tw5] Re: Seeking way to *enlist* but with duplicate preservation

2019-04-24 Thread 'Mark S.' via TiddlyWiki
You'll hate this idea, but you could put a uniqueness enforcer in front of each row item (e.g. A_MyTiddler B_MyTiddler) then, after whatever processing you do, split off the uniqueness bit using the splitbefore and removeprefix operators. What's really needed is a uniquess filter, like "pragma[