Re: [PATCH] emacs: support "notmuch new" as a notmuch-poll-script
authorJani Nikula <jani@nikula.org>
Sun, 11 Dec 2011 23:10:37 +0000 (01:10 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:45 +0000 (09:40 -0800)
2f/02c1609b50cf9d208515b0e0d146b1e09d957c [new file with mode: 0644]

diff --git a/2f/02c1609b50cf9d208515b0e0d146b1e09d957c b/2f/02c1609b50cf9d208515b0e0d146b1e09d957c
new file mode 100644 (file)
index 0000000..738d75d
--- /dev/null
@@ -0,0 +1,159 @@
+Return-Path: <jani@nikula.org>\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 75B98429E25\r
+       for <notmuch@notmuchmail.org>; Sun, 11 Dec 2011 15:10:39 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.699\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
+       tests=[HTML_MESSAGE=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 3pJCIvN8Yz37 for <notmuch@notmuchmail.org>;\r
+       Sun, 11 Dec 2011 15:10:38 -0800 (PST)\r
+Received: from mail-pw0-f53.google.com (mail-pw0-f53.google.com\r
+       [209.85.160.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id A49B9431FB6\r
+       for <notmuch@notmuchmail.org>; Sun, 11 Dec 2011 15:10:38 -0800 (PST)\r
+Received: by pbds6 with SMTP id s6so567966pbd.26\r
+       for <notmuch@notmuchmail.org>; Sun, 11 Dec 2011 15:10:37 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.68.73.34 with SMTP id i2mr28500441pbv.43.1323645037831; Sun,\r
+       11 Dec 2011 15:10:37 -0800 (PST)\r
+Received: by 10.68.212.134 with HTTP; Sun, 11 Dec 2011 15:10:37 -0800 (PST)\r
+Received: by 10.68.212.134 with HTTP; Sun, 11 Dec 2011 15:10:37 -0800 (PST)\r
+In-Reply-To: <20111211225822.GH2760@mit.edu>\r
+References: <1323640100-18326-1-git-send-email-jani@nikula.org>\r
+       <87wra26a5u.fsf@gmail.com> <20111211225822.GH2760@mit.edu>\r
+Date: Mon, 12 Dec 2011 01:10:37 +0200\r
+Message-ID:\r
+ <CAB+hUn-ADRtZRCq5Ad6H6R2L246EBR8hOSsk4B2yeRsH4kN16w@mail.gmail.com>\r
+Subject: Re: [PATCH] emacs: support "notmuch new" as a notmuch-poll-script\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Austin Clements <amdragon@mit.edu>\r
+Content-Type: multipart/alternative; boundary=f46d0417071b49e4c804b3d920ce\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, 11 Dec 2011 23:10:39 -0000\r
+\r
+--f46d0417071b49e4c804b3d920ce\r
+Content-Type: text/plain; charset=UTF-8\r
+\r
+On Dec 12, 2011 12:56 AM, "Austin Clements" <amdragon@mit.edu> wrote:\r
+>\r
+> Quoth Dmitry Kurochkin on Dec 12 at  2:00 am:\r
+> > Hi Jani.\r
+> >\r
+> > On Sun, 11 Dec 2011 23:48:20 +0200, Jani Nikula <jani@nikula.org> wrote:\r
+> > > Let notmuch-poll-script be a function as well as a string. Make\r
+default\r
+> > > value nil instead of an empty string, but allow "" for backwards\r
+> > > compatibility. Add a notmuch poll function to call "notmuch new"\r
+using the\r
+> > > configured notmuch-command.\r
+> > >\r
+> > > This allows taking better advantage of the "notmuch new" hooks from\r
+emacs\r
+> > > without intermediate scripts.\r
+> > >\r
+> >\r
+> > I was just thinking about working on this myself :)\r
+> >\r
+> > I think a better solution would be to allow running a command with\r
+> > arguments.  Creating a elisp function just to run a command with some\r
+> > parameters feels wrong.  This way we would have to add another function\r
+> > each time we want to add another argument.\r
+>\r
+> This seems a little awkward to me, too, though perhaps it's the best\r
+> way.  Other approaches to consider include accepting a list for\r
+> notmuch-poll-script (e.g., ("notmuch" "new")) or leaving it as a\r
+> string but treating it as a shell command so "notmuch new" would Just\r
+> Work.  Personally, I think the latter is the most intuitive, but it\r
+> would be worth looking at how other customizable external commands are\r
+> done in Emacs.\r
+>\r
+> A function seems powerful, but also like overkill.  Can you give a use\r
+> case for a function that wouldn't be more easily solved by one of the\r
+> above approaches?\r
+\r
+The only reason I had for using a function was running notmuch using\r
+notmuch-command. Any ideas how to do that with the Just Works approach?\r
+\r
+J.\r
+\r
+--f46d0417071b49e4c804b3d920ce\r
+Content-Type: text/html; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+<p><br>\r
+On Dec 12, 2011 12:56 AM, &quot;Austin Clements&quot; &lt;<a href=3D"mailto=\r
+:amdragon@mit.edu">amdragon@mit.edu</a>&gt; wrote:<br>\r
+&gt;<br>\r
+&gt; Quoth Dmitry Kurochkin on Dec 12 at =C2=A02:00 am:<br>\r
+&gt; &gt; Hi Jani.<br>\r
+&gt; &gt;<br>\r
+&gt; &gt; On Sun, 11 Dec 2011 23:48:20 +0200, Jani Nikula &lt;<a href=3D"ma=\r
+ilto:jani@nikula.org">jani@nikula.org</a>&gt; wrote:<br>\r
+&gt; &gt; &gt; Let notmuch-poll-script be a function as well as a string. M=\r
+ake default<br>\r
+&gt; &gt; &gt; value nil instead of an empty string, but allow &quot;&quot;=\r
+ for backwards<br>\r
+&gt; &gt; &gt; compatibility. Add a notmuch poll function to call &quot;not=\r
+much new&quot; using the<br>\r
+&gt; &gt; &gt; configured notmuch-command.<br>\r
+&gt; &gt; &gt;<br>\r
+&gt; &gt; &gt; This allows taking better advantage of the &quot;notmuch new=\r
+&quot; hooks from emacs<br>\r
+&gt; &gt; &gt; without intermediate scripts.<br>\r
+&gt; &gt; &gt;<br>\r
+&gt; &gt;<br>\r
+&gt; &gt; I was just thinking about working on this myself :)<br>\r
+&gt; &gt;<br>\r
+&gt; &gt; I think a better solution would be to allow running a command wit=\r
+h<br>\r
+&gt; &gt; arguments. =C2=A0Creating a elisp function just to run a command =\r
+with some<br>\r
+&gt; &gt; parameters feels wrong. =C2=A0This way we would have to add anoth=\r
+er function<br>\r
+&gt; &gt; each time we want to add another argument.<br>\r
+&gt;<br>\r
+&gt; This seems a little awkward to me, too, though perhaps it&#39;s the be=\r
+st<br>\r
+&gt; way. =C2=A0Other approaches to consider include accepting a list for<b=\r
+r>\r
+&gt; notmuch-poll-script (e.g., (&quot;notmuch&quot; &quot;new&quot;)) or l=\r
+eaving it as a<br>\r
+&gt; string but treating it as a shell command so &quot;notmuch new&quot; w=\r
+ould Just<br>\r
+&gt; Work. =C2=A0Personally, I think the latter is the most intuitive, but =\r
+it<br>\r
+&gt; would be worth looking at how other customizable external commands are=\r
+<br>\r
+&gt; done in Emacs.<br>\r
+&gt;<br>\r
+&gt; A function seems powerful, but also like overkill. =C2=A0Can you give =\r
+a use<br>\r
+&gt; case for a function that wouldn&#39;t be more easily solved by one of =\r
+the<br>\r
+&gt; above approaches?</p>\r
+<p>The only reason I had for using a function was running notmuch using not=\r
+much-command. Any ideas how to do that with the Just Works approach?</p>\r
+<p>J.<br>\r
+</p>\r
+\r
+--f46d0417071b49e4c804b3d920ce--\r