Setting to define additional system prefix?

210 views
Skip to first unread message

amreus

unread,
Jan 29, 2021, 5:51:57 PM1/29/21
to TiddlyWiki

Can we define an alternative or additional string that is treated similar to a "system" prefix?

For example, I'd like to start tiddler titles with a '/' and have them hidden by default and from lists and search like a system tiddler, but also keep them separate from the official system hierarchy.  Also, the "[is[system]]" filter would not see titles with this prefix.

I know this is possible, but it would require modifying a number of system tiddlers.  A setting to define such a prefix would be cool.


PMario

unread,
Jan 29, 2021, 11:25:58 PM1/29/21
to TiddlyWiki
hmm,
The problem would be, that you can't see and open a tiddler that, if it would be invisible for every internal filter.
How do you want to edit them? .. What if you saved a tiddler with a typo in the title. It would be impossible to find it again.

Could you describe your usecase a little bit closer? 

-mario

amreus

unread,
Jan 30, 2021, 4:49:50 AM1/30/21
to TiddlyWiki
I guess mainly I'd like to define a character sequence that, when used as a title prefix, is excluded from the default sidebar search results. The rest I can do with filters.

TW Tones

unread,
Jan 30, 2021, 7:17:56 AM1/30/21
to TiddlyWiki
One way is to modify the  what is excluded from the default sidebar search results  
Just add an additional filter like !prefix[#:/]


Tones

Jeremy Ruston

unread,
Feb 1, 2021, 5:14:26 AM2/1/21
to TiddlyWiki Group
I think it would be feasible to have some kind of hidden setting for customising the criteria of what constitutes a system tiddler, and it could be pretty useful in some situations. For example, the $:/ sequence is awkward to type, kind of intentionally as it’s supposed to act like a big, obvious label. But one could imagine that if one were working with lots of custom transclusion templates that it would be convenient to add, say, a dash as an alternative system tiddler prefix. Then one could write things like {{$:/core/images/down-arrow||-big}} instead of {{$:/core/images/down-arrow||$:/big}}

There is a single point in the JS code where we perform the system tiddler check:

exports.isSystemTiddler = function(title) {
return title && title.indexOf("$:/") === 0;
};


Best wishes

Jeremy.


--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/16123d35-5ce3-49d8-9063-4ea93fc5bccan%40googlegroups.com.

amreus

unread,
Feb 1, 2021, 10:21:21 AM2/1/21
to TiddlyWiki
Thanks Jeremy, that's perfect.

Joshua Fontany

unread,
Feb 1, 2021, 4:02:11 PM2/1/21
to TiddlyWiki
I like the idea of customizing the System prefixes... The Story "Tiddler ViewTemplate" also has some logic in the UI to recolor the `$:/` section of tiddler Titles. That may need to be changed as well, if you want the same 2-tone title for all system tiddlers.

Best,
Joshua F

TW Tones

unread,
Feb 2, 2021, 8:52:38 PM2/2/21
to TiddlyWiki
Jeremy,

Can you document how we make use of this information to add additional "system tiddler" prefixes?

I have wanted to do this for some time and could use the "(" prefix, to name template tiddlers eg; (print-view) (table-row) 

Regards
Tones

TW Tones

unread,
Feb 2, 2021, 8:59:13 PM2/2/21
to TiddlyWiki
Jeremy,

I meant to say please if possible!

Thanks
Tones

Jeremy Ruston

unread,
Feb 3, 2021, 12:19:04 PM2/3/21
to tiddl...@googlegroups.com
Hi Tones


Can you document how we make use of this information to add additional "system tiddler" prefixes?

It isn't yet possible to add additional system tiddler prefixes, we're just discussing whether it's worth introducing it as a feature.

I have wanted to do this for some time and could use the "(" prefix, to name template tiddlers eg; (print-view) (table-row) 

Yes, I can imagine that might be a popular prefix if the feature were added.

Best wishes

Jeremy.


Regards
Tones

On Monday, 1 February 2021 at 21:14:26 UTC+11 jeremy...@gmail.com wrote:
I think it would be feasible to have some kind of hidden setting for customising the criteria of what constitutes a system tiddler, and it could be pretty useful in some situations. For example, the $:/ sequence is awkward to type, kind of intentionally as it’s supposed to act like a big, obvious label. But one could imagine that if one were working with lots of custom transclusion templates that it would be convenient to add, say, a dash as an alternative system tiddler prefix. Then one could write things like {{$:/core/images/down-arrow||-big}} instead of {{$:/core/images/down-arrow||$:/big}}

There is a single point in the JS code where we perform the system tiddler check:

exports.isSystemTiddler = function(title) {
return title && title.indexOf("$:/") === 0;
};


Best wishes

Jeremy.


On 29 Jan 2021, at 22:51, amreus <harl...@gmail.com> wrote:


Can we define an alternative or additional string that is treated similar to a "system" prefix?

For example, I'd like to start tiddler titles with a '/' and have them hidden by default and from lists and search like a system tiddler, but also keep them separate from the official system hierarchy.  Also, the "[is[system]]" filter would not see titles with this prefix.

I know this is possible, but it would require modifying a number of system tiddlers.  A setting to define such a prefix would be cool.



--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/16123d35-5ce3-49d8-9063-4ea93fc5bccan%40googlegroups.com.

--
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 tiddlywiki+...@googlegroups.com.

amreus

unread,
Feb 4, 2021, 3:44:16 PM2/4/21
to TiddlyWiki
> It isn't yet possible to add additional system tiddler prefixes, we're just discussing whether it's worth introducing it as a feature.

Hi Jeremy,

I have to admit my use case comes from being disorganized and lazy more than some grand design.  :shrug:

Because TW make it easy to create views, I tend to work in perpetual experimentation mode.  I'm always trying variations of tiddlers to see what works best instead of planning out in any sort of detail what I want the result to be.  Part of this is simply due to the way my brain works.  I need to get thoughts recorded as quickly as possible or many times those thoughts are lost.  Once an idea is recorded I can review and organize (or not) at a later time.  TW is great for that. I always have a wiki open in a browser tab to take notes which is accessible with just a couple key-strokes.

So what I end up doing, as you guessed, is using the / character as a shortcut for the prefix $:/plugins/amreus/...  since typing $:/ is less efficient. I started using the / character as a temporary prefix to mean "system tiddler" with the intention of renaming them later.  Fact is no one but myself is probably ever going to see my personal wiki so the renaming doesn't get done often, or ever.

My other use case is my templates as you also guessed.   In my Project/Task wiki I have entities such as Projects, Tasks, Items, Supplies, Vendors, Contacts, and a couple more.  I set up a bunch of templates using the title prefix "/template"  For example, when viewing a Project tiddler, there is a /view-template/project.  And when a Project is viewed in a list, the $list widget uses the template attribute set to "/template/project".   Currently I have a couple dozen templates. At this point, it's going to be easier to change the meaning of "isSystemTiddler" than it is going to be to properly rename my tiddlers.

To facilitate my bad workflow, I changed the "isSystemTiddler" function to the following:

return title && /^(\$:\/|\/)/.test(title)

Which says a system tiddler is one that begins with $:/ or /

coda coder

unread,
Feb 4, 2021, 3:53:48 PM2/4/21
to TiddlyWiki
> I tend to work in perpetual experimentation mode

Guilty grin.

TW = Infinite Tinkerability
Reply all
Reply to author
Forward
0 new messages