I’ve taken a few shots at this over the years - a super-lightweight way of making todos quickly inline as I’m making notes. I can think of a few ways to do this, but most of the normal ways involve externally storing each todo somewhere and I’m looking for a no-trace way of doing it. Here’s what I have, which promptly breaks TiddlyWiki.
Intended effect/setup:
- Be able to add todos inline just like if <<todo “this”>> is a todo
- The macro would wikify to a button
- Clicking the button would remove the macrocall and just leave the word DONE
What almost works (copy-paste to tiddlywiki.com):
Macro
\define todo(string)
<$button>$string$
<$action-setfield $field="text" $value=<<new-content "$string$">>/>
</$button>
\end
\define new-content(word)
<$vars search-string='\<\<todo\s"$word$"\>\>' replace-string='DONE'>
<$list filter="[all[current]get[text]splitregexp<search-string>join<replace-string>]"><<currentTiddler>></$list>
</$vars>
\end
Example Tiddler
I should really <<todo "call">> my old friend.
Actually I should <<todo "visit">> my mother while I'm in town too.
which renders as
But when I click on the buttons it crashes… I’m not really surprised as it seems kind of crazy, but I’m hoping somebody has tried something like this that works.
I will note that if I enter another tiddler name in the action-setfield so that it outputs somewhere else, that works as intended. The problem is that I’m trying to have it kind of replace itself.
Any ideas?