[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / 45 / 60c54722e656eda48f899a95c2ed767e8b9f52
1 Return-Path: <tomi.ollila@iki.fi>\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 33885431FC4\r
6         for <notmuch@notmuchmail.org>; Thu, 22 Aug 2013 10:09:03 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 RC5K-vbfAQAv for <notmuch@notmuchmail.org>;\r
16         Thu, 22 Aug 2013 10:08:54 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 93C96431FC2\r
19         for <notmuch@notmuchmail.org>; Thu, 22 Aug 2013 10:08:54 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id E4B50100086;\r
22         Thu, 22 Aug 2013 20:08:46 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Christopher Wellons <wellons@nullprogram.com>, notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH] Switch to DEF from INITIAL-INPUT in completing-read.\r
26 In-Reply-To: <m2r4dmrgwg.fsf@guru.guru-group.fi>\r
27 References: <1377103488-7425-1-git-send-email-wellons@nullprogram.com>\r
28         <m2r4dmrgwg.fsf@guru.guru-group.fi>\r
29 User-Agent: Notmuch/0.16+3~g340c058 (http://notmuchmail.org) Emacs/24.3.1\r
30         (x86_64-unknown-linux-gnu)\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
32         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
33         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
34 Date: Thu, 22 Aug 2013 20:08:46 +0300\r
35 Message-ID: <m21u5lbqld.fsf@guru.guru-group.fi>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Thu, 22 Aug 2013 17:09:03 -0000\r
51 \r
52 On Wed, Aug 21 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
53 \r
54 > On Wed, Aug 21 2013, Christopher Wellons <wellons@nullprogram.com> wrote:\r
55 >\r
56 >> As stated in the Emacs documentation, the initial-input argument is\r
57 >> deprecated because it presents a poor interface to the user. In fact,\r
58 >> with my setup where ido replaces completing-read, it's nearly unusable\r
59 >> with initial-input.\r
60 >>\r
61 >> http://www.gnu.org/software/emacs/manual/html_node/elisp/Initial-Input.html\r
62 >> ---\r
63 >\r
64 > I agree that this behaves better, but the empty content with completing-read\r
65 > looks a bit confusing (if arrow keys or tab aren't pressed)\r
66 >\r
67 > Although the completing-read documentation also deprecates (STRING . POSITION)\r
68 > format IMO I found that to work best there: i.e.\r
69 >\r
70 > -   prompt collection nil nil initial-input 'notmuch-address-history))\r
71 > +   prompt collection nil nil (cons initial-input 0) 'notmuch-address-history))\r
72 \r
73 Actually, I don't know this anymore. Yesterday the current worked a bit\r
74 badly but today while I was testing something else the current worked ok...\r
75 \r
76 ... but you're right, with ido-completing-read the current is unusable:\r
77 \r
78 (load-library "ido")\r
79 (ido-completing-read "foo" '("foo" "bar" "baz") nil nil "foo")\r
80 \r
81 and especially\r
82 \r
83 (ido-completing-read "foo" '("foo" "bar" "baz") nil nil '("foo" . 0))\r
84 \r
85 and, \r
86 \r
87 (ido-completing-read "foo" '("foo" "bar" "baz") nil nil nil nil "foo")\r
88 \r
89 surely works the best of the above...\r
90 \r
91 we could also drop the default/initial input:\r
92 \r
93 (ido-completing-read "foo" '("foo" "bar" "baz"))\r
94 (completing-read "foo" '("foo" "bar" "baz"))\r
95 \r
96 So that, with completing-read, user presses enter on empty content,\r
97 empty string is returned... and doesn't affect how ido-completing-read\r
98 does it...\r
99 \r
100 >\r
101 > I don't know how ido-replaced completing-read (just ido-completing-read ?)\r
102 > works there, though.\r
103 >\r
104 > Better get other thoughts/opinions too -- I use this:\r
105 >\r
106 > https://github.com/domo141/nottoomuch/blob/dogfood/selection-menu.rst\r
107 >\r
108 > for choosing completions -- it ignores INITIAL-INPUT (/DEF) argument\r
109 > altogether. \r
110 >\r
111 > Tomi\r
112 \r
113 Tomi\r
114 \r
115 >\r
116 >\r
117 >>  emacs/notmuch-address.el | 6 +++---\r
118 >>  1 file changed, 3 insertions(+), 3 deletions(-)\r
119 >>\r
120 >> diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el\r
121 >> index fa65cd5..e89200b 100644\r
122 >> --- a/emacs/notmuch-address.el\r
123 >> +++ b/emacs/notmuch-address.el\r
124 >> @@ -42,11 +42,11 @@ to know how address selection is made by default."\r
125 >>    :group 'notmuch-send\r
126 >>    :group 'notmuch-external)\r
127 >>  \r
128 >> -(defun notmuch-address-selection-function (prompt collection initial-input)\r
129 >> +(defun notmuch-address-selection-function (prompt collection def)\r
130 >>    "Call (`completing-read'\r
131 >> -      PROMPT COLLECTION nil nil INITIAL-INPUT 'notmuch-address-history)"\r
132 >> +      PROMPT COLLECTION nil nil nil 'notmuch-address-history DEF)"\r
133 >>    (completing-read\r
134 >> -   prompt collection nil nil initial-input 'notmuch-address-history))\r
135 >> +   prompt collection nil nil nil 'notmuch-address-history def))\r
136 >>  \r
137 >>  (defvar notmuch-address-message-alist-member\r
138 >>    '("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):"\r
139 >> -- \r
140 >> 1.8.4.rc3\r