You may be aware that camel case and words wrapped in [[myword]] result in active tiddler links, and they also allow missing tiddlers. When the title contains a space such as [[my words]] we need to retain the [[ ]] so the title is delimited.
Mosty of tiddlywikis tools support this for example “list-links-draggable Macro”
However if it is a simple word, myword it remains as not a link, if we force it to be a link with [[myword]] it will be a link where this is coded.
However with many tiddlywiki tools such as list-links-draggable it (a single word title, will loose its square brackets when it is reordered.
I wonder if there is a way to ensure the square brackets remain even on single words?
Why? because if I have a list in a text field, I want it to appear as a link, just because I reorder it I do not want to loose its “link quality”, and become plain text.
If you have a closer look at the “Days of the Week” tiddler, you’ll see, that none of the elements in the list-field have brackets. They are still shown as links, because the list-links macro is used to show them.
So imo it does not matter, if there are brackets or not. It depends on the template, that is used to show the content.
This is true inside lists and filters where you are handling titles, or templates from the view templates or cascades for one or multiple words. If however you want single words to be recognised as links in wiki text this is not true, unless you wrap them [[word]]. This is a well known manual approach valid in Wikitext, but not apparently handled in widgets and macros.
As stated previously, this also works for missing tiddlers. That is a missing tiddler for [[word]] comes into existence but not for word, even a template to ensure it looks like a link, will not make it a missing tiddler title.
However since tools like list-links draggable don’t allow the braces to be retained we are yet again getting an opinionated result, with no option to escape it.
You will find format:titlelist also removes the braces around [[word]]. But similtaniously If the titles already have [[two words]] it will wrap them again and give [[[[two words]]]]
Unless someone can show me another way to get any title, single word, camelCase and with spaces to be recognizes as a missing tiddler, then I am backed into another non-working approach, because of another subtle limitation.
With respect I am highlighting limitations I want to fix.
I have the imagination to know how to fix them, but apparently can’t persuade any one the need to fix or help them understand how to fix them.
Without detailing the reason, I can assure you if I can overcome these I have a very interesting set of code patterns that become possible, given virtual tiddlers and a body of work I and @Springer are developing over time.
With respect I need solutions to the issues I raise, not dismissals, no offence intended. I respectful suggest whilst, I can make mistakes, these requests are based on a deep understanding of tiddlywiki and attempt to innovate.
IMO a generic way to resolve the problem would be, to have a linkedtitles (or something similar) format-suffix, that checks for brackets and adds them to every title if needed.
This should be straight forward to implement and it can be used everywhere, where filter output is formatted. So it should be possible to create new macros that outptut links instead of title lists.
WARNING: The code attached here is not production ready.
For a real PR we probably need to add “options” to the $tw.utils.stringifyList([title]) core API function to give us the result we want, instead of “hacking” the results as done with the POC code linked here.
I’m not yet finding places where lists don’t work as expected (though I believe you, @TW_Tones, that you’re encountering such places). Maybe that’s because of my particular ways of using list fields?
However, I do notice that dragging a tiddler title link from the sidebar into a draft tiddler (in edit mode) does not serve to make a [[link]] to that tiddler when that tiddler has a single-word title (without CamelCase and without system prefix).
This does strike me as a simple failure in the way draggable links should work.
I wondered about this from the first time I saw the way these single-word tiddlers were handled in lists, but I couldn’t think of any place that it could cause problems. As soon as Tony said it, though, it hit home.
For an example, download this and drag it to any wiki
Note that Prince and Yes have the double square brackets around them, and hence act as links.
Now visit Tiddler B, and you’ll see the same data included by the <<list-links-draggable>> macro. Drag these up and down to rearrange the list. Now look back at Tiddler A. Prince and Yes are no longer links. I’m pretty sure this is the problem Tony is describing.
1I don’t know if says something good about my memory that I remember all but six of the top 100 hits from the year I graduated high school or if it says something terrible about what I’ve filled my memory with!