From f6cddcc935e60f60196b915d1a677f0166d78a33 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Wed, 4 Sep 2013 17:45:17 +2000 Subject: [PATCH] [PATCH v2 1/9] emacs: Consistently use configured sort order --- e3/81c17900d2b111fcb6564c60f6cd1a1fc5188b | 111 ++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 e3/81c17900d2b111fcb6564c60f6cd1a1fc5188b diff --git a/e3/81c17900d2b111fcb6564c60f6cd1a1fc5188b b/e3/81c17900d2b111fcb6564c60f6cd1a1fc5188b new file mode 100644 index 000000000..837c6341f --- /dev/null +++ b/e3/81c17900d2b111fcb6564c60f6cd1a1fc5188b @@ -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 41262431FD6 + for ; Tue, 3 Sep 2013 14:45:40 -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 FaWogdr7r3Wc for ; + Tue, 3 Sep 2013 14:45:33 -0700 (PDT) +Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.mit.edu + [18.9.25.15]) + by olra.theworths.org (Postfix) with ESMTP id 43782431FD8 + for ; Tue, 3 Sep 2013 14:45:33 -0700 (PDT) +X-AuditID: 1209190f-b7fa58e000000953-74-5226587b4273 +Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) + by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP + id B5.F3.02387.B7856225; Tue, 3 Sep 2013 17:45:31 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id r83LjUJ6019871; + Tue, 3 Sep 2013 17:45:30 -0400 +Received: from drake.dyndns.org (26-4-182.dynamic.csail.mit.edu [18.26.4.182]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r83LjRjM026856 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Tue, 3 Sep 2013 17:45:28 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1VGyPe-0004xo-SX; Tue, 03 Sep 2013 17:45:26 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH v2 1/9] emacs: Consistently use configured sort order +Date: Tue, 3 Sep 2013 17:45:17 -0400 +Message-Id: <1378244725-18846-2-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 1.7.10.4 +In-Reply-To: <1378244725-18846-1-git-send-email-amdragon@mit.edu> +References: <1378244725-18846-1-git-send-email-amdragon@mit.edu> +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFjrGIsWRmVeSWpSXmKPExsUixG6nolsdoRZk8OeloUXTdGeL1XN5LK7f + nMnswOyxc9Zddo9b91+zezxbdYs5gDmKyyYlNSezLLVI3y6BK+PW1L3sBbt4KlqvXGFsYHzN + 2cXIySEhYCJx68BTFghbTOLCvfVsXYxcHEIC+xglft9pYoVwNjBK7Fx9HCpzmEniYfMRZghn + LqPEvR032EH62QQ0JLbtX84IYosISEvsvDubFcRmFoiWOHJ5BhuILSzgKnGhZxcziM0ioCox + aesMsHpeAQeJA/d/MEPcoSjR/WwCWD2ngKNE74JFYPOFgGqaVl5mn8DIv4CRYRWjbEpulW5u + YmZOcWqybnFyYl5eapGuiV5uZoleakrpJkZQcHFK8u9g/HZQ6RCjAAejEg/vivuqQUKsiWXF + lbmHGCU5mJREeY+EqgUJ8SXlp1RmJBZnxBeV5qQWH2KU4GBWEuFN8AHK8aYkVlalFuXDpKQ5 + WJTEeZ89PRsoJJCeWJKanZpakFoEk5Xh4FCS4C0PB2oULEpNT61Iy8wpQUgzcXCCDOcBGv4z + DGR4cUFibnFmOkT+FKOilDhvOkizAEgiozQPrhcW/a8YxYFeEeb1B6niASYOuO5XQIOZgAan + fVYFGVySiJCSamCcsFrGY4dW2Zt3j+Z2yZ1Z80LIWshZ+p+08KIq39x0/msHPvixux09rTdh + 7sJ8xwxNU8aiS6mztkXNysn3nR3QY1s329Iwd9mapC2bso8I/Y2d5uW3MF3g6wU+XzXj48Jz + vs37OCHI/6rVftP36w1/WiuvfFr4sIBpir/l3oA95/h1mHcqPVivxFKckWioxVxUnAgAPtIp + I9kCAAA= +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: Tue, 03 Sep 2013 21:45:41 -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