[PATCH] Switch to DEF from INITIAL-INPUT in completing-read.
authorChristopher Wellons <wellons@nullprogram.com>
Wed, 21 Aug 2013 16:44:48 +0000 (12:44 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:56:31 +0000 (09:56 -0800)
2e/89e1a9f7102596ebacbdc70499ff8c97b3a224 [new file with mode: 0644]

diff --git a/2e/89e1a9f7102596ebacbdc70499ff8c97b3a224 b/2e/89e1a9f7102596ebacbdc70499ff8c97b3a224
new file mode 100644 (file)
index 0000000..bad9315
--- /dev/null
@@ -0,0 +1,81 @@
+Return-Path: <wellons@nullprogram.com>\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 500FC431FC7\r
+       for <notmuch@notmuchmail.org>; Wed, 21 Aug 2013 10:08:52 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Improper folded header field made up\r
+       entirely of whitespace (char 20 hex): X-Spam-Report: ...T_ADDRESS@@\r
+       for details.\n \n Content previ[...]\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 9AfmLlHpbkXi for <notmuch@notmuchmail.org>;\r
+       Wed, 21 Aug 2013 10:08:46 -0700 (PDT)\r
+Received: from mail.nullprogram.com (mail.nullprogram.com [192.241.191.137])\r
+       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id EB2B9431FAF\r
+       for <notmuch@notmuchmail.org>; Wed, 21 Aug 2013 10:08:45 -0700 (PDT)\r
+Received: from localhost ([127.0.0.1] helo=wellocc1-ld1.jhuapl.edu)\r
+       by mail.nullprogram.com with esmtp (Exim 4.80)\r
+       (envelope-from <wellons@nullprogram.com>)\r
+       id 1VCBX1-0003PH-Ko; Wed, 21 Aug 2013 16:45:15 +0000\r
+From: Christopher Wellons <wellons@nullprogram.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] Switch to DEF from INITIAL-INPUT in completing-read.\r
+Date: Wed, 21 Aug 2013 12:44:48 -0400\r
+Message-Id: <1377103488-7425-1-git-send-email-wellons@nullprogram.com>\r
+X-Mailer: git-send-email 1.8.4.rc3\r
+Cc: Christopher Wellons <wellons@nullprogram.com>\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: Wed, 21 Aug 2013 17:08:52 -0000\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
+ 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
+\r