Re: [notmuch] [PATCH] Add an "--output=(json|text|)" command-line option to both...
authorScott Robinson <scott@quadhome.com>
Fri, 18 Dec 2009 18:45:17 +0000 (10:45 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:54 +0000 (09:35 -0800)
bc/563720e41e87d6275c1d1a9d7fd19c2768a5bd [new file with mode: 0644]

diff --git a/bc/563720e41e87d6275c1d1a9d7fd19c2768a5bd b/bc/563720e41e87d6275c1d1a9d7fd19c2768a5bd
new file mode 100644 (file)
index 0000000..842e994
--- /dev/null
@@ -0,0 +1,82 @@
+Return-Path: <scott@quadhome.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 6BD54431FBF\r
+       for <notmuch@notmuchmail.org>; Fri, 18 Dec 2009 10:45:21 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\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 B4-F0UdsLxyy for <notmuch@notmuchmail.org>;\r
+       Fri, 18 Dec 2009 10:45:20 -0800 (PST)\r
+Received: from megan.quadhome.com (megan.quadhome.com [209.9.237.126])\r
+       by olra.theworths.org (Postfix) with ESMTP id BC4AC431FAE\r
+       for <notmuch@notmuchmail.org>; Fri, 18 Dec 2009 10:45:20 -0800 (PST)\r
+Received: from elise.quadhome.com (c-24-22-29-24.hsd1.or.comcast.net\r
+       [24.22.29.24])\r
+       by megan.quadhome.com (Postfix) with ESMTPSA id 949091083BD\r
+       for <notmuch@notmuchmail.org>; Fri, 18 Dec 2009 10:45:19 -0800 (PST)\r
+Content-Type: text/plain; charset=UTF-8\r
+From: Scott Robinson <scott@quadhome.com>\r
+To: notmuch <notmuch@notmuchmail.org>\r
+In-reply-to: <87iqc4yyo8.fsf@yoom.home.cworth.org>\r
+References: <1261114167-sup-8228@lisa>\r
+       <1261141195-5469-1-git-send-email-david@tethera.net>\r
+       <87iqc4yyo8.fsf@yoom.home.cworth.org>\r
+Date: Fri, 18 Dec 2009 10:45:17 -0800\r
+Message-Id: <1261161342-sup-2335@lisa>\r
+User-Agent: Sup/git\r
+Content-Transfer-Encoding: 8bit\r
+Subject: Re: [notmuch] [PATCH] Add an "--output=(json|text|)" command-line\r
+       option to both notmuch-search and notmuch-show.\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\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: Fri, 18 Dec 2009 18:45:21 -0000\r
+\r
+Excerpts from Carl Worth's message of Fri Dec 18 09:33:43 -0800 2009:\r
+> On Fri, 18 Dec 2009 08:59:55 -0400, david@tethera.net wrote:\r
+> > It took me a little work to apply Scott's patch, so rather than asking\r
+> > him to resend it from git-send-email, I am just sending. I hope no-one\r
+> > is offended (much).\r
+> \r
+> I think that's great! Collaboration is what this is all about.\r
+\r
+Me too!\r
+\r
+I've never used git-send-email. I'll give it a whirl on my next patch.\r
+\r
+> > I'm thinking that the patch I sent out last night to only dump message\r
+> > ids could be reworked to use the framework of this patch.  I also\r
+> > think it would be reasonably simple to add an --output=mbox option,\r
+> > for archiving and so on.\r
+> \r
+> I think that selecting *what* to emit is orthogonal from selecting *how*\r
+> to format that output. See some ideas in the TODO file, (where I\r
+> proposed --for and --format options for these). Having a way to do mbox\r
+> output for export would indeed be very nice.\r
+\r
+Haha! I originally used "--format" and changed for some reason that escapes me\r
+now.\r
+\r
+Implementing an "mbox" formatted output in the current logic wouldn't be\r
+archive perfect. The message body is emitted on a per-part basis.\r
+\r
+What I would do is change the semantics of format->body to be called from\r
+show_message. Then the text and json parts would point at the original\r
+implementation passing off their per-part function pointers. And, a new mbox\r
+implementation would just dump the full message body.\r
+-- \r
+Scott Robinson | http://quadhome.com/\r
+\r
+Q: Why are my replies five sentences or less?\r
+A: http://five.sentenc.es/\r