Query 101 -- $:/state, $:/temp, $:/config, $:/whatever/what-123456789

262 views
Skip to first unread message

@TiddlyTweeter

unread,
Jul 28, 2018, 11:45:00 AM7/28/18
to tiddl...@googlegroups.com
As I begin to tweak I get confused.

$:/state/etc., $:/temp/etc., $:/config/etc, $:/whatever/what-123456789

Do any of them mean something SPECIAL? For example ...

-- Does TW delete "$:/temp/etc." on close?

Or are these just USEFUL CONVENTIONS?

I think when you start to "tweak" its useful to know more about how to consistently make addressing for The Dark Side (everything beginning "$:/").

Any comments?

Mark S.

unread,
Jul 28, 2018, 2:06:37 PM7/28/18
to TiddlyWiki
I could be wrong, but I think only $:/temp actually does anything (gets deleted on TW close -- or maybe re-open). The rest are convention.

When I first started with TW5, I found the $:/ format confusing and off-putting. They look a lot like directory structures. They look a lot like variables. They're neither. Usually.

-- Mark

barro...@gmail.com

unread,
Jul 29, 2018, 1:58:33 PM7/29/18
to TiddlyWiki
hello,

From what I noticed, some of the temp tiddlers are saved and not deleted.  The 2 I know that remain are "Search" and "Advanced Search" which appear to hold last entered search term.  I don't know if they have any purpose other than holding the term bu I know if I save with a search term in the basic search bar and close the wiki without clearing the search bar, when the wiki is reopened it will load with the search term still in the search bar.

TonyM

unread,
Jul 29, 2018, 9:12:32 PM7/29/18
to TiddlyWiki
As mark said these are conventions but in some ways they flow logically, here is my view

Any $:/ is a "system tiddler which stays out of regular search results 

State tiddlers - setting some value during a particular operation such as selection. If done again are often rewritten, however they may hang around so the tiddler or wiki remains in that "state"
Temp tiddlers - Used at a moment in time, usually overwritten id they already exists, after the operation you don't care what happens to them
Config tiddlers - A place to store settings, maintained available to be used when needed

In the case of these hidden tiddlers sometimes we want unique ones, that relate to a single tiddler so we use the Qualify macro, it is wise to hide this from search by including a system prefix
<<qualify $:/temp/valuename>> perhaps to edit text of a temporary tiddler, or if it is a persistent setting for that tiddler <<qualify $:/config/valuename>>

Regards
Tony

@TiddlyTweeter

unread,
Jul 30, 2018, 4:12:24 AM7/30/18
to TiddlyWiki
barro... & Mark S.

Regarding ...

$:/temp/etc ...

FYI. As far as I can see they persist unless you explicitly delete them. I think that maybe it looks like they are auto-deleted because the particular routines involved in creating them are also deleting them? I'm still abit unclear ...

But, in a simple test: I (1) downloaded an empty TW; (2) added the tiddler ...

$:/temp/tt/test

It was still there after a reload.

Best wishes
Josiah

FrD

unread,
Jul 30, 2018, 4:16:55 AM7/30/18
to TiddlyWiki
Hi,

Take a look at   https://tiddlywiki.com/#SavingMechanism  . You'll see that the the saver mechanism uses the filter defined in $:/config/SaverFilter.
If you look at this tiddler you can see it excludes $:/temp tiddlers. You can modify it according to your needs.

Regards

FrD

@TiddlyTweeter

unread,
Jul 30, 2018, 4:40:32 AM7/30/18
to TiddlyWiki
FrD

Thanks. That is useful to know!

Best wishes
Josiah


FrD wrote:
Take a look at   https://tiddlywiki.com/#SavingMechanism  . You'll see that the the saver mechanism uses the filter defined in $:/config/SaverFilter.
If you look at this tiddler you can see it excludes $:/temp tiddlers. You can modify it according to your needs.

@TiddlyTweeter a écrit :

@TiddlyTweeter

unread,
Jul 30, 2018, 5:24:16 AM7/30/18
to TiddlyWiki
Thanks TonyM

I think this kind of general overview is useful. I emphasised your headings to make the main ones clearer.

After prodding around I'd now add ... Info tiddlers ... to the "Conventions". These REGISTER the DISCOVERED STATE of the RUN environment. Discernable from ...

$:/temp/info-plugin

... or shadows, in an "empty" TW ...

$:/info/etc...

Best
Josiah

@TiddlyTweeter

unread,
Jul 30, 2018, 8:45:03 AM7/30/18
to TiddlyWiki
FrD,

Playing with this. I does NOT seem to work in the latest TW??

BEFORE  I report it as a bug could someone else please check I have my brain correct?

FrD

unread,
Jul 30, 2018, 9:24:24 AM7/30/18
to TiddlyWiki
Hi,

Sorry I made a mistake. This filter is only for specifying the tiddlers triggering the dirty state. I'll investigate.

