[PATCH 1/2] emacs/cli: remove entire-thread default from show: JSON
authorMark Walters <markwalters1009@gmail.com>
Thu, 23 Feb 2012 21:41:33 +0000 (21:41 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:51 +0000 (09:44 -0800)
ae/2dcae5312884040490453e7902ab6eb38f137a [new file with mode: 0644]

diff --git a/ae/2dcae5312884040490453e7902ab6eb38f137a b/ae/2dcae5312884040490453e7902ab6eb38f137a
new file mode 100644 (file)
index 0000000..f29efbd
--- /dev/null
@@ -0,0 +1,115 @@
+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 9B494431FC7\r
+       for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 13:40:22 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 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
+       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 zBU4u8JWIPNi for <notmuch@notmuchmail.org>;\r
+       Thu, 23 Feb 2012 13:40:22 -0800 (PST)\r
+Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
+       [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 0ADEA431FAE\r
+       for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 13:40:21 -0800 (PST)\r
+Received: by mail-wi0-f181.google.com with SMTP id hi8so1195426wib.26\r
+       for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 13:40:21 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of markwalters1009@gmail.com designates\r
+       10.180.95.105 as permitted sender) client-ip=10.180.95.105; \r
+Authentication-Results: mr.google.com; spf=pass (google.com: domain of\r
+       markwalters1009@gmail.com designates 10.180.95.105 as permitted\r
+       sender) smtp.mail=markwalters1009@gmail.com;\r
+       dkim=pass header.i=markwalters1009@gmail.com\r
+Received: from mr.google.com ([10.180.95.105])\r
+       by 10.180.95.105 with SMTP id dj9mr243816wib.18.1330033221684 (num_hops\r
+       = 1); Thu, 23 Feb 2012 13:40:21 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=1nXVMktxiZ0Oui+afWGz2wt6nKLoQ0j8+RBZxj/3U9Q=;\r
+       b=xH4ig0ECKSTpFjuHQaEzC2JO1n6Lsc6dfvKZAxy/ss8aJ28e3Wx8Hsa/VE2XdDj203\r
+       i5R30GyipbZ60EIxWySWdTRZxftkJ7DEpSGI982KDew7eCuAHUV1j9J4I4ZAUSLL1EG+\r
+       YlbVNODpkCJKVqnABA3NT9dLPSG6Eo+ZKzo1I=\r
+Received: by 10.180.95.105 with SMTP id dj9mr198909wib.18.1330033221632;\r
+       Thu, 23 Feb 2012 13:40:21 -0800 (PST)\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
+ dr5sm12398947wib.0.2012.02.23.13.40.20        (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Thu, 23 Feb 2012 13:40:20 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] emacs/cli: remove entire-thread default from show: JSON\r
+Date: Thu, 23 Feb 2012 21:41:33 +0000\r
+Message-Id: <1330033294-21980-2-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.2.3\r
+In-Reply-To: <1330033294-21980-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1330033294-21980-1-git-send-email-markwalters1009@gmail.com>\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: Thu, 23 Feb 2012 21:40:22 -0000\r
+\r
+Previously notmuch-show.c defaulted to --entire-thread when\r
+format=json.  Make the default just the matching messages, but make\r
+the single emacs caller add --entire-thread to the arguments supplied\r
+so the end result should be unchanged.\r
+---\r
+ emacs/notmuch-show.el |    7 ++++---\r
+ notmuch-show.c        |    1 -\r
+ 2 files changed, 4 insertions(+), 4 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index aa9ccee..dcef3d5 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -1063,14 +1063,15 @@ function is used."\r
+            (args (if notmuch-show-query-context\r
+                      (append (list "\'") basic-args\r
+                              (list "and (" notmuch-show-query-context ")\'"))\r
+-                   (append (list "\'") basic-args (list "\'")))))\r
+-      (notmuch-show-insert-forest (notmuch-query-get-threads args))\r
++                   (append (list "\'") basic-args (list "\'"))))\r
++           (cli-args (list "--entire-thread")))\r
++      (notmuch-show-insert-forest (notmuch-query-get-threads (append cli-args args)))\r
+       ;; If the query context reduced the results to nothing, run\r
+       ;; the basic query.\r
+       (when (and (eq (buffer-size) 0)\r
+                  notmuch-show-query-context)\r
+         (notmuch-show-insert-forest\r
+-         (notmuch-query-get-threads basic-args))))\r
++         (notmuch-query-get-threads (append cli-args basic-args)))))\r
\r
+       (jit-lock-register #'notmuch-show-buttonise-links)\r
\r
+diff --git a/notmuch-show.c b/notmuch-show.c\r
+index d930f94..5a9db8f 100644\r
+--- a/notmuch-show.c\r
++++ b/notmuch-show.c\r
+@@ -1066,7 +1066,6 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))\r
+     switch (format_sel) {\r
+     case NOTMUCH_FORMAT_JSON:\r
+       format = &format_json;\r
+-      params.entire_thread = TRUE;\r
+       break;\r
+     case NOTMUCH_FORMAT_TEXT:\r
+       format = &format_text;\r
+-- \r
+1.7.2.3\r
+\r