--- /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 4A14E6DE17FD\r
+ for <notmuch@notmuchmail.org>; Sat, 1 Aug 2015 02:47:21 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.153\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.153 tagged_above=-999 required=5 tests=[AWL=0.143, \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 GlOT3I2NMzBG for <notmuch@notmuchmail.org>;\r
+ Sat, 1 Aug 2015 02:47:19 -0700 (PDT)\r
+Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id A88646DE17F7\r
+ for <notmuch@notmuchmail.org>; Sat, 1 Aug 2015 02:47:19 -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 1ZLTMM-0004tf-Gg; Sat, 01 Aug 2015 09:45:42 +0000\r
+Received: (nullmailer pid 29354 invoked by uid 1000); Sat, 01 Aug 2015\r
+ 09:45:01 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] emacs: define a notmuch-compose-mode based on message\r
+ mode.\r
+Date: Sat, 1 Aug 2015 11:44:55 +0200\r
+Message-Id: <1438422296-29087-2-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <1438422296-29087-1-git-send-email-david@tethera.net>\r
+References: <87vbdrysd7.fsf@qmul.ac.uk>\r
+ <1438422296-29087-1-git-send-email-david@tethera.net>\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: Sat, 01 Aug 2015 09:47:21 -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 33f1399..a7d3eaa 100644\r
+--- a/emacs/notmuch-mua.el\r
++++ b/emacs/notmuch-mua.el\r
+@@ -265,6 +265,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-compose-mode message-mode "notmuch-compose"\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
+@@ -281,6 +284,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-compose-mode)\r
+ (message-sort-headers)\r
+ (message-hide-headers)\r
+ (set-buffer-modified-p nil)\r
+-- \r
+2.1.4\r
+\r