Hi Eric, many thanks for this update! Yes it works great! I also try use
<$action-listops $tiddler=<<newtag>> $field="list" $subfilter="[enlist<order>] -[<actionTiddler>] +[insertbefore:item<actionTiddler>]" /> and it works! but I see your solution is more consistent as it uses the same mechanism for putting before and after item! On Wednesday, February 26, 2020 at 1:12:26 AM UTC+3:30, Eric Shulman wrote: > > On Monday, February 24, 2020 at 11:04:02 AM UTC-8, Mohammad wrote: >> >> Further input: It seems append does not work with tiddler have space in >> their name and it needs to get the input using double brackets when there >> is a space in title. >> > > Instead of using: > <$action-listops $tiddler=<<newtag>> $field="list" > $subfilter="[enlist<order>] -[<actionTiddler>] +[append<actionTiddler> > putbefore<item>]" /> > TiddlyTools/TOC now uses: > <$action-listops $tiddler=<<newtag>> $field="list" > $subfilter="[enlist<order>] -[<actionTiddler>] [<actionTiddler>] > +[putbefore<item>]" /> > This avoids the use of the "append" filter (which expects a space > separated list) and instead, just explicitly appends the actionTiddler at > the end, then moves it into position > > Similarly, when using "shift drop" (drop after), it now does: > <$action-listops $tiddler=<<newtag>> $field="list" > $subfilter="[enlist<order>] -[<actionTiddler>] [<actionTiddler>] > +[putafter<item>]" /> > > Also, I added handling to "ctrl drop" (drop into) so it works like the > other handlers and builds the full "order" while removing any "list-before" > or "list-after" fields on the individual entries: > <$set name="order" filter="[<item>tagging[]]"> > <$list filter=<<order>>> <$action-deletefield > $field="list-before"/> <$action-deletefield $field="list-after"/> </$list> > <$action-listops $tiddler=<<actionTiddler>> $field="tags" > $subfilter="-[<oldtag>] [<item>]" /> > <$action-listops $tiddler=<<oldtag>> $field="list" > $subfilter="-[<actionTiddler>]" /> > <$action-listops $tiddler=<<item>> $field="list" > $subfilter="[enlist<order>] -[<actionTiddler>] [<actionTiddler>]" /> > </$set> > > I do not understand this, as drop as child means the target tiddler is a branch but it is closed, so one drop an action tiddler on it! If the branch is open, I expect the drop before OR drop after mechanism work. > With these code tweaks, TiddlyTools/TOC now handles drag-and-drop of > tiddlers with spaces in their titles. > > Thank for all your help testing the various edge cases for TiddlyTools/TOC. > > I really learn from it! and every aspects of it is a lesson in Tiddlywiki scripting! I like the toggle mechanism and the way it processes branches. > enjoy, > -e > > One more question: I confused with drag and drop when there are more than a tag! Example: * *root* ** *child1* *** gchild1 *** gchild2 ** *child2* ** *child3* they have a hierarchy and create a tree. Now assume *gchild2 *not only tagged with *child1 *but also tagged with foo and bar! Then I tried to drag and drop *gchild2 *over *child3 *(no modifier) I see *gchild2 *remains under *child1 *branch and also appears before *child3 *(gets the *root *tag as expected) Is there any limitation here, or I made a mistake? --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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d7836b10-8b6c-4ba7-94cf-a56fb12b0b77%40googlegroups.com.

