--- /dev/null
+Return-Path: <sojkam1@fel.cvut.cz>\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 8739B6DE177D\r
+ for <notmuch@notmuchmail.org>; Tue, 3 Nov 2015 13:02:33 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.064\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.064 tagged_above=-999 required=5 tests=[AWL=1.786,\r
+ RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.55] 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 cYBCd7aRza5d for <notmuch@notmuchmail.org>;\r
+ Tue, 3 Nov 2015 13:02:27 -0800 (PST)\r
+Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
+ by arlo.cworth.org (Postfix) with ESMTP id BBB0C6DE0281\r
+ for <notmuch@notmuchmail.org>; Tue, 3 Nov 2015 13:02:26 -0800 (PST)\r
+Received: from localhost (unknown [192.168.200.7])\r
+ by max.feld.cvut.cz (Postfix) with ESMTP id CE46519F465D\r
+ for <notmuch@notmuchmail.org>; Tue, 3 Nov 2015 22:02:25 +0100 (CET)\r
+X-Virus-Scanned: IMAP STYX AMAVIS\r
+Received: from max.feld.cvut.cz ([192.168.200.1])\r
+ by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, port 10044)\r
+ with ESMTP id aPByW6quzSLZ for <notmuch@notmuchmail.org>;\r
+ Tue, 3 Nov 2015 22:02:24 +0100 (CET)\r
+Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
+ by max.feld.cvut.cz (Postfix) with ESMTP id 41C5919F4677\r
+ for <notmuch@notmuchmail.org>; Tue, 3 Nov 2015 22:02:23 +0100 (CET)\r
+Received: from wsh by steelpick.2x.cz with local (Exim 4.86)\r
+ (envelope-from <sojkam1@fel.cvut.cz>)\r
+ id 1Ztiij-00073n-Ld; Tue, 03 Nov 2015 22:02:21 +0100\r
+From: Michal Sojka <sojkam1@fel.cvut.cz>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] emacs: Make notmuch-message-mode play nicely with flyspell\r
+Date: Tue, 3 Nov 2015 22:02:12 +0100\r
+Message-Id: <1446584532-27101-1-git-send-email-sojkam1@fel.cvut.cz>\r
+X-Mailer: git-send-email 2.5.3\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: Tue, 03 Nov 2015 21:02:33 -0000\r
+\r
+Flyspell mode uses a special setting for message-mode to not\r
+spell-check message headers except Subject. Apply this setting also to\r
+notmuch-message-mode.\r
+---\r
+ emacs/notmuch-mua.el | 2 ++\r
+ 1 file changed, 2 insertions(+)\r
+\r
+diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
+index fd98ea4..466edd7 100644\r
+--- a/emacs/notmuch-mua.el\r
++++ b/emacs/notmuch-mua.el\r
+@@ -273,6 +273,8 @@ Note that these functions use `mail-citation-hook' if that is non-nil."\r
+ (when notmuch-address-command\r
+ (notmuch-address-setup)))\r
+ \r
++(put 'notmuch-message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)\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
+ \r
+-- \r
+2.5.3\r
+\r