--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\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 33885431FC4\r
+ for <notmuch@notmuchmail.org>; Thu, 22 Aug 2013 10:09:03 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ 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 RC5K-vbfAQAv for <notmuch@notmuchmail.org>;\r
+ Thu, 22 Aug 2013 10:08:54 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 93C96431FC2\r
+ for <notmuch@notmuchmail.org>; Thu, 22 Aug 2013 10:08:54 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id E4B50100086;\r
+ Thu, 22 Aug 2013 20:08:46 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Christopher Wellons <wellons@nullprogram.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] Switch to DEF from INITIAL-INPUT in completing-read.\r
+In-Reply-To: <m2r4dmrgwg.fsf@guru.guru-group.fi>\r
+References: <1377103488-7425-1-git-send-email-wellons@nullprogram.com>\r
+ <m2r4dmrgwg.fsf@guru.guru-group.fi>\r
+User-Agent: Notmuch/0.16+3~g340c058 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Thu, 22 Aug 2013 20:08:46 +0300\r
+Message-ID: <m21u5lbqld.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\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: Thu, 22 Aug 2013 17:09:03 -0000\r
+\r
+On Wed, Aug 21 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+\r
+> On Wed, Aug 21 2013, Christopher Wellons <wellons@nullprogram.com> wrote:\r
+>\r
+>> As stated in the Emacs documentation, the initial-input argument is\r
+>> deprecated because it presents a poor interface to the user. In fact,\r
+>> with my setup where ido replaces completing-read, it's nearly unusable\r
+>> with initial-input.\r
+>>\r
+>> http://www.gnu.org/software/emacs/manual/html_node/elisp/Initial-Input.html\r
+>> ---\r
+>\r
+> I agree that this behaves better, but the empty content with completing-read\r
+> looks a bit confusing (if arrow keys or tab aren't pressed)\r
+>\r
+> Although the completing-read documentation also deprecates (STRING . POSITION)\r
+> format IMO I found that to work best there: i.e.\r
+>\r
+> - prompt collection nil nil initial-input 'notmuch-address-history))\r
+> + prompt collection nil nil (cons initial-input 0) 'notmuch-address-history))\r
+\r
+Actually, I don't know this anymore. Yesterday the current worked a bit\r
+badly but today while I was testing something else the current worked ok...\r
+\r
+... but you're right, with ido-completing-read the current is unusable:\r
+\r
+(load-library "ido")\r
+(ido-completing-read "foo" '("foo" "bar" "baz") nil nil "foo")\r
+\r
+and especially\r
+\r
+(ido-completing-read "foo" '("foo" "bar" "baz") nil nil '("foo" . 0))\r
+\r
+and, \r
+\r
+(ido-completing-read "foo" '("foo" "bar" "baz") nil nil nil nil "foo")\r
+\r
+surely works the best of the above...\r
+\r
+we could also drop the default/initial input:\r
+\r
+(ido-completing-read "foo" '("foo" "bar" "baz"))\r
+(completing-read "foo" '("foo" "bar" "baz"))\r
+\r
+So that, with completing-read, user presses enter on empty content,\r
+empty string is returned... and doesn't affect how ido-completing-read\r
+does it...\r
+\r
+>\r
+> I don't know how ido-replaced completing-read (just ido-completing-read ?)\r
+> works there, though.\r
+>\r
+> Better get other thoughts/opinions too -- I use this:\r
+>\r
+> https://github.com/domo141/nottoomuch/blob/dogfood/selection-menu.rst\r
+>\r
+> for choosing completions -- it ignores INITIAL-INPUT (/DEF) argument\r
+> altogether. \r
+>\r
+> Tomi\r
+\r
+Tomi\r
+\r
+>\r
+>\r
+>> emacs/notmuch-address.el | 6 +++---\r
+>> 1 file changed, 3 insertions(+), 3 deletions(-)\r
+>>\r
+>> diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el\r
+>> index fa65cd5..e89200b 100644\r
+>> --- a/emacs/notmuch-address.el\r
+>> +++ b/emacs/notmuch-address.el\r
+>> @@ -42,11 +42,11 @@ to know how address selection is made by default."\r
+>> :group 'notmuch-send\r
+>> :group 'notmuch-external)\r
+>> \r
+>> -(defun notmuch-address-selection-function (prompt collection initial-input)\r
+>> +(defun notmuch-address-selection-function (prompt collection def)\r
+>> "Call (`completing-read'\r
+>> - PROMPT COLLECTION nil nil INITIAL-INPUT 'notmuch-address-history)"\r
+>> + PROMPT COLLECTION nil nil nil 'notmuch-address-history DEF)"\r
+>> (completing-read\r
+>> - prompt collection nil nil initial-input 'notmuch-address-history))\r
+>> + prompt collection nil nil nil 'notmuch-address-history def))\r
+>> \r
+>> (defvar notmuch-address-message-alist-member\r
+>> '("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):"\r
+>> -- \r
+>> 1.8.4.rc3\r