Re: incrontab?
authorDavid Belohrad <david@belohrad.ch>
Sun, 15 Apr 2012 21:39:08 +0000 (23:39 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:26 +0000 (09:46 -0800)
99/ddfff96769f52be6e207cf953155a945ae8125 [new file with mode: 0644]

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