Hi Tobias I have included one possibility for a syntax to add/remove multiple strings/tags in my $x-setrefs widget. Any uniquely named attribute with the prefix '++' adds a string, and any uniquely named attribute with the prefix '--' removes a string.
For example, to add a few tags (the default list) to the currentTiddler (the default), and remove one also -- use syntax like this: <$x-setrefs ++1="first tag" ++2="second tag" ++3="third tag" --1="remove this tag"/> Seems to be a convenient schema for most situations (these are unconditional - not true search/replace.) I like this schema as it is reminiscent of the '!!' for fields and the '##' for data entires. Multiple fields/data entries can be set in the same widget, like this: <$x-setrefs !!field1="some value" !!field2="another value" another-tiddler##="add this data index" ++1="a tag to add" --1="a tag to remove"/> This may be tried out here <http://production.gwiz-beta.divshot.io/>. What do you think? regards On Monday, 12 October 2015 08:32:06 UTC+2, Tobias Beer wrote: > > Hi Metabele / Jed, > > >> I had a look at your contribution -- I think a special purpose widget for >> the manipulation of lists would be preferable to extending the >> $action-setfield widget. There is clearly a need for multiple lists with >> functionality akin to that of the 'tags' field -- but how to best implement >> this is unclear to me. >> > > As you have seen, I'm all for extending the action-setwidget as the > codebase is basically the same and then some... so big chunks will need > duplication. Except, I have not studied yet as to how one widget can use > another as a base class... then that might be an option, albeit all the > more complex. > > There are many different possibilities for order in a list -- my proposal >> is to use filter expressions to order the list >> > > That sounds like an interesting idea, especially for persist-sorting. > > -- how many other possibilities for order are desirable? >> > > Whatever core filters are available. > > >> -- can the existing filters be modified/extended to achieve this? >> > > What needs extending? Afaics, you simply work the filter on your list > items and that's it. > > -- are multiple instances of the same string necessary in a list >> (currently only one is permitted)? >> > > I would perhaps not start with that for now. > Maybe later if someone truly needs a *basket: coffee coffee coffee* field. > > -- if so -- what for? >> > > It could be a sequence of sorts, e.g. some log of what happened or some > instructions of what to do, like moves, e.g. *UP UP RIGHT UP LEFT UP*. > > -- would users prefer the widget to allow for the addition/removal of >> multiple tags (like my $x-setrefs widget)? >> > > With a simple syntax to do that, sure. > Perhaps it can be designed to begin with having more of a VarsWidget than > a SetWidget approach in mind. > > For example, if it had a *$remove* attribute this could, by default be > interpreted as a bracketedList, so you can tell it to remove a number of > items, same with *$add*. Actually, perhaps it could even be filter > strings as well, e.g: *$remove="[prefix[#]]"*. I think that's the most > flexible... and clean, e.g. "remove any status tags". > > I became bogged down with possibilities and needed some feedback. > > > :-) > > Best wishes, > > — tb > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/48c3c754-1439-4d96-90f7-2a2b906e0c0f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

