Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 26FB8431FAF for ; Thu, 12 Apr 2012 08:12:22 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 Y+7HJpnCRsmV for ; Thu, 12 Apr 2012 08:12:19 -0700 (PDT) Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 30CFE431FAE for ; Thu, 12 Apr 2012 08:12:19 -0700 (PDT) Received: by lahc1 with SMTP id c1so1684919lah.26 for ; Thu, 12 Apr 2012 08:12:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=zmHN+s3efxMS2ef+kKiUuGbQ9xMb2qwCZ2mrVv33FAk=; b=gSXCmPqMDypp9P7bopnndGOlkwY6aSav/ratXaTviU2TI14CBcbrTsns7W0Mcdj805 giYFaDMzuU2bApzBzBeyvXRnvZvFs9HPQ6mHFozFNC9KdjrJK5VKJZ8doc1+dBFwrssW XbVPW4r1ZvxhSkd0TqpIocKMaeg1SSZ6V6/ezrqvUiwWrHqkav6W1TQtO89/niknWeIy 5pLaoJMPmd6vN8eDZ//6B56RobY7h7phjil2GWL+Xk+qar3qHCr0opHVcLMHdJ+nn2Yf 8Q4JopqYUmAykkwexXRJs0L58uQonfGCbfesMsxEBMB4TcmusEWy1smJUKkNNFKvccUs vXMQ== MIME-Version: 1.0 Received: by 10.152.148.234 with SMTP id tv10mr2494800lab.41.1334243536026; Thu, 12 Apr 2012 08:12:16 -0700 (PDT) Sender: awg@xvx.ca Received: by 10.112.97.14 with HTTP; Thu, 12 Apr 2012 08:12:15 -0700 (PDT) X-Originating-IP: [128.221.197.57] In-Reply-To: <87bomx9x12.fsf@beesknees.cern.ch> References: <87bomx9x12.fsf@beesknees.cern.ch> Date: Thu, 12 Apr 2012 09:12:15 -0600 X-Google-Sender-Auth: gR7VouggMuCD2mtlh8ds-sZr1HU Message-ID: Subject: Re: incrontab? From: Adam Wolfe Gordon To: David Belohrad Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQm6aKoeZjIM0i8lv7C/YugeDGWQ4/Qie/GT8N9ZjJwQd6OI6PWXmPUFWKPxtF0TOYevmQ8W 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: Thu, 12 Apr 2012 15:12:22 -0000 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