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