Re: A systematic way of handling Xapian lock errors?
[notmuch-archives.git] / e3 / 81c17900d2b111fcb6564c60f6cd1a1fc5188b
1 Return-Path: <amdragon@mit.edu>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 41262431FD6\r
6         for <notmuch@notmuchmail.org>; Tue,  3 Sep 2013 14:45:40 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id FaWogdr7r3Wc for <notmuch@notmuchmail.org>;\r
16         Tue,  3 Sep 2013 14:45:33 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.mit.edu\r
18         [18.9.25.15])\r
19         by olra.theworths.org (Postfix) with ESMTP id 43782431FD8\r
20         for <notmuch@notmuchmail.org>; Tue,  3 Sep 2013 14:45:33 -0700 (PDT)\r
21 X-AuditID: 1209190f-b7fa58e000000953-74-5226587b4273\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
23         by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id B5.F3.02387.B7856225; Tue,  3 Sep 2013 17:45:31 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
26         by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id r83LjUJ6019871; \r
27         Tue, 3 Sep 2013 17:45:30 -0400\r
28 Received: from drake.dyndns.org (26-4-182.dynamic.csail.mit.edu [18.26.4.182])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r83LjRjM026856\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Tue, 3 Sep 2013 17:45:28 -0400\r
34 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1VGyPe-0004xo-SX; Tue, 03 Sep 2013 17:45:26 -0400\r
37 From: Austin Clements <amdragon@MIT.EDU>\r
38 To: notmuch@notmuchmail.org\r
39 Subject: [PATCH v2 1/9] emacs: Consistently use configured sort order\r
40 Date: Tue,  3 Sep 2013 17:45:17 -0400\r
41 Message-Id: <1378244725-18846-2-git-send-email-amdragon@mit.edu>\r
42 X-Mailer: git-send-email 1.7.10.4\r
43 In-Reply-To: <1378244725-18846-1-git-send-email-amdragon@mit.edu>\r
44 References: <1378244725-18846-1-git-send-email-amdragon@mit.edu>\r
45 X-Brightmail-Tracker:\r
46  H4sIAAAAAAAAA+NgFjrGIsWRmVeSWpSXmKPExsUixG6nolsdoRZk8OeloUXTdGeL1XN5LK7f\r
47         nMnswOyxc9Zddo9b91+zezxbdYs5gDmKyyYlNSezLLVI3y6BK+PW1L3sBbt4KlqvXGFsYHzN\r
48         2cXIySEhYCJx68BTFghbTOLCvfVsXYxcHEIC+xglft9pYoVwNjBK7Fx9HCpzmEniYfMRZghn\r
49         LqPEvR032EH62QQ0JLbtX84IYosISEvsvDubFcRmFoiWOHJ5BhuILSzgKnGhZxcziM0ioCox\r
50         aesMsHpeAQeJA/d/MEPcoSjR/WwCWD2ngKNE74JFYPOFgGqaVl5mn8DIv4CRYRWjbEpulW5u\r
51         YmZOcWqybnFyYl5eapGuiV5uZoleakrpJkZQcHFK8u9g/HZQ6RCjAAejEg/vivuqQUKsiWXF\r
52         lbmHGCU5mJREeY+EqgUJ8SXlp1RmJBZnxBeV5qQWH2KU4GBWEuFN8AHK8aYkVlalFuXDpKQ5\r
53         WJTEeZ89PRsoJJCeWJKanZpakFoEk5Xh4FCS4C0PB2oULEpNT61Iy8wpQUgzcXCCDOcBGv4z\r
54         DGR4cUFibnFmOkT+FKOilDhvOkizAEgiozQPrhcW/a8YxYFeEeb1B6niASYOuO5XQIOZgAan\r
55         fVYFGVySiJCSamCcsFrGY4dW2Zt3j+Z2yZ1Z80LIWshZ+p+08KIq39x0/msHPvixux09rTdh\r
56         7sJ8xwxNU8aiS6mztkXNysn3nR3QY1s329Iwd9mapC2bso8I/Y2d5uW3MF3g6wU+XzXj48Jz\r
57         vs37OCHI/6rVftP36w1/WiuvfFr4sIBpir/l3oA95/h1mHcqPVivxFKckWioxVxUnAgAPtIp\r
58         I9kCAAA=\r
59 X-BeenThere: notmuch@notmuchmail.org\r
60 X-Mailman-Version: 2.1.13\r
61 Precedence: list\r
62 List-Id: "Use and development of the notmuch mail system."\r
63         <notmuch.notmuchmail.org>\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
67 List-Post: <mailto:notmuch@notmuchmail.org>\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
71 X-List-Received-Date: Tue, 03 Sep 2013 21:45:41 -0000\r
72 \r
73 Previously, if `notmuch-search' was called interactively (bound to "s"\r
74 in search and show, but not hello), it would always use newest-first.\r
75 However, `notmuch-hello-search' (bound to "s" in hello) and\r
76 `notmuch-hello-widget-search` would call it with the user-configured\r
77 sort order.  This inconsistency seems unintentional, so change\r
78 `notmuch-search' to use the user-configured sort order when called\r
79 interactively.\r
80 ---\r
81  emacs/notmuch.el |   14 ++++++++++++--\r
82  1 file changed, 12 insertions(+), 2 deletions(-)\r
83 \r
84 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
85 index f3ce840..c964186 100644\r
86 --- a/emacs/notmuch.el\r
87 +++ b/emacs/notmuch.el\r
88 @@ -906,8 +906,18 @@ Other optional parameters are used as follows:\r
89    target-thread: A thread ID (without the thread: prefix) that will be made\r
90                   current if it appears in the search results.\r
91    target-line: The line number to move to if the target thread does not\r
92 -               appear in the search results."\r
93 -  (interactive)\r
94 +               appear in the search results.\r
95 +\r
96 +When called interactively, this will prompt for a query and use\r
97 +the configured default sort order."\r
98 +  (interactive\r
99 +   (list\r
100 +    ;; Prompt for a query\r
101 +    nil\r
102 +    ;; Use the default search order (if we're doing a search from a\r
103 +    ;; search buffer, ignore any buffer-local overrides)\r
104 +    (default-value notmuch-search-oldest-first)))\r
105 +\r
106    (let* ((query (or query (notmuch-read-query "Notmuch search: ")))\r
107          (buffer (get-buffer-create (notmuch-search-buffer-title query))))\r
108      (switch-to-buffer buffer)\r
109 -- \r
110 1.7.10.4\r
111 \r