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 4FEA0421171 for ; Sun, 12 Feb 2012 17:19:26 -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 CH1x3kF1n9oz for ; Sun, 12 Feb 2012 17:19:26 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id DBC2042117B for ; Sun, 12 Feb 2012 17:19:24 -0800 (PST) Received: by mail-ww0-f45.google.com with SMTP id dt12so3923384wgb.2 for ; Sun, 12 Feb 2012 17:19:24 -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=NXxzcCregAiuJTU62VQHhxm9DYgj4cu6Pn4sBJa9sm0=; b=Ht7L9H657py73ZsF58xlOZB8PYrE9uhnJFYN7TTquxTascYsSgP5pboj832lFg+szE oaGsccB/pLjtoIoat0UC6dq/xPJBZmtI6358o67B9AR1jCMz5IPIaI4okbEZ9B3pVt8M S1cU9Rdaq7JnwGMscHXtpM11ZS7GYYAvEKfp0= Received: by 10.180.107.67 with SMTP id ha3mr13530069wib.8.1329095964626; Sun, 12 Feb 2012 17:19:24 -0800 (PST) Received: from localhost (94-192-233-223.zone6.bethere.co.uk. [94.192.233.223]) by mx.google.com with ESMTPS id m8sm41756675wia.11.2012.02.12.17.19.23 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Feb 2012 17:19:23 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org Subject: [RFC PATCH v3 06/11] emacs: add extra parameters option to notmuch-query-get-threads Date: Mon, 13 Feb 2012 01:20:10 +0000 Message-Id: <1329096015-8078-7-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com> References: <1329072579-27340-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: Mon, 13 Feb 2012 01:19:26 -0000 Add an extra parameter to notmuch-query-get-threads (in notmuch-query.el) so that callers can pass in extra parameters to control the sort order, the --headers-only option, and threading etc. --- emacs/notmuch-query.el | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-query.el b/emacs/notmuch-query.el index d66baea..b3c91a3 100644 --- a/emacs/notmuch-query.el +++ b/emacs/notmuch-query.el @@ -22,7 +22,7 @@ (require 'notmuch-lib) (require 'json) -(defun notmuch-query-get-threads (search-terms) +(defun notmuch-query-get-threads (search-terms &rest extra-format) "Return a list of threads of messages matching SEARCH-TERMS. A thread is a forest or list of trees. A tree is a two element @@ -33,6 +33,8 @@ is a possibly empty forest of replies. (json-object-type 'plist) (json-array-type 'list) (json-false 'nil)) + (if extra-format + (setq args (append args extra-format))) (if notmuch-show-process-crypto (setq args (append args '("--decrypt")))) (setq args (append args search-terms)) -- 1.7.2.3