Re: [PATCH] emacs: support "notmuch new" as a notmuch-poll-script
authorAustin Clements <amdragon@MIT.EDU>
Sun, 11 Dec 2011 22:58:22 +0000 (17:58 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:45 +0000 (09:40 -0800)
b2/f77fcce4a1fb5ee5d6d4ea3822751c4ee42b08 [new file with mode: 0644]

diff --git a/b2/f77fcce4a1fb5ee5d6d4ea3822751c4ee42b08 b/b2/f77fcce4a1fb5ee5d6d4ea3822751c4ee42b08
new file mode 100644 (file)
index 0000000..3751513
--- /dev/null
@@ -0,0 +1,109 @@
+Return-Path: <amdragon@mit.edu>\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 BC1CA429E25\r
+       for <notmuch@notmuchmail.org>; Sun, 11 Dec 2011 14:56:49 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[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 wa552FCZHCIa for <notmuch@notmuchmail.org>;\r
+       Sun, 11 Dec 2011 14:56:49 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU\r
+       [18.9.25.12])\r
+       by olra.theworths.org (Postfix) with ESMTP id 17310431FB6\r
+       for <notmuch@notmuchmail.org>; Sun, 11 Dec 2011 14:56:49 -0800 (PST)\r
+X-AuditID: 1209190c-b7f806d0000008d6-57-4ee535304b8c\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 7A.32.02262.03535EE4; Sun, 11 Dec 2011 17:56:48 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id pBBMulnI017573; \r
+       Sun, 11 Dec 2011 17:56:48 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pBBMujTg027853\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Sun, 11 Dec 2011 17:56:46 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1RZsLe-0004Gz-Il; Sun, 11 Dec 2011 17:58:22 -0500\r
+Date: Sun, 11 Dec 2011 17:58:22 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Jani Nikula <jani@nikula.org>,\r
+       Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+Subject: Re: [PATCH] emacs: support "notmuch new" as a notmuch-poll-script\r
+Message-ID: <20111211225822.GH2760@mit.edu>\r
+References: <1323640100-18326-1-git-send-email-jani@nikula.org>\r
+       <87wra26a5u.fsf@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87wra26a5u.fsf@gmail.com>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42IRYrdT1zUwfepncO+7pMXVrf3sFk3TnS2u\r
+       35zJ7MDssXPWXXaPW/dfs3s8W3WLOYA5issmJTUnsyy1SN8ugSujfe1ttoLl3BVzGj6zNjD+\r
+       5uhi5OSQEDCRePfyDSOELSZx4d56NhBbSGAfo8TnmfFdjFxA9gZGif49m1khnJNMEtuWPIVy\r
+       ljBKfDg8kx2khUVAVeLjhCvMIDabgIbEtv3LwcaKCERKtDQ+YAKxmQWkJb79bgazhQW8JDa+\r
+       7WYBsXkFtCXu75vHArE6RuL0gYlMEHFBiZMzn7BA9GpJ3Pj3EijOATZn+T+wDzgF1CV+TfoN\r
+       Vi4qoCIx5eQ2tgmMQrOQdM9C0j0LoXsBI/MqRtmU3Crd3MTMnOLUZN3i5MS8vNQiXUO93MwS\r
+       vdSU0k2MoEDnlOTZwfjmoNIhRgEORiUe3hPPHvsJsSaWFVfmHmKU5GBSEuWdZ/zUT4gvKT+l\r
+       MiOxOCO+qDQntfgQowQHs5IIr93dJ35CvCmJlVWpRfkwKWkOFiVx3updD/2EBNITS1KzU1ML\r
+       UotgsjIcHEoSvJNNgIYKFqWmp1akZeaUIKSZODhBhvMADW8DqeEtLkjMLc5Mh8ifYlSUEudd\r
+       AJIQAElklObB9cIS0StGcaBXhHn7QKp4gEkMrvsV0GAmoMFxKSBXF5ckIqSkGhgtjF5eKc5s\r
+       FHYWPSp3oedK3Gznw+6n//ZO+KJy73HP1bdxS7uVcnlPHjy1vkfjZ9i5K8eZb+gdm3hHROmX\r
+       ituPVk2Vp9axbJahzpbhpxl+cGs76bQ/i/iwQNxMmLXzeuIZXuNdOsmTftdfSTmaZ7Of7ReT\r
+       qSDv6vqPy1pTfLcFL+Tu3mVxuFSJpTgj0VCLuag4EQD+8TzZHwMAAA==\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 22:56:49 -0000\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 default\r
+> > value nil instead of an empty string, but allow "" for backwards\r
+> > compatibility. Add a notmuch poll function to call "notmuch new" using the\r
+> > configured notmuch-command.\r
+> > \r
+> > This allows taking better advantage of the "notmuch new" hooks from 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