[PATCH v2 1/9] emacs: Consistently use configured sort order
authorAustin Clements <amdragon@MIT.EDU>
Tue, 3 Sep 2013 21:45:17 +0000 (17:45 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:56:53 +0000 (09:56 -0800)
e3/81c17900d2b111fcb6564c60f6cd1a1fc5188b [new file with mode: 0644]

diff --git a/e3/81c17900d2b111fcb6564c60f6cd1a1fc5188b b/e3/81c17900d2b111fcb6564c60f6cd1a1fc5188b
new file mode 100644 (file)
index 0000000..837c634
--- /dev/null
@@ -0,0 +1,111 @@
+Return-Path: <amdragon@mit.edu>\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 41262431FD6\r
+       for <notmuch@notmuchmail.org>; Tue,  3 Sep 2013 14:45:40 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[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 FaWogdr7r3Wc for <notmuch@notmuchmail.org>;\r
+       Tue,  3 Sep 2013 14:45:33 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.mit.edu\r
+       [18.9.25.15])\r
+       by olra.theworths.org (Postfix) with ESMTP id 43782431FD8\r
+       for <notmuch@notmuchmail.org>; Tue,  3 Sep 2013 14:45:33 -0700 (PDT)\r
+X-AuditID: 1209190f-b7fa58e000000953-74-5226587b4273\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id B5.F3.02387.B7856225; Tue,  3 Sep 2013 17:45:31 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id r83LjUJ6019871; \r
+       Tue, 3 Sep 2013 17:45:30 -0400\r
+Received: from drake.dyndns.org (26-4-182.dynamic.csail.mit.edu [18.26.4.182])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r83LjRjM026856\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Tue, 3 Sep 2013 17:45:28 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1VGyPe-0004xo-SX; Tue, 03 Sep 2013 17:45:26 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 1/9] emacs: Consistently use configured sort order\r
+Date: Tue,  3 Sep 2013 17:45:17 -0400\r
+Message-Id: <1378244725-18846-2-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <1378244725-18846-1-git-send-email-amdragon@mit.edu>\r
+References: <1378244725-18846-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFjrGIsWRmVeSWpSXmKPExsUixG6nolsdoRZk8OeloUXTdGeL1XN5LK7f\r
+       nMnswOyxc9Zddo9b91+zezxbdYs5gDmKyyYlNSezLLVI3y6BK+PW1L3sBbt4KlqvXGFsYHzN\r
+       2cXIySEhYCJx68BTFghbTOLCvfVsXYxcHEIC+xglft9pYoVwNjBK7Fx9HCpzmEniYfMRZghn\r
+       LqPEvR032EH62QQ0JLbtX84IYosISEvsvDubFcRmFoiWOHJ5BhuILSzgKnGhZxcziM0ioCox\r
+       aesMsHpeAQeJA/d/MEPcoSjR/WwCWD2ngKNE74JFYPOFgGqaVl5mn8DIv4CRYRWjbEpulW5u\r
+       YmZOcWqybnFyYl5eapGuiV5uZoleakrpJkZQcHFK8u9g/HZQ6RCjAAejEg/vivuqQUKsiWXF\r
+       lbmHGCU5mJREeY+EqgUJ8SXlp1RmJBZnxBeV5qQWH2KU4GBWEuFN8AHK8aYkVlalFuXDpKQ5\r
+       WJTEeZ89PRsoJJCeWJKanZpakFoEk5Xh4FCS4C0PB2oULEpNT61Iy8wpQUgzcXCCDOcBGv4z\r
+       DGR4cUFibnFmOkT+FKOilDhvOkizAEgiozQPrhcW/a8YxYFeEeb1B6niASYOuO5XQIOZgAan\r
+       fVYFGVySiJCSamCcsFrGY4dW2Zt3j+Z2yZ1Z80LIWshZ+p+08KIq39x0/msHPvixux09rTdh\r
+       7sJ8xwxNU8aiS6mztkXNysn3nR3QY1s329Iwd9mapC2bso8I/Y2d5uW3MF3g6wU+XzXj48Jz\r
+       vs37OCHI/6rVftP36w1/WiuvfFr4sIBpir/l3oA95/h1mHcqPVivxFKckWioxVxUnAgAPtIp\r
+       I9kCAAA=\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: Tue, 03 Sep 2013 21:45:41 -0000\r
+\r
+Previously, if `notmuch-search' was called interactively (bound to "s"\r
+in search and show, but not hello), it would always use newest-first.\r
+However, `notmuch-hello-search' (bound to "s" in hello) and\r
+`notmuch-hello-widget-search` would call it with the user-configured\r
+sort order.  This inconsistency seems unintentional, so change\r
+`notmuch-search' to use the user-configured sort order when called\r
+interactively.\r
+---\r
+ emacs/notmuch.el |   14 ++++++++++++--\r
+ 1 file changed, 12 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index f3ce840..c964186 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -906,8 +906,18 @@ Other optional parameters are used as follows:\r
+   target-thread: A thread ID (without the thread: prefix) that will be made\r
+                  current if it appears in the search results.\r
+   target-line: The line number to move to if the target thread does not\r
+-               appear in the search results."\r
+-  (interactive)\r
++               appear in the search results.\r
++\r
++When called interactively, this will prompt for a query and use\r
++the configured default sort order."\r
++  (interactive\r
++   (list\r
++    ;; Prompt for a query\r
++    nil\r
++    ;; Use the default search order (if we're doing a search from a\r
++    ;; search buffer, ignore any buffer-local overrides)\r
++    (default-value notmuch-search-oldest-first)))\r
++\r
+   (let* ((query (or query (notmuch-read-query "Notmuch search: ")))\r
+        (buffer (get-buffer-create (notmuch-search-buffer-title query))))\r
+     (switch-to-buffer buffer)\r
+-- \r
+1.7.10.4\r
+\r