From: David Bremner Date: Tue, 4 Aug 2015 20:04:18 +0000 (+0200) Subject: [PATCH 1/2] emacs: define a notmuch-compose-mode based on message mode. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=52172ce786797849ec5627906b97136730a807b5;p=notmuch-archives.git [PATCH 1/2] emacs: define a notmuch-compose-mode based on message mode. --- diff --git a/53/0d6af3b443bb467670d98eeb208dab2f4f0f76 b/53/0d6af3b443bb467670d98eeb208dab2f4f0f76 new file mode 100644 index 000000000..1f36638b4 --- /dev/null +++ b/53/0d6af3b443bb467670d98eeb208dab2f4f0f76 @@ -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 81B026DE175F + for ; Tue, 4 Aug 2015 13:06:24 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.146 +X-Spam-Level: +X-Spam-Status: No, score=0.146 tagged_above=-999 required=5 tests=[AWL=0.136, + 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 ZMxsoRhY6bjN for ; + Tue, 4 Aug 2015 13:06:22 -0700 (PDT) +Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224]) + by arlo.cworth.org (Postfix) with ESMTPS id B6F696DE1510 + for ; Tue, 4 Aug 2015 13:06:22 -0700 (PDT) +Received: from remotemail by gitolite.debian.net with local (Exim 4.80) + (envelope-from ) + id 1ZMiS4-0002oe-LX; Tue, 04 Aug 2015 20:04:44 +0000 +Received: (nullmailer pid 11579 invoked by uid 1000); Tue, 04 Aug 2015 + 20:04:29 -0000 +From: David Bremner +To: David Bremner , Mark Walters + , notmuch@notmuchmail.org +Subject: [PATCH 1/2] emacs: define a notmuch-compose-mode based on message + mode. +Date: Tue, 4 Aug 2015 22:04:18 +0200 +Message-Id: <1438718659-11522-1-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <87fv4093sl.fsf@maritornes.cs.unb.ca> +References: <87fv4093sl.fsf@maritornes.cs.unb.ca> +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: Tue, 04 Aug 2015 20:06:24 -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 3e52d5e..1018321 100644 +--- a/emacs/notmuch-mua.el ++++ b/emacs/notmuch-mua.el +@@ -268,6 +268,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-message-mode message-mode "Notmuch Message" ++ "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. + +@@ -284,6 +287,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-message-mode) + (message-sort-headers) + (message-hide-headers) + (set-buffer-modified-p nil) +-- +2.1.4 +