Adam Wolfe Gordon
awg+notmuch at xvx.ca
Thu Apr 12 08:12:15 PDT 2012
On Thu, Apr 12, 2012 at 02:25, David Belohrad <david at belohrad.ch> wrote:
> is somebody using incrontab to issue 'notmuch new'? I've tried but with
> only partial success. I have setup incrotab to run 'notmuch new' when
> something changes in my Maildir. However it is not
> reliable. E.g. sometimes it works out of the box, sometimes it seems
> that 'notmuch new' is simply not invoked at all even if I see in
> /var/log/mail.log, that a new mail was delivered correctly to the
> folder. Anyone really uses this setup?
I don't use incrontab, but I do use my own inotify-based script for
updating notmuch: https://gist.github.com/1952483 . I haven't had any
trouble with it.
> I have reverted back to crontab to issue 'notmuch new' every 5
> minutes. And frankly speaking, I'm rather thinking to run this command
> from emacs directly everytime I either start notmuch, or refresh view
> using '=' on notmuch-hello buffer.
You could probably do this with notmuch-hello-refresh-hook, but it
will be a bit tricky: the hook is executed after the notmuch-hello
buffer is refreshed, so you'd have to have it refresh after notmuch
new completes, without running the hook infinitely.
A better approach might be to use advice. Something like (completely untested):
(defadvice notmuch-hello-update (before notmuch-new) (call-process
"notmuch" nil nil nil "new"))
Hope that helps,
More information about the notmuch