From f1a27cc2bc111c9d004550e823b9c2fc6460155b Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Thu, 6 Dec 2012 08:22:15 +0000 Subject: [PATCH] Re: [PATCH v3 0/5] New output format sexp (Lisp S-Expressions) --- e9/e52c5f2dd41e2d742cc883473259087ae65ef1 | 131 ++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 e9/e52c5f2dd41e2d742cc883473259087ae65ef1 diff --git a/e9/e52c5f2dd41e2d742cc883473259087ae65ef1 b/e9/e52c5f2dd41e2d742cc883473259087ae65ef1 new file mode 100644 index 000000000..48acffca5 --- /dev/null +++ b/e9/e52c5f2dd41e2d742cc883473259087ae65ef1 @@ -0,0 +1,131 @@ +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 82AA1431FB6 + for ; Thu, 6 Dec 2012 00:22:15 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled +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 O3E5jeHUZVLu for ; + Thu, 6 Dec 2012 00:22:13 -0800 (PST) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 88212431FAE + for ; Thu, 6 Dec 2012 00:22:13 -0800 (PST) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1TgWii-0003Bq-0I; Thu, 06 Dec 2012 08:22:12 +0000 +Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) + (envelope-from ) + id 1TgWih-0007cq-Np; Thu, 06 Dec 2012 08:22:11 +0000 +From: Mark Walters +To: Peter Feigl , notmuch@notmuchmail.org +Subject: Re: [PATCH v3 0/5] New output format sexp (Lisp S-Expressions) +In-Reply-To: <1354779189-12231-1-git-send-email-craven@gmx.net> +References: <1354632382-15609-1-git-send-email-craven@gmx.net> + <1354779189-12231-1-git-send-email-craven@gmx.net> +User-Agent: Notmuch/0.14+81~g9730584 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Thu, 06 Dec 2012 08:22:15 +0000 +Message-ID: <87sj7jpp3c.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 93.97.24.31 +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 35d7347955e403bfac04ca07332c5276 (of first 20000 bytes) +X-SpamAssassin-Score: -1.7 +X-SpamAssassin-SpamBar: - +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored -1.7 points. + Summary of the scoring: + * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, + * medium trust + * [138.37.6.40 listed in list.dnswl.org] + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * 0.6 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Thu, 06 Dec 2012 08:22:15 -0000 + + +On Thu, 06 Dec 2012, Peter Feigl wrote: +> This patch series adds a new output format "sexp" to notmuch-reply, +> notmuch-show and notmuch-search. These are useful for the Android mobile +> client and perhaps other Lisp programs as well. +> After the switch to a generic structured output printer, which was +> committed some months ago, these patches just add another one (like the +> json structured output printer). +> Basic tests and updates to the man pages are also included. +> +> This version includes the fixes according to Austin Clements' +> comments. It also changes the output from alists to plists, as these +> should work just as fine on all Lisps. + +This is looking very nice: I haven't reviewed the first patch (the +sprinting itself) but the others look good (modulo the two small +points). I can confirm that the output works in notmuch show (with a two +line tweak to use s-expressions). + +Best wishes + +Mark + + +> +> Peter Feigl (5): +> Adding an S-expression structured output printer. +> Rename the -json printer functions in notmuch-reply and notmuch-show +> to generic -sprinter functions. +> Use the S-Expression structured printer in notmuch-show, +> notmuch-reply and notmuch-search. +> Adding tests for --format=sexp. +> Updating man pages for new S-Expression output format. +> +> Makefile.local | 1 + +> devel/schemata | 8 +- +> man/man1/notmuch-reply.1 | 14 ++- +> man/man1/notmuch-search.1 | 15 +-- +> man/man1/notmuch-show.1 | 36 +++++-- +> notmuch-client.h | 8 +- +> notmuch-reply.c | 48 ++++++---- +> notmuch-search.c | 6 +- +> notmuch-show.c | 65 +++++++------ +> sprinter-sexp.c | 238 ++++++++++++++++++++++++++++++++++++++++++++++ +> sprinter.h | 4 + +> test/notmuch-test | 1 + +> test/sexp | 48 ++++++++++ +> 13 files changed, 423 insertions(+), 69 deletions(-) +> create mode 100644 sprinter-sexp.c +> create mode 100755 test/sexp +> +> -- +> 1.8.0 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2