On Tuesday, April 28, 2020 at 8:39:44 AM UTC-7, Ed Heil wrote:
>
> some way to specify that search box contents/results do not have to be
> saved as part of the wiki state?
>
The sidebar search input is stored in *$:/temp/search*,
and the $:/AdvancedSearch input is stored in *$:/temp/advancedsearch*
The filter that determines what is saved in the file is defined in
*$:/core/save/all*, which contains:
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!
has[draft.of]]
\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}}
Note the $(publishFilter)$ reference in the saveTiddlerFilter()
definition. This macro variable can be used to list additional tiddlers
that should be excluded when saving the file.
Thus, to prevent the search inputs from being saved all you need to do is
to create a global macro tiddler (e.g., "MyPublishFilter", tagged with
"$:/tags/Macro") like this:
\define publishFilter() -[[$:/temp/search]] -[[$:/temp/advancedsearch]]
When you save your document, those two tiddlers will no longer be
included. As a result, when you reload the file, the search inputs will
default to blank, as desired.
enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
InsideTiddlyWiki - http://TiddlyTools.com/InsideTW
--
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/ab3528b7-1265-4821-b712-4dba45ee3dcf%40googlegroups.com.