[PATCH 0/3] Control notmuch show output
authorMark Walters <markwalters1009@gmail.com>
Sat, 7 Jul 2012 15:12:55 +0000 (16:12 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:48:02 +0000 (09:48 -0800)
69/2de0b2ce4415e5d056bb19a96e396236b01ae2 [new file with mode: 0644]

diff --git a/69/2de0b2ce4415e5d056bb19a96e396236b01ae2 b/69/2de0b2ce4415e5d056bb19a96e396236b01ae2
new file mode 100644 (file)
index 0000000..eb2e6fd
--- /dev/null
@@ -0,0 +1,114 @@
+Return-Path: <markwalters1009@gmail.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 E7ADE431FC7\r
+       for <notmuch@notmuchmail.org>; Sat,  7 Jul 2012 08:13:14 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.7\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.7 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       FREEMAIL_REPLY=2.499, 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 w9NFfApX1goX for <notmuch@notmuchmail.org>;\r
+       Sat,  7 Jul 2012 08:13:10 -0700 (PDT)\r
+Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com\r
+ [74.125.82.45])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 5111D431FAE   for <notmuch@notmuchmail.org>; Sat,  7 Jul 2012 08:13:10 -0700\r
+ (PDT)\r
+Received: by wgbdt14 with SMTP id dt14so8437273wgb.2\r
+       for <notmuch@notmuchmail.org>; Sat, 07 Jul 2012 08:13:08 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer;\r
+       bh=2RmRLxTzPEY7REyG6NctvNOVzqoqgUDRUfOSrqDR/44=;\r
+       b=wY3w2+8m7B3/16TDO7crg2Af3lWqWUlfS3PiecD2lXLQG9YMqEae5IcFAvj2GWUNGe\r
+       fc6lJqSWaORcqn1i3yd54L+0KSUhMY2tHDYca5Fp+vbQx1auytdc4zJnKZ693TNCQXvi\r
+       gBD+OBqbNbjMNvbLAdFqXLg+CBl38M6+PSDEneGF+5N4MEoeTq4nPVnS9QLeT13e3BY0\r
+       iLxPtkScoNodEkuANgey+LBsL5mtQ5L8SxiuspVKZ82B25eLg88VJDQy0srnTxbFRcun\r
+       xkiLi8+QItryrp5br+kophOgLgXrUo+0j2w5hr5I0nGfl2ZLwq6iR6se7bTpkd8h/SAU\r
+       TySQ==\r
+Received: by 10.180.92.7 with SMTP id ci7mr18441319wib.1.1341673988508;\r
+       Sat, 07 Jul 2012 08:13:08 -0700 (PDT)\r
+Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
+ [94.192.233.223])     by mx.google.com with ESMTPS id\r
+ q6sm12651725wiy.0.2012.07.07.08.13.06 (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sat, 07 Jul 2012 08:13:07 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 0/3] Control notmuch show output\r
+Date: Sat,  7 Jul 2012 16:12:55 +0100\r
+Message-Id: <1341673978-6094-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\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: Sat, 07 Jul 2012 15:13:15 -0000\r
+\r
+This is a first draft of a patch set allowing the caller to control\r
+the output of notmuch show. This option should subsume the\r
+--headers-only option (see\r
+id:"1341041595-5858-1-git-send-email-markwalters1009@gmail.com") and\r
+the reply-to patch\r
+(id:"1340508470-16606-2-git-send-email-novalazy@gmail.com") as well as\r
+being extensible.\r
+\r
+It follows the suggestions made in\r
+id:"20120704182459.GI2342@hili.localdomain" and\r
+id:"CAB+hUn_sxy=QP1+OzGwKOcSYGi13Q61m4-bq+PGnYxCMPd0fvg@mail.gmail.com"\r
+\r
+and modifies the cli parser to allow keyword lists of the form --output=from,cc,body\r
+\r
+The first patch adds this functionality to the option parser. It uses\r
+a bitfield to pass the flags specified so we are limited to 32 (or\r
+perhaps 31) possible options.\r
+\r
+The second patch implements this for the selection of which headers to\r
+return. Since notmuch-reply.c wanted exactly this functionality (since\r
+it wants in-reply-to headers and reference headers but not the date\r
+header) it is converted to use this style.\r
+\r
+The third patch uses this functionality to implement the\r
+--headers-only functionality by adding a "body" option to the list of\r
+things the user can choose to output or not. \r
+\r
+Currently, I have not written any tests for the new functionality,\r
+updated the man page, or implemented for any format except JSON.\r
+\r
+Do people have any comments in the current form?\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+\r
+\r
+\r
+Mark Walters (3):\r
+  cli: allow keyword lists in argument parser.\r
+  cli: show allow the caller to specify the headers output.\r
+  cli: allow show to omit message bodies.\r
+\r
+ command-line-arguments.c |   47 +++++++++++++++++++++++\r
+ command-line-arguments.h |    3 +-\r
+ notmuch-client.h         |   26 ++++++++++++-\r
+ notmuch-reply.c          |   12 +++++-\r
+ notmuch-show.c           |   92 +++++++++++++++++++++++++++++++--------------\r
+ 5 files changed, 146 insertions(+), 34 deletions(-)\r
+\r
+-- \r
+1.7.9.1\r
+\r