Is it possible to change how TW numbers new tiddlers?

hmm. I’m pretty sure new-lines in tiddler titles will cause problems.

I haven’t tested it for very long, but now that you mention it I imagine your likely right.

I was under the impression that the title field was removing the new line when inserting the count, however looking at it, that probably is not the case.

Also, I completely missed that! sorry about that, I wasn’t expecting that behavior.

:slight_smile: That’s why the docs at: https://tiddlywiki.com/#ActionCreateTiddlerWidget have this comment at the button

I think it does remove the backslash \ … But even if it does, it should not be there. … Who knows.

Well for the moment seems safe to use for just messing about, but ultimately bad practice in the long run.

Relying on unintended behaviors isn’t something I should get into the habit of doing, so back to the drawing board I go.

Would there be another method of setting the baseName to empty without causing an error?

Actually, nevermind- I’m not sure where my mind is at, but just setting the baseName to anything is fine, because as long as the template does not call it, and only calls the count, it sets it as a number

hmm … a space as a base name is only safe if you use trim[] with it. Like so.

\define testCreate()
<$action-createtiddler $basetitle={{{ [<unusedtitle baseName:" " separator:"" template:"$basename$$separator$$count:1$">trim[]] }}} />
\end

<$button actions=<<testCreate>> >
Create Tiddler
</$button>

You are right. The following code should be good to go. IMO that’s best practice with that functionality.

\define testCreate()
<$action-createtiddler $basetitle=<<unusedtitle baseName:"something" separator:"" template:"$count:1$">> />
\end

<$button actions=<<testCreate>> >
Create Tiddler
</$button>
1 Like
  • I think its wrong for the documentation to claim the example above does this!
  • when <$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/> is needed.
  • Perhaps if the text started “For your convenience …” but it would be best a second button.