--- /dev/null
+Return-Path: <awg@xvx.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 26FB8431FAF\r
+ for <notmuch@notmuchmail.org>; Thu, 12 Apr 2012 08:12:22 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id Y+7HJpnCRsmV for <notmuch@notmuchmail.org>;\r
+ Thu, 12 Apr 2012 08:12:19 -0700 (PDT)\r
+Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
+ [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 30CFE431FAE\r
+ for <notmuch@notmuchmail.org>; Thu, 12 Apr 2012 08:12:19 -0700 (PDT)\r
+Received: by lahc1 with SMTP id c1so1684919lah.26\r
+ for <notmuch@notmuchmail.org>; Thu, 12 Apr 2012 08:12:16 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=mime-version:sender:x-originating-ip:in-reply-to:references:date\r
+ :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
+ :x-gm-message-state;\r
+ bh=zmHN+s3efxMS2ef+kKiUuGbQ9xMb2qwCZ2mrVv33FAk=;\r
+ b=gSXCmPqMDypp9P7bopnndGOlkwY6aSav/ratXaTviU2TI14CBcbrTsns7W0Mcdj805\r
+ giYFaDMzuU2bApzBzBeyvXRnvZvFs9HPQ6mHFozFNC9KdjrJK5VKJZ8doc1+dBFwrssW\r
+ XbVPW4r1ZvxhSkd0TqpIocKMaeg1SSZ6V6/ezrqvUiwWrHqkav6W1TQtO89/niknWeIy\r
+ 5pLaoJMPmd6vN8eDZ//6B56RobY7h7phjil2GWL+Xk+qar3qHCr0opHVcLMHdJ+nn2Yf\r
+ 8Q4JopqYUmAykkwexXRJs0L58uQonfGCbfesMsxEBMB4TcmusEWy1smJUKkNNFKvccUs\r
+ vXMQ==\r
+MIME-Version: 1.0\r
+Received: by 10.152.148.234 with SMTP id tv10mr2494800lab.41.1334243536026;\r
+ Thu, 12 Apr 2012 08:12:16 -0700 (PDT)\r
+Sender: awg@xvx.ca\r
+Received: by 10.112.97.14 with HTTP; Thu, 12 Apr 2012 08:12:15 -0700 (PDT)\r
+X-Originating-IP: [128.221.197.57]\r
+In-Reply-To: <87bomx9x12.fsf@beesknees.cern.ch>\r
+References: <87bomx9x12.fsf@beesknees.cern.ch>\r
+Date: Thu, 12 Apr 2012 09:12:15 -0600\r
+X-Google-Sender-Auth: gR7VouggMuCD2mtlh8ds-sZr1HU\r
+Message-ID:\r
+ <CAMoJFUtBRa0FNgpEJQLVZMQ3hk2MR5vFT4Kq9mspeTBOLLBy=g@mail.gmail.com>\r
+Subject: Re: incrontab?\r
+From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+To: David Belohrad <david@belohrad.ch>\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+X-Gm-Message-State:\r
+ ALoCoQm6aKoeZjIM0i8lv7C/YugeDGWQ4/Qie/GT8N9ZjJwQd6OI6PWXmPUFWKPxtF0TOYevmQ8W\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 12 Apr 2012 15:12:22 -0000\r
+\r
+Hi David,\r
+\r
+On Thu, Apr 12, 2012 at 02:25, David Belohrad <david@belohrad.ch> wrote:\r
+> is somebody using incrontab to issue 'notmuch new'? I've tried but with\r
+> only partial success. I have setup incrotab to run 'notmuch new' when\r
+> something changes in my Maildir. However it is not\r
+> reliable. E.g. sometimes it works out of the box, sometimes it seems\r
+> that 'notmuch new' is simply not invoked at all even if I see in\r
+> /var/log/mail.log, that a new mail was delivered correctly to the\r
+> folder. Anyone really uses this setup?\r
+\r
+I don't use incrontab, but I do use my own inotify-based script for\r
+updating notmuch: https://gist.github.com/1952483 . I haven't had any\r
+trouble with it.\r
+\r
+> I have reverted back to crontab to issue 'notmuch new' every 5\r
+> minutes. And frankly speaking, I'm rather thinking to run this command\r
+> from emacs directly everytime I either start notmuch, or refresh view\r
+> using '=' on notmuch-hello buffer.\r
+\r
+You could probably do this with notmuch-hello-refresh-hook, but it\r
+will be a bit tricky: the hook is executed after the notmuch-hello\r
+buffer is refreshed, so you'd have to have it refresh after notmuch\r
+new completes, without running the hook infinitely.\r
+\r
+A better approach might be to use advice. Something like (completely untested):\r
+\r
+(defadvice notmuch-hello-update (before notmuch-new) (call-process\r
+"notmuch" nil nil nil "new"))\r
+\r
+Hope that helps,\r
+-- Adam\r