unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH] [emacs] Add an argument to notmuch-mua-mail
Date: Fri, 16 Dec 2011 05:30:39 -0500	[thread overview]
Message-ID: <1324031439-72313-1-git-send-email-aaronecay@gmail.com> (raw)

From the emacs changelog:

  ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
  passes it to the mail user agent function.  This argument specifies an
  action for returning to the caller after finishing with the mail.
  This is currently used by Rmail to delete a mail window.

Under Emacs 24, notmuch breaks when this argument is passed to it by a
function in another part of Emacs.  One example of a functon that does
this is report-emacs-bug -- so notmuch users cannot file emacs bug
reports!

This patch also adds a &rest argument to the arg-list of this function,
to future-proof against such changes.  This is adapted from the approach
taken by message-mail, a similar function built into emacs.

This patch was originally submitted by richardmurri@gmail.com on Aug. 1:
id:"877h6x6oor.fsf@veracitynetworks.com"
Signed-off-by: Aaron Ecay <aaronecay@gmail.com>
---
 emacs/notmuch-mua.el |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 8824b08..23552ad 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -125,7 +125,8 @@ list."
   (message-goto-to))
 
 (defun notmuch-mua-mail (&optional to subject other-headers continue
-				   switch-function yank-action send-actions)
+				   switch-function yank-action send-actions
+				   return-action &rest ignored)
   "Invoke the notmuch mail composition window."
   (interactive)
 
@@ -139,7 +140,8 @@ list."
 			(notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))
 
   (message-mail to subject other-headers continue
-		switch-function yank-action send-actions)
+		switch-function yank-action send-actions
+		return-action)
   (message-sort-headers)
   (message-hide-headers)
   (set-buffer-modified-p nil)
-- 
1.7.8

             reply	other threads:[~2011-12-16 10:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-16 10:30 Aaron Ecay [this message]
2011-12-16 11:04 ` [PATCH] [emacs] Add an argument to notmuch-mua-mail Dmitry Kurochkin
2011-12-16 11:06 ` Tomi Ollila
2011-12-16 11:16   ` Aaron Ecay
2011-12-16 11:40     ` Dmitry Kurochkin
2011-12-16 11:23   ` Dmitry Kurochkin
2011-12-17 10:23     ` Tomi Ollila
2011-12-17 10:41       ` Aaron Ecay
2011-12-17 13:48         ` Tomi Ollila
2011-12-17 14:40         ` Dmitry Kurochkin
2011-12-17 15:24           ` Aaron Ecay
2011-12-17 15:31             ` Dmitry Kurochkin
2011-12-17 19:51             ` Tomi Ollila
2011-12-18 12:22             ` 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=1324031439-72313-1-git-send-email-aaronecay@gmail.com \
    --to=aaronecay@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).