Re: [PATCH v8 0/3] notmuch-search: Structured Output Formatters
authorTomi Ollila <tomi.ollila@iki.fi>
Mon, 23 Jul 2012 13:54:14 +0000 (16:54 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:48:29 +0000 (09:48 -0800)
52/9fd72dc3c7bd7b75eeef83954b70745126edd3 [new file with mode: 0644]

diff --git a/52/9fd72dc3c7bd7b75eeef83954b70745126edd3 b/52/9fd72dc3c7bd7b75eeef83954b70745126edd3
new file mode 100644 (file)
index 0000000..119ba06
--- /dev/null
@@ -0,0 +1,111 @@
+Return-Path: <tomi.ollila@iki.fi>\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 0EEBD431FB6\r
+       for <notmuch@notmuchmail.org>; Mon, 23 Jul 2012 06:54:17 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       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 EEWYekEHKuiS for <notmuch@notmuchmail.org>;\r
+       Mon, 23 Jul 2012 06:54:05 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 6293B431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 23 Jul 2012 06:54:05 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+       id 7D57F1000E5; Mon, 23 Jul 2012 16:54:14 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: craven@gmx.net, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v8 0/3] notmuch-search: Structured Output Formatters\r
+In-Reply-To: <1343039986-2732-1-git-send-email-craven@gmx.net>\r
+References: <1343039986-2732-1-git-send-email-craven@gmx.net>\r
+User-Agent: Notmuch/0.13.2+93~ge4fdd97 (http://notmuchmail.org) Emacs/23.1.1\r
+       (x86_64-redhat-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Mon, 23 Jul 2012 16:54:14 +0300\r
+Message-ID: <m27gtushvd.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\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: Mon, 23 Jul 2012 13:54:17 -0000\r
+\r
+On Mon, Jul 23 2012, craven@gmx.net wrote:\r
+\r
+> From: <craven@gmx.net>\r
+>\r
+> Currently there is no easy way to add support for different structured\r
+> formatters (like JSON). For example, adding support for S-Expressions\r
+> would result in code duplication.\r
+>\r
+> This patch series amends the situation by introducing structured\r
+> formatters, which allow different implementations of structures like\r
+> lists, maps, strings and numbers.\r
+\r
+LGTM\r
+\r
+Tomi\r
+\r
+>\r
+> The new code in sprinter.h and sprinter-json.c can be used instead of\r
+> the current ad-hoc output in all parts of notmuch, a patch for\r
+> notmuch-search.c is included.\r
+>\r
+> In a later patch, all other parts of notmuch should be adapted to the\r
+> structured formatters, and the creation of formatters should be\r
+> centralised (to make adding new formatters easier).\r
+>\r
+> A "structured" formatter is provided for notmuch-search that prints the\r
+> current text format. This removes almost all the special-casing from\r
+> notmuch-search.c.\r
+>\r
+> Changes versus v7 of this patch:\r
+> - added {} around "else" blocks (as mentioned in\r
+>   id:20120722160843.GC31834@mit.edu)\r
+> - added fallback to INTERNAL_ERROR (which should never be called) in\r
+>   notmuch-search.c if format is unknown (as mentioned in\r
+>   id:m2r4s694ly.fsf@guru.guru-group.fi).\r
+>\r
+> Summary: \r
+>\r
+> Peter Feigl (3):\r
+>   Add support for structured output formatters.\r
+>   Add structured output formatter for JSON and plain text (but don't\r
+>     use them yet).\r
+>   Use the structured formatters in notmuch-search.c.\r
+>\r
+>  Makefile.local   |   2 +\r
+>  notmuch-search.c | 304 ++++++++++++++---------------------------------\r
+>  sprinter-json.c  | 187 +++++++++++++++++++++++++++++\r
+>  sprinter-text.c  | 126 ++++++++++++++++++++\r
+>  sprinter.h       |  68 +++++++++++\r
+>  test/json        |  34 +++---\r
+>  6 files changed, 489 insertions(+), 232 deletions(-)\r
+>  create mode 100644 sprinter-json.c\r
+>  create mode 100644 sprinter-text.c\r
+>  create mode 100644 sprinter.h\r
+>\r
+> -- \r
+> 1.7.11.2\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r