From 7ce1b1efdb3b0d8d8fa2d8b7bf9b24141eb72cad Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Fri, 30 Aug 2013 12:25:49 +2000 Subject: [PATCH] [PATCH 1/9] emacs: Consistently use configured sort order --- 80/43a03b2e0b03e3c6d8d7961edd80e11b343218 | 111 ++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 80/43a03b2e0b03e3c6d8d7961edd80e11b343218 diff --git a/80/43a03b2e0b03e3c6d8d7961edd80e11b343218 b/80/43a03b2e0b03e3c6d8d7961edd80e11b343218 new file mode 100644 index 000000000..818f3f5b2 --- /dev/null +++ b/80/43a03b2e0b03e3c6d8d7961edd80e11b343218 @@ -0,0 +1,111 @@ +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 16DB8431FAE + for ; Thu, 29 Aug 2013 09:26:16 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[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 OC6qSCHGguG4 for ; + Thu, 29 Aug 2013 09:26:11 -0700 (PDT) +Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu + [18.7.68.37]) + by olra.theworths.org (Postfix) with ESMTP id 7A938431FC4 + for ; Thu, 29 Aug 2013 09:26:05 -0700 (PDT) +X-AuditID: 12074425-b7f0c8e000000953-94-521f761d6704 +Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) + by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP + id 93.41.02387.D167F125; Thu, 29 Aug 2013 12:26:05 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r7TGQ4KE018779; + Thu, 29 Aug 2013 12:26:04 -0400 +Received: from drake.dyndns.org + (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com + [216.15.114.40]) (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r7TGQ1cx014989 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Thu, 29 Aug 2013 12:26:02 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1VF52m-0007Wi-U6; Thu, 29 Aug 2013 12:26:00 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH 1/9] emacs: Consistently use configured sort order +Date: Thu, 29 Aug 2013 12:25:49 -0400 +Message-Id: <1377793557-28878-2-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 1.7.10.4 +In-Reply-To: <1377793557-28878-1-git-send-email-amdragon@mit.edu> +References: <1377793557-28878-1-git-send-email-amdragon@mit.edu> +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFtrAIsWRmVeSWpSXmKPExsUixG6nritbJh9ksGwbq8X1mzOZHRg9nq26 + xRzAGMVlk5Kak1mWWqRvl8CVcWvqXvaCXTwVrVeuMDYwvubsYuTkkBAwkXj/5QULhC0mceHe + erYuRi4OIYF9jBKL1jxlhXA2MkpM3jCFGcK5wySx6sokNpAWIYG5jBIb7rqA2GwCGhLb9i9n + BLFFBKQldt6dDdTNwcEsoCbxp0sFJCws4CQxeXMj0Bx2DhYBVYm/MiBRXgEHie+3G6BuUJTo + fjYBbDingKNE/923LBCLHCT+XHzKPoGRfwEjwypG2ZTcKt3cxMyc4tRk3eLkxLy81CJdC73c + zBK91JTSTYzggHFR3cE44ZDSIUYBDkYlHt6OQPkgIdbEsuLK3EOMkhxMSqK8gSVAIb6k/JTK + jMTijPii0pzU4kOMEhzMSiK8bzmBcrwpiZVVqUX5MClpDhYlcd7nT88GCgmkJ5akZqemFqQW + wWRlODiUJHjjS4EaBYtS01Mr0jJzShDSTBycIMN5gIZbgdTwFhck5hZnpkPkTzEqSonzmoEk + BEASGaV5cL2wiH7FKA70ijBvGEgVDzAZwHW/AhrMBDR4Qr4cyOCSRISUVANjY9dBpTQrF9nH + NyuXufZoe/DclDnWrHMvcHIhZ+HR1XHrLsiKGCzo6l6w4jf/l98znxyokxfNqja5xClXlW/c + 5+XlphrrG2PB+nj2hDUn12k8rf3S2ZTx8B5TgOD25n/206uEfFgzjrn33puvIB4XeOnCjdLv + 8VMnuip/CPtb+UN0le+Rx3OUWIozEg21mIuKEwEpa6xswwIAAA== +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, 29 Aug 2013 16:26:16 -0000 + +Previously, if `notmuch-search' was called interactively (bound to "s" +in search and show, but not hello), it would always use newest-first. +However, `notmuch-hello-search' (bound to "s" in hello) and +`notmuch-hello-widget-search` would call it with the user-configured +sort order. This inconsistency seems unintentional, so change +`notmuch-search' to use the user-configured sort order when called +interactively. +--- + emacs/notmuch.el | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/emacs/notmuch.el b/emacs/notmuch.el +index f3ce840..c964186 100644 +--- a/emacs/notmuch.el ++++ b/emacs/notmuch.el +@@ -906,8 +906,18 @@ Other optional parameters are used as follows: + target-thread: A thread ID (without the thread: prefix) that will be made + current if it appears in the search results. + target-line: The line number to move to if the target thread does not +- appear in the search results." +- (interactive) ++ appear in the search results. ++ ++When called interactively, this will prompt for a query and use ++the configured default sort order." ++ (interactive ++ (list ++ ;; Prompt for a query ++ nil ++ ;; Use the default search order (if we're doing a search from a ++ ;; search buffer, ignore any buffer-local overrides) ++ (default-value notmuch-search-oldest-first))) ++ + (let* ((query (or query (notmuch-read-query "Notmuch search: "))) + (buffer (get-buffer-create (notmuch-search-buffer-title query)))) + (switch-to-buffer buffer) +-- +1.7.10.4 + -- 2.26.2