Re: v4 of DB_RETRY_LOCK patches
[notmuch-archives.git] / 70 / e952aec630bd10a23f78a5f31086e592a197aa
1 Return-Path: <sebastian.fischmeister@uwaterloo.ca>\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 85BC5431FBC\r
6         for <notmuch@notmuchmail.org>; Tue, 16 Sep 2014 05:53:15 -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: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] 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 lBUQcDxCs3O2 for <notmuch@notmuchmail.org>;\r
16         Tue, 16 Sep 2014 05:53:09 -0700 (PDT)\r
17 X-Greylist: delayed 312 seconds by postgrey-1.32 at olra;\r
18         Tue, 16 Sep 2014 05:53:09 PDT\r
19 Received: from connect.uwaterloo.ca (connhub2.connect.uwaterloo.ca\r
20         [129.97.149.119]) (using TLSv1 with cipher AES128-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 99E9E431FAE\r
23         for <notmuch@notmuchmail.org>; Tue, 16 Sep 2014 05:53:09 -0700 (PDT)\r
24 Received: from CONNHUB4.connect.uwaterloo.ca (129.97.149.122) by\r
25         connhub2.connect.uwaterloo.ca (129.97.149.119) with Microsoft SMTP\r
26         Server (TLS) id 14.3.195.1; Tue, 16 Sep 2014 08:47:54 -0400\r
27 Received: from uwaterloo.ca (188.20.152.214) by connhub4.connect.uwaterloo.ca\r
28         (129.97.149.122) with Microsoft SMTP Server (TLS) id 14.3.195.1;\r
29         Tue, 16 Sep 2014 08:47:53 -0400\r
30 From: Sebastian Fischmeister <sfischme@uwaterloo.ca>\r
31 To: <notmuch@notmuchmail.org>\r
32 Subject: Better support for helm in the address completion\r
33 User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1\r
34         (x86_64-unknown-linux-gnu)\r
35 X-Homepage: http://esg.uwaterloo.ca\r
36 Date: Tue, 16 Sep 2014 08:47:53 -0400\r
37 Message-ID: <87vbonhgwe.fsf@uwaterloo.ca>\r
38 MIME-Version: 1.0\r
39 Content-Type: text/plain\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 Reply-To: sfischme@uwaterloo.ca\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Tue, 16 Sep 2014 12:53:15 -0000\r
54 \r
55 Hi,\r
56 \r
57 I noticed that the completing-read in notmuch-address-selection-function\r
58 was eating the first returned address when using helm. Here's a patch\r
59 that fixes it. The defaults are as they used to be.\r
60 \r
61 For helm use:\r
62 \r
63 (setq notmuch-address-suggest-initial-match nil)\r
64 \r
65 If you don't want to enter a new address in the selection (with helm)\r
66 use:\r
67 \r
68 (setq notmuch-address-require-match t)\r
69 \r
70   Sebastian\r
71 \r
72 diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el\r
73 index fa65cd5..d9b66cd 100644\r
74 --- a/emacs/notmuch-address.el\r
75 +++ b/emacs/notmuch-address.el\r
76 @@ -42,11 +42,25 @@ to know how address selection is made by default."\r
77    :group 'notmuch-send\r
78    :group 'notmuch-external)\r
79  \r
80 +(defcustom notmuch-address-suggest-initial-match t\r
81 +  "Pass an initial match to the address completing read."\r
82 +  :type 'boolean\r
83 +  :group 'notmuch-send)\r
84 +\r
85 +(defcustom notmuch-address-require-match nil\r
86 +  "Require a match in the address selection in `notmuch-address-selection-function'."\r
87 +  :type 'boolean\r
88 +  :group 'notmuch-send)\r
89 +\r
90  (defun notmuch-address-selection-function (prompt collection initial-input)\r
91    "Call (`completing-read'\r
92        PROMPT COLLECTION nil nil INITIAL-INPUT 'notmuch-address-history)"\r
93    (completing-read\r
94 -   prompt collection nil nil initial-input 'notmuch-address-history))\r
95 +   prompt\r
96 +   (if notmuch-address-suggest-initial-match 'collection (list initial-input collection))\r
97 +   nil notmuch-address-require-match\r
98 +   (if notmuch-address-suggest-initial-match 'initial-input nil)\r
99 +   'notmuch-address-history))\r
100  \r
101  (defvar notmuch-address-message-alist-member\r
102    '("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):"\r