Kristoffer Balintona <krisbalint...@gmail.com> writes: > (N.B. Christian Moe elsewhere in this thread something that gave me > inspiration. As a notmuch user, I think it wouldn’t be too hard to add a > visual indicator on individual emails for whether there is a todo that > links to it. The same could be done for threads in thread views like > notmuch-search-mode. This way, as one browses their email they can be > reminded of the existence of todos that might become stale if they e.g. > archive the thread. This seems at first like a low-tech but effective > solution.[1]) ... > [1] Although there is the problem of how long it would take to scrape > one’s org-agenda files for todos associated for each email.
1--2 microseconds to process ~1000 email links in 15 agenda files on a hand-me-down laptop, according to benchmark. A little more when Org stores links setting ID properties. I find that hard to believe, but in any case it's quite fast. Unsure what the best strategy would be for when to trigger updates, but it looks like it can be done fairly frequently. (Also looks like I should maybe clean up my agenda files a bit.) This is from some proof-of-concept code for mu4e, where I have a dedicated function to just scan the agenda files for a regular expression tailored for `mu4e:msgid:' links, storing entries in a hash table keyed to message-ids. It currently only supports backlinks to individual messages, not backlinks that query for a set of messages. I'll post some code soon. Yours, Christian