From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3F3C0431FAF for ; Sun, 15 Apr 2012 14:39:12 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[MSGID_MULTIPLE_AT=0.001] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q8YsXLhScrq5 for ; Sun, 15 Apr 2012 14:39:11 -0700 (PDT) Received: from server.belohrad.ch (static-212-101-19-163.adsl.solnet.ch [212.101.19.163]) by olra.theworths.org (Postfix) with ESMTP id 3EBC2431FAE for ; Sun, 15 Apr 2012 14:39:11 -0700 (PDT) Received: from bepc13284.belohrad.ch (unknown [10.0.1.50]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by server.belohrad.ch (Postfix) with ESMTPSA id 949B22635B; Sun, 15 Apr 2012 23:42:07 +0200 (CEST) From: David Belohrad To: Adam Wolfe Gordon Subject: Re: incrontab? In-Reply-To: References: <87bomx9x12.fsf@beesknees.cern.ch> User-Agent: Notmuch/0.12+105~g6c84116 (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu) Date: Sun, 15 Apr 2012 23:39:08 +0200 Message-ID: <87pqb8ad4z.fsf@david@belohrad.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Apr 2012 21:39:12 -0000 Hi Adam, interestingly, your 'G' short-cut hint works out of the box! What happens is, that when one presses 'G', this invokes notmuch-hello-poll-and-update. This function calls 'notmuch-poll', which does exactly what I want. I.e. it runs 'notmuch new' if no polling script is specified. In my case however this invokes 'remote-notmuch new' which asks notmuch installed at the server to tag new emails. Lovely. (footnote: It suits me excellently because I'm not seeking for 'mail push' service and rather read my emails whenever I decide to do and not whenever an email arrives - this is why I consider not calling notmuch-poll before every invocation of (notmuch) not as a bug, but just minor annoyance which can be tweaked away if desired) There is just one slightly weird thing. This is when 'notmuch' is opened, the focus goes directly to search button instead of 'inbox' messages (or something else), which is imho more interesting than going into search. Because at first what one wants to do is to look into new emails. Another disadvantage of going directly into search box is, that all shortcuts get inhibited. Is there any way how to set default focus to something else? thanks a lot david Adam Wolfe Gordon writes: > Hi David, > > On Thu, Apr 12, 2012 at 02:25, David Belohrad 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, > -- Adam