Closed romanofski closed 5 years ago
We can use notmuch_database_index_file
but apparently the file must be under the database path (see https://git.notmuchmail.org/git?p=notmuch;a=blob;f=lib/notmuch.h;hb=HEAD#l561).
edit although I cannot see anything in the code to enforce that (haven't tried it yet tho)
That's ok that the file has to be stored under the database path since I thought saving postponed mails in a folder under the database path.
I have not entirely figured out what to do in cases of IO exceptions, but perhaps in that case just writing it out as a temp file and not indexing it would be a way to go.
Yeah save it under /tmp
and alert the user (which needs an alert system of course).
I've made progress on https://github.com/purebred-mua/purebred/issues/119 and realise that I can't finish the feature without this one. Kinda pointless to keep drafts around when you can't take them up again for sending.
I'll see if I can implement this one and see how I go.
@romanofski I have a bit more time now that YLJ is over, I can probably tackle this, or certainly review your implementation if you already started.
@frasertweedale nope haven't started yet. If you have time go for it. I'll concentrate on my refactorings instead.
I have started chipping away at this.
While working on https://github.com/purebred-mua/purebred/issues/119 I can now write mails into a
Drafts
directory. But they're not indexed just by writing them there. Unless I do a subprocess call tonotmuch new
which will have other side effects, I think it would be good to leverage the use of hs-notmuch and expose the API to add messages with the given tags to the index. That way I can pick draft mails up again with a simple search (e.g.tag:draft
)