Eric, Nice answer. However did you mean $:/config/SaverFilter? for detecting dirty?
The fact that the dirty indicator is different from what gets saved is a useful fact and possible trick. Regards Tony On Thursday, January 9, 2020 at 3:30:58 PM UTC+11, Eric Shulman wrote: > > On Wednesday, January 8, 2020 at 7:57:42 PM UTC-8, Mohammad wrote: >> >> Tiddlywiki stores global variables in tiddler fields. >> For example all state tiddlers in widgets like reveal, checkbox, >> edit-text, ... >> Considering both single file wiki and Node.js wiki what are your >> recommendation in using >> >> - $:/temp/mytiddlers >> - $:/state/mytiddlers >> >> Both $:/temp and $:/state are ignored when determining if the document is > "dirty" (see $:/core/SaverFilter)... and by default both are saved when you > save the file (except for $:/state/popup, which are NOT saved... see > $:/core/save/all) > > However, conceptually, $:/temp tiddlers should be "throw-away"... able to > be discarded when not actually in use, while $:/state tiddlers should > reasonably be expected to persist across sessions. > > To enforce this difference, I routinely create a tiddler, tagged with > $:/tags/Macro, containing: > \define publishFilter() -[prefix[$:/temp]] > > This variable is automatically included by the $:/core/save/all filter. > The effect is that $:/temp tiddlers are NOT saved when you save the file > and are, in effect, automatically discarded at the end of the session. > > Thus, if I want a reveal state to always revert to closed on startup, I > will use a $:/temp tiddler, but if I want the reveal state to persist > across sessions, I will use a $:/state tiddler > > -e > > > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ad5f2d79-e50c-4555-b702-6ddf9594d020%40googlegroups.com.

