--- /dev/null
+Return-Path: <bremner@tesseract.cs.unb.ca>\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 81B026DE175F\r
+ for <notmuch@notmuchmail.org>; Tue, 4 Aug 2015 13:06:24 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.146\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.146 tagged_above=-999 required=5 tests=[AWL=0.136, \r
+ T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] 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 ZMxsoRhY6bjN for <notmuch@notmuchmail.org>;\r
+ Tue, 4 Aug 2015 13:06:22 -0700 (PDT)\r
+Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id B6F696DE1510\r
+ for <notmuch@notmuchmail.org>; Tue, 4 Aug 2015 13:06:22 -0700 (PDT)\r
+Received: from remotemail by gitolite.debian.net with local (Exim 4.80)\r
+ (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+ id 1ZMiS4-0002oe-LX; Tue, 04 Aug 2015 20:04:44 +0000\r
+Received: (nullmailer pid 11579 invoked by uid 1000); Tue, 04 Aug 2015\r
+ 20:04:29 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: David Bremner <david@tethera.net>, Mark Walters\r
+ <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] emacs: define a notmuch-compose-mode based on message\r
+ mode.\r
+Date: Tue, 4 Aug 2015 22:04:18 +0200\r
+Message-Id: <1438718659-11522-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <87fv4093sl.fsf@maritornes.cs.unb.ca>\r
+References: <87fv4093sl.fsf@maritornes.cs.unb.ca>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\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: Tue, 04 Aug 2015 20:06:24 -0000\r
+\r
+This is to provide a clean way of overriding e.g. keybindings when\r
+sending mail from notmuch.\r
+---\r
+ emacs/notmuch-mua.el | 4 ++++\r
+ 1 file changed, 4 insertions(+)\r
+\r
+diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
+index 3e52d5e..1018321 100644\r
+--- a/emacs/notmuch-mua.el\r
++++ b/emacs/notmuch-mua.el\r
+@@ -268,6 +268,9 @@ Note that these functions use `mail-citation-hook' if that is non-nil."\r
+ (message-goto-body)\r
+ (set-buffer-modified-p nil))\r
+ \r
++(define-derived-mode notmuch-message-mode message-mode "Notmuch Message"\r
++ "Notmuch message composition mode. Mostly like `message-mode'")\r
++\r
+ (defun notmuch-mua-mail (&optional to subject other-headers &rest other-args)\r
+ "Invoke the notmuch mail composition window.\r
+ \r
+@@ -284,6 +287,7 @@ OTHER-ARGS are passed through to `message-mail'."\r
+ (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))\r
+ \r
+ (apply #'message-mail to subject other-headers other-args)\r
++ (notmuch-message-mode)\r
+ (message-sort-headers)\r
+ (message-hide-headers)\r
+ (set-buffer-modified-p nil)\r
+-- \r
+2.1.4\r
+\r