--- /dev/null
+Return-Path: <bremner@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 6DFC56DE1452\r
+ for <notmuch@notmuchmail.org>; Sat, 24 Oct 2015 10:44:23 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.098 tagged_above=-999 required=5 tests=[AWL=0.098]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id LHlEEV5coH3H for <notmuch@notmuchmail.org>;\r
+ Sat, 24 Oct 2015 10:44:21 -0700 (PDT)\r
+Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 9F07A6DE1034\r
+ for <notmuch@notmuchmail.org>; Sat, 24 Oct 2015 10:44:21 -0700 (PDT)\r
+Received: from remotemail by gitolite.debian.net with local (Exim 4.80)\r
+ (envelope-from <bremner@tethera.net>)\r
+ id 1Zq2q4-0001Im-An; Sat, 24 Oct 2015 17:42:44 +0000\r
+Received: (nullmailer pid 32260 invoked by uid 1000); Sat, 24 Oct 2015\r
+ 17:41:28 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
+Subject: [PATCH 1/3] emacs: replace use of notmuch-address-message-insinuate\r
+Date: Sat, 24 Oct 2015 14:41:22 -0300\r
+Message-Id: <1445708484-32189-2-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.6.1\r
+In-Reply-To: <1445708484-32189-1-git-send-email-david@tethera.net>\r
+References: <1445702019-10638-1-git-send-email-markwalters1009@gmail.com>\r
+ <1445708484-32189-1-git-send-email-david@tethera.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 24 Oct 2015 17:44:23 -0000\r
+\r
+This allows e.g. Gnus users to load this file without changing\r
+message-mode behaviour.\r
+\r
+This will disable completion for those that did not customize the\r
+variable but relied on the existence of a file named "notmuch-addresses"\r
+in their path. In the next commit the default behaviour will change to\r
+use a "workalike" internal completion mechanism.\r
+---\r
+ emacs/notmuch-address.el | 20 +++++---------------\r
+ emacs/notmuch-mua.el | 7 +++++--\r
+ 2 files changed, 10 insertions(+), 17 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el\r
+index fde3c1b..39200ef 100644\r
+--- a/emacs/notmuch-address.el\r
++++ b/emacs/notmuch-address.el\r
+@@ -23,11 +23,13 @@\r
+ \r
+ ;;\r
+ \r
+-(defcustom notmuch-address-command "notmuch-addresses"\r
++(defcustom notmuch-address-command nil\r
+ "The command which generates possible addresses. It must take a\r
+ single argument and output a list of possible matches, one per\r
+-line."\r
+- :type 'string\r
++line. The default value of nil disables address completion."\r
++ :type '(radio\r
++ (const :tag "Disable address completion" nil)\r
++ (string :tag "Use external completion command" "notmuch-addresses"))\r
+ :group 'notmuch-send\r
+ :group 'notmuch-external)\r
+ \r
+@@ -54,11 +56,6 @@ to know how address selection is made by default."\r
+ \r
+ (defvar notmuch-address-history nil)\r
+ \r
+-(defun notmuch-address-message-insinuate ()\r
+- (unless (memq notmuch-address-message-alist-member message-completion-alist)\r
+- (setq message-completion-alist\r
+- (push notmuch-address-message-alist-member message-completion-alist))))\r
+-\r
+ (defun notmuch-address-options (original)\r
+ (process-lines notmuch-address-command original))\r
+ \r
+@@ -109,11 +106,4 @@ to know how address selection is made by default."\r
+ (not (file-directory-p bin))))\r
+ (throw 'found-command bin))))))))\r
+ \r
+-;; If we can find the program specified by `notmuch-address-command',\r
+-;; insinuate ourselves into `message-mode'.\r
+-(when (notmuch-address-locate-command notmuch-address-command)\r
+- (notmuch-address-message-insinuate))\r
+-\r
+-;;\r
+-\r
+ (provide 'notmuch-address)\r
+diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
+index 57465b2..6cc9656 100644\r
+--- a/emacs/notmuch-mua.el\r
++++ b/emacs/notmuch-mua.el\r
+@@ -269,7 +269,11 @@ Note that these functions use `mail-citation-hook' if that is non-nil."\r
+ (set-buffer-modified-p nil))\r
+ \r
+ (define-derived-mode notmuch-message-mode message-mode "Message[Notmuch]"\r
+- "Notmuch message composition mode. Mostly like `message-mode'")\r
++ "Notmuch message composition mode. Mostly like `message-mode'"\r
++ (when notmuch-address-command\r
++ (unless (memq notmuch-address-message-alist-member message-completion-alist)\r
++ (setq message-completion-alist\r
++ (push notmuch-address-message-alist-member message-completion-alist)))))\r
+ \r
+ (define-key notmuch-message-mode-map (kbd "C-c C-c") #'notmuch-mua-send-and-exit)\r
+ (define-key notmuch-message-mode-map (kbd "C-c C-s") #'notmuch-mua-send)\r
+@@ -296,7 +300,6 @@ OTHER-ARGS are passed through to `message-mail'."\r
+ (message-hide-headers)\r
+ (set-buffer-modified-p nil)\r
+ (notmuch-mua-maybe-set-window-dedicated)\r
+-\r
+ (message-goto-to))\r
+ \r
+ (defcustom notmuch-identities nil\r
+-- \r
+2.6.1\r
+\r