the save-tiddler button ($:/core/ui/Buttons/save) could be modified to this:

<$fieldmangler><$button tooltip={{$:/language/Buttons/Save/Hint}} 
aria-label={{$:/language/Buttons/Save/Caption}} 
class=<<tv-config-toolbar-class>>>
<<extract-tasks-from-tiddler>>
<$action-sendmessage $message="tm-add-tag" $param={{$:/temp/NewTagName}}/>
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
<$action-sendmessage $message="tm-add-field" $name={{$:/temp/newfieldname}} 
$value={{$:/temp/newfieldvalue}}/>
<$action-deletetiddler $tiddler="$:/temp/newfieldname"/>
<$action-deletetiddler $tiddler="$:/temp/newfieldvalue"/>
<$action-sendmessage $message="tm-save-tiddler"/>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/done-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text 
text={{$:/language/Buttons/Save/Caption}}/></span>
</$list>
</$button></$fieldmangler>


the actions for saving a tiddler with "ctrl-Enter" need the same 
modification. for that, you change the tiddler $:/core/ui/EditTemplate ... 
there's only one new line at the top:

\define actions()
<<extract-tasks-from-tiddler>>
<$action-sendmessage $message="tm-add-tag" $param={{$:/temp/NewTagName}}/>
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
<$action-sendmessage $message="tm-add-field" $name={{$:/temp/newfieldname}} 
$value={{$:/temp/newfieldvalue}}/>
<$action-deletetiddler $tiddler="$:/temp/newfieldname"/>
<$action-deletetiddler $tiddler="$:/temp/newfieldvalue"/>
<$action-sendmessage $message="tm-save-tiddler"/>
\end
\define frame-classes()
tc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ 
$(shadowTiddlerClass)$ $(systemTiddlerClass)$
\end
<div class=<<frame-classes>> data-tiddler-title=<<currentTiddler>>>
<$fieldmangler>
<$set name="storyTiddler" value=<<currentTiddler>>>
<$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler">
<$keyboard key="((save-tiddler))" actions=<<actions>>>
<$list 
filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" 
variable="listItem">
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] 
[<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
<$transclude tiddler=<<listItem>>/>
</$set>
</$list>
</$keyboard>
</$keyboard>
</$set>
</$fieldmangler>
</div>




and you create another tiddler tagged with $:/tags/Macro with this content:

\define extract-tasks-from-tiddler()
<$list 
filter="[[$(storyTiddler)$]get:lines[text]removeprefix[;Task:]!prefix[ ]] 
[[$(storyTiddler)$]get:lines[text]removeprefix[;Task:]prefix[ 
]removeprefix[ ]]" variable="taskLine">
<$list filter="[<taskLine>is[missing]]">
<$action-createtiddler $basetitle=<<taskLine>>/>
<$fieldmangler tiddler=<<taskLine>>>
<$action-sendmessage $message="tm-add-tag" $param="Task"/>
</$fieldmangler>
</$list>
</$list>
\end

this is working pretty good for me, I really like your idea!

all the best,
BTC



-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a41e66c0-6455-4a88-a014-9dc019727982%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to