Mohammad, >From previous experience, given the title of a tiddler is its key, and when editing anything about a tiddler especially its title it is handled with a draft.of tiddler and draft.of title until commiting changes. I would recommend simply cloning the old tiddler to the newly named tiddler using an appropriate new tiddler action which will add an increment if the result already exists, and you can freely delete the original tiddler. You can even take steps to preserve the created date if you must.
Regards Tony On Monday, 18 February 2019 09:37:34 UTC+11, Mohammad wrote: > > The below code is developed to remove n characters from the beginning of a > tiddler title. > > Test only on https://tiddlywiki.com/prerelease/ > > > *Title: macro/remchars* > *Tag: $:/tags/Macro* > \define remove-from-begining-tiltle-bulk(myfilter, n:"0") > <$list filter="[<__n__>] -0" variable=null> > <$list filter=<<__myfilter__>> variable="item"> > <$list filter="""[<item>split[]rest[$n$]join[]]""" variable="newTitle"> > <$list filter="[<newTitle>] -[has[title]] -[[]]" variable="ignore"> > <$action-setfield $tiddler=<<item>> title=<<newTitle>> /> > <$action-deletetiddler $tiddler=<<item>> /> > </$list> > </$list> > </$list> > </$list> > \end > > > Assume you have three tiddlers like below, both tagged with xx > > a1 > b1 > cd > > > Then call the macro as below > > Test > <$button> Do it > <<remove-from-begining-tiltle-bulk myfilter:"[tag[xx]]" n:1>> > </$button> > > > > The above code should detect that removing first char will overwrite a1, > b1 and so as four list widget in the code (line 5) > is responsible to prevent this!! seems it *FAILS *to do the job! > It overwrites a1 and b1 and produces tiddler 1. > > What is going wrong here? > > > --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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7fcae81b-42cf-48ee-ade3-10765282f865%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

