From: David Bremner <david@tethera.net>
To: Mark Walters <markwalters1009@gmail.com>, 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 [thread overview]
Message-ID: <1438422296-29087-2-git-send-email-david@tethera.net> (raw)
In-Reply-To: <1438422296-29087-1-git-send-email-david@tethera.net>
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
next prev parent reply other threads:[~2015-08-01 9:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 20:06 Emacs: notmuch-mua-mail throws error if notmuch-fcc-dirs does not exist Felix Konstantin Maurer
2015-07-11 8:21 ` David Bremner
2015-07-11 9:07 ` Mark Walters
2015-08-01 9:44 ` Stop stomping on global fcc related variables David Bremner
2015-08-01 9:44 ` David Bremner [this message]
2015-08-01 9:44 ` [PATCH 2/2] emacs: make modifications to message Fcc vars buffer-local David Bremner
2015-08-03 7:46 ` Mark Walters
2015-08-03 8:25 ` David Bremner
2015-08-03 9:03 ` Tomi Ollila
2015-08-04 20:04 ` [PATCH 1/2] emacs: define a notmuch-compose-mode based on message mode David Bremner
2015-08-04 20:04 ` [PATCH 2/2] emacs: make modifications to message Fcc vars buffer-local David Bremner
2015-08-06 19:08 ` Tomi Ollila
2015-08-06 20:54 ` David Bremner
2015-08-07 4:11 ` Tomi Ollila
2017-05-02 12:57 ` David Bremner
2015-08-07 19:31 ` David Bremner
2015-08-07 19:38 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438422296-29087-2-git-send-email-david@tethera.net \
--to=david@tethera.net \
--cc=markwalters1009@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).