Regards

FrD

FrD

unread,
Jul 30, 2018, 9:33:03 AM7/30/18
to TiddlyWiki
Hi,

If you read untill the end (SavingMechanism) you'll see you have to assign a template to the tm-save-wiki message.

You assign the new template's name to the  SaveWikiButtonTemplate Template

As for the template, have a look at the code of $:/core/save/all to built a new one.

Regards

FrD

Le lundi 30 juillet 2018 14:45:03 UTC+2, @TiddlyTweeter a écrit :

@TiddlyTweeter

unread,
Jul 30, 2018, 9:33:58 AM7/30/18
to TiddlyWiki
Thanks FrD

I do think its useful to know a bit more about these things.

I find it interesting,  to get it a bit more out of the obscure.

Any tips, very welcome.

Best wishes
Josiah

@TiddlyTweeter

unread,
Jul 30, 2018, 9:50:49 AM7/30/18
to TiddlyWiki
Thanks FrD

Very quickly helpful.

My upshot is fiddling with $:/core/save/all is a non-starter :-) Way too complex for me.

What it looks like is as I thought. That "$:/temp/" persist like any other Tiddler between reloads. There is no normal auto-deletion of "$:/temp/etc..." tiddlers.

Best wishes
Josiah

FrD

unread,
Jul 30, 2018, 12:13:32 PM7/30/18
to TiddlyWiki
Hi,

Well the code in $:/core/save/all is very short :



\define saveTiddlerFilter()
[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
\end
{{$:/
core/templates/tiddlywiki5.html}}



Regards

FrD

barro...@gmail.com

unread,
Jul 30, 2018, 4:26:18 PM7/30/18
to TiddlyWiki
What is the bug?  You didn't mention what was wrong with your filter- is it not working at all or not giving the results you want?  I tried it and got a hefty list of lots of different things (see screenshot)
Clipboard05.jpg

@TiddlyTweeter

unread,
Jul 30, 2018, 4:37:40 PM7/30/18
to TiddlyWiki
There isn't one. It was a miss-match between previous posts. I thought there should be one because of what someone else posted because it didn't work as suggested it should. Later it turned out not to be working that way anyway.

There is no bug. "$:/temp" can be created and it is not deleted on save as actually nothing stops that.

J.

barro...@gmail.com

unread,
Jul 30, 2018, 8:26:33 PM7/30/18
to TiddlyWiki
Understood, no problem : )   I like your definition for Temp files.  Another thing I noticed in Temp was saved selected entries for the vertical tabbed ToC's which was something I was investigating cause I have several of those ToC's and the saved selection from one will carry over to the next, giving improper display for it.

Mark S.

unread,
Jul 30, 2018, 8:41:21 PM7/30/18
to TiddlyWiki


There is no bug. "$:/temp" can be created and it is not deleted on save as actually nothing stops that.



I'm not sure what you're saying. My test of $:/temp... under tiddly server seems to suggest that $:/temp files get deleted.

-- Mark 

@TiddlyTweeter

unread,
Jul 30, 2018, 9:22:07 PM7/30/18
to TiddlyWiki
Ciao Mark. Interesting. On singular TW I didn't see that.

@TiddlyTweeter

unread,
Aug 1, 2018, 1:23:51 PM8/1/18
to TiddlyWiki
Ciao Mark S.

I been playing with this. Create Tiddler: $:/temp/mark-test ...

... on Single File TW in normal browser & in TiddlyDesktop PERSISTS between sessions.

Under node & Bob exactly the same gets deleted inter-session.

I made an issue on GitHub here: https://github.com/Jermolene/TiddlyWiki5/issues/3375

J.

@TiddlyTweeter

unread,
Aug 3, 2018, 7:38:08 AM8/3/18
to TiddlyWiki
Anyone interested in the difference on "$:/temp" deletion between single file TW and the server version could be helped by this GitHub comment by PMario ... https://github.com/Jermolene/TiddlyWiki5/issues/3375#issuecomment-410214455.

What came out for me in this whole discussion was NOT there is a problem. Rather that there are DIFFERENCES between the server version of TW and the single file that are not well documented. The issue is KNOWING them.

The fact Mark S. & TonyM were as much in a haze as me about this is a signal. If it was just me I'd think it was just my usual idiocy. But it isn't.

FrD actually pointed to a solution in the thread but I did not quite then understand it. PMario clarified the issue.

Anyway
Josiah.

@TiddlyTweeter wrote:
I been playing with this. Create Tiddler: $:/temp/mark-test ...

... on Single File TW in normal browser & in TiddlyDesktop PERSISTS between sessions.

Under node & Bob exactly the same gets deleted inter-session.

I made an issue on GitHub here: https://github.com/Jermolene/TiddlyWiki5/issues/3375

Reply all
Reply to author
Forward
0 new messages