From a153f8957a8dd296c1003768fe36f71ee1093c3a Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 1 Aug 2015 11:44:55 +0200 Subject: [PATCH] [PATCH 1/2] emacs: define a notmuch-compose-mode based on message mode. --- 6b/4c57c98ab15a44768f5ad2cc484a4270e3d046 | 79 +++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 6b/4c57c98ab15a44768f5ad2cc484a4270e3d046 diff --git a/6b/4c57c98ab15a44768f5ad2cc484a4270e3d046 b/6b/4c57c98ab15a44768f5ad2cc484a4270e3d046 new file mode 100644 index 000000000..69a5965ed --- /dev/null +++ b/6b/4c57c98ab15a44768f5ad2cc484a4270e3d046 @@ -0,0 +1,79 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 4A14E6DE17FD + for ; Sat, 1 Aug 2015 02:47:21 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.153 +X-Spam-Level: +X-Spam-Status: No, score=0.153 tagged_above=-999 required=5 tests=[AWL=0.143, + T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id GlOT3I2NMzBG for ; + Sat, 1 Aug 2015 02:47:19 -0700 (PDT) +Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224]) + by arlo.cworth.org (Postfix) with ESMTPS id A88646DE17F7 + for ; Sat, 1 Aug 2015 02:47:19 -0700 (PDT) +Received: from remotemail by gitolite.debian.net with local (Exim 4.80) + (envelope-from ) + id 1ZLTMM-0004tf-Gg; Sat, 01 Aug 2015 09:45:42 +0000 +Received: (nullmailer pid 29354 invoked by uid 1000); Sat, 01 Aug 2015 + 09:45:01 -0000 +From: David Bremner +To: Mark Walters , notmuch@notmuchmail.org +Subject: [PATCH 1/2] emacs: define a notmuch-compose-mode based on message + mode. +Date: Sat, 1 Aug 2015 11:44:55 +0200 +Message-Id: <1438422296-29087-2-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <1438422296-29087-1-git-send-email-david@tethera.net> +References: <87vbdrysd7.fsf@qmul.ac.uk> + <1438422296-29087-1-git-send-email-david@tethera.net> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 01 Aug 2015 09:47:21 -0000 + +This is to provide a clean way of overriding e.g. keybindings when +sending mail from notmuch. +--- + emacs/notmuch-mua.el | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el +index 33f1399..a7d3eaa 100644 +--- a/emacs/notmuch-mua.el ++++ b/emacs/notmuch-mua.el +@@ -265,6 +265,9 @@ Note that these functions use `mail-citation-hook' if that is non-nil." + (message-goto-body) + (set-buffer-modified-p nil)) + ++(define-derived-mode notmuch-compose-mode message-mode "notmuch-compose" ++ "Notmuch message composition mode. Mostly like `message-mode'") ++ + (defun notmuch-mua-mail (&optional to subject other-headers &rest other-args) + "Invoke the notmuch mail composition window. + +@@ -281,6 +284,7 @@ OTHER-ARGS are passed through to `message-mail'." + (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers)) + + (apply #'message-mail to subject other-headers other-args) ++ (notmuch-compose-mode) + (message-sort-headers) + (message-hide-headers) + (set-buffer-modified-p nil) +-- +2.1.4 + -- 2.26.2