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