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