Mal,
That is correct, my mistake!
Thank you
Mohammad
On Saturday, February 23, 2019 at 2:33:20 PM UTC+3:30, Mal wrote:
>
> Mohammad,
>
> Yes, that's nice - I see a bit of recursion going on here! It keeps
> iterating until it finds a title that doesn't exist. It might be a bit
> less effici
Mohammad,
Yes, that's nice - I see a bit of recursion going on here! It keeps
iterating until it finds a title that doesn't exist. It might be a bit
less efficient, but should not have to loop too many times if the total
number of tiddlers is small.
By the way, I don't think you need the "co
Mal,
Give a try to below code
\define newTitle() myTiddler-{{{[[0]count[]add[$(inc)$]addprefix[]split
[]last[3]join[]]}}}
\define newTiddler(n:0)
<$set name="inc" value={{{ [<__n__>add[1]] }}}>
<$wikify name="myTitle" text="<>" >
<$list filter="[] +[!has[title]]"
emptyMessage=""" <$macro
Thank you Mal,
This is much better than Tid-1, Tid2,...
Added to TW-Scripts.
-Mohammad
On Saturday, February 23, 2019 at 6:54:50 AM UTC+3:30, Mal wrote:
>
> Hi Mohammad,
>
> An alternative approach - requires all numbers to be zero padded to fixed
> number of digits. Assuming 3 digits:
>
> \de
Hi Mohammad,
An alternative approach - requires all numbers to be zero padded to fixed
number of digits. Assuming 3 digits:
\define newTitle() myTiddler-{{{[tag[myTag]removeprefix[myTiddler-]sort[]
last[1]add[1]addprefix[]split[]last[3]join[]]}}}
\define newTiddler()
<$wikify name="myTitle"
The post edited. See the original.
*https://groups.google.com/d/msg/tiddlywiki/3_Xacb7H1p0/edeQZe86AQAJ*
This is for who receives posts by email.
Mohammad
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop
Thomas,
I checked the code, if you delete tid-2, it will try to create tid-3, but
as there is a tid-3, it creates tid-3 1
SO there is no risk of overwriting.
I can add extra code to check the existence and and if it exist it
increment the number to find the next empty number!
This way you can e
Hi Tony,
This can be used for logging process. Also you can control the title you
create like Tid-001 Tid-003 and like that.
--Mohammad
On Friday, February 22, 2019 at 2:18:31 PM UTC+3:30, TonyM wrote:
>
> Mohammed,
>
> It is good to see what we will be able to do with the new opperators but
>
Hello Thomas, that is quite right and the code needs to check if the
tiddler is existed or not!
By the way, for processing in batch mode, when there is no risk of deletion
this may be useful.
I will revise the code and send a new version.
--Mohammad
On Friday, February 22, 2019 at 1:46:35 PM U
Hi Mohammad
I see a risk here in the count part:
Say you have made tid-1, tid-2 and tid-3. Then you delete tid-2. The next
generated number will be 3 and collide with existing tid-3.
Just a thought.
Cheers,
Thomas
--
You received this message because you are subscribed to the Google Group
The post edited and the issue removed. For who receive this through email.
See the original link:
https://groups.google.com/d/msg/tiddlywiki/3_Xacb7H1p0/BN73J04iAQAJ
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group a
11 matches
Mail list logo