unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: David Bremner <david@tethera.net>,
	Mark Walters <markwalters1009@gmail.com>,
	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	[thread overview]
Message-ID: <1438718659-11522-1-git-send-email-david@tethera.net> (raw)
In-Reply-To: <87fv4093sl.fsf@maritornes.cs.unb.ca>

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

  parent reply	other threads:[~2015-08-04 20:06 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     ` [PATCH 1/2] emacs: define a notmuch-compose-mode based on message mode David Bremner
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           ` David Bremner [this message]
2015-08-04 20:04             ` 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=1438718659-11522-1-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).