Re: [PATCH] emacs: support "notmuch new" as a notmuch-poll-script
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Mon, 12 Dec 2011 10:21:53 +0000 (14:21 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:46 +0000 (09:40 -0800)
bd/51ccf3ee67b975065dbdb35ad86d6b36052bc9 [new file with mode: 0644]

diff --git a/bd/51ccf3ee67b975065dbdb35ad86d6b36052bc9 b/bd/51ccf3ee67b975065dbdb35ad86d6b36052bc9
new file mode 100644 (file)
index 0000000..90a0ec1
--- /dev/null
@@ -0,0 +1,124 @@
+Return-Path: <dmitry.kurochkin@gmail.com>\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 5970D429E26\r
+       for <notmuch@notmuchmail.org>; Mon, 12 Dec 2011 02:22:32 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, 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 hGnthQW-roak for <notmuch@notmuchmail.org>;\r
+       Mon, 12 Dec 2011 02:22:31 -0800 (PST)\r
+Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
+       [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 7F0A9429E25\r
+       for <notmuch@notmuchmail.org>; Mon, 12 Dec 2011 02:22:31 -0800 (PST)\r
+Received: by bkat8 with SMTP id t8so5598427bka.26\r
+       for <notmuch@notmuchmail.org>; Mon, 12 Dec 2011 02:22:30 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
+       :message-id:mime-version:content-type;\r
+       bh=nBF66l9+dDpv0s+OPusNq13T5XRSGHYf8G/BlTpVz5Q=;\r
+       b=KdytxnlgtQEjrEh85uvr+9+tLZkcxbKrqvXwc6GvAatLHgZ07C9nOVZut7qiz3wsmI\r
+       WAzdkS09C6u4htpyW+V7P9lE6pW3D1QF+TTIF0OLN3p54wMrVKYIqkYg0B/lWGp7mD6B\r
+       fEsvCBjoXr+DdjC1R6sc+q31mZJxeqqUhd0uk=\r
+Received: by 10.205.127.65 with SMTP id gz1mr9812176bkc.106.1323685349930;\r
+       Mon, 12 Dec 2011 02:22:29 -0800 (PST)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id h7sm30568330bkw.12.2011.12.12.02.22.28\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 12 Dec 2011 02:22:29 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, Austin Clements <amdragon@MIT.EDU>,\r
+       Jani Nikula <jani@nikula.org>\r
+Subject: Re: [PATCH] emacs: support "notmuch new" as a notmuch-poll-script\r
+In-Reply-To: <yf6wra2m6y7.fsf@taco2.nixu.fi>\r
+References: <1323640100-18326-1-git-send-email-jani@nikula.org>\r
+       <87wra26a5u.fsf@gmail.com> <20111211225822.GH2760@mit.edu>\r
+       <CAB+hUn-ADRtZRCq5Ad6H6R2L246EBR8hOSsk4B2yeRsH4kN16w@mail.gmail.com>\r
+       <20111212003103.GI2760@mit.edu> <yf6wra2m6y7.fsf@taco2.nixu.fi>\r
+User-Agent: Notmuch/0.10.2+94~g948b41d (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Mon, 12 Dec 2011 14:21:53 +0400\r
+Message-ID: <87wra2ay4e.fsf@gmail.com>\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: Mon, 12 Dec 2011 10:22:32 -0000\r
+\r
+On Mon, 12 Dec 2011 12:15:44 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+> On Sun, 11 Dec 2011 19:31:03 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> > \r
+> > So here's another idea, prefaced with a rant.\r
+> > \r
+> > It's bothered me for a long time that notmuch-emacs didn't just know\r
+> > by default how to check for new mail.  What MUA doesn't know how to\r
+> > check for new mail?  Why does a new user of notmuch have to tell it\r
+> > how to check for new mail?  Of course, this *had* to be configured\r
+> > before because everyone had their own way of checking for new mail.\r
+> > Hooks eliminate this unnecessary flexibility and make "notmuch new"\r
+> > the one true way to check for new mail---as it ought to be---and in\r
+> > turn make the notmuch-poll-script variable obsolete.\r
+> > \r
+> > So, what about changing the default "" setting of notmuch-poll-script\r
+> > from meaning "do nothing and be useless" to meaning "run notmuch new\r
+> > (using notmuch-command)"?  It will then automatically do the right\r
+> > thing for new users, while still being backward-compatible and\r
+> > allowing an escape hatch for bizarre situations.\r
+> \r
+> +1\r
+> \r
+> So, it could work like this:\r
+> \r
+> (defun notmuch-poll ()\r
+>   "FIX DOCSTRING"\r
+>   (interactive)\r
+>   (if (stringp notmuch notmuch-poll-script)\r
+>       (if (string= notmuch-poll-script "")\r
+>         (call-process notmuch-command nil nil nil "new")\r
+>         (call-process notmuch-poll-script))))\r
+> \r
+> I.e. in case notmuch-poll-script == nil, (or not string)\r
+> do nothing. In case notmuch-poll-script == "" execute notmuch new\r
+> and if notmuch-poll-script is string with content execute that.\r
+> \r
+\r
+I think the following scheme would be slightly better and more\r
+consistent:\r
+\r
+* nil - run "notmuch new", the new default\r
+* "" - do nothing\r
+* "script" - run script\r
+\r
+Regards,\r
+  Dmitry\r
+\r
+> users who want other functionality can reimplement notmuch-poll function\r
+> after notmuch has been loaded (and manage things themselves when internal\r
+> implementation changes ;().\r
+> \r
+> \r
+> Tomi\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r