On Fri, 16 Dec 2011 13:06:21 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote: > On Fri, 16 Dec 2011 05:30:39 -0500, Aaron Ecay <aaronecay@gmail.com> wrote: > > >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 23.3 message-mail is defined as follows: > > --8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- > (defun message-mail (&optional to subject > other-headers continue switch-function > yank-action send-actions) > ... > --8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- > > If I'd apply your patch would that break it on Emacs 23 ? > Good point! It seems like it would. Perhaps we can change `notmuch-mua-mail' to accept (&optional to subject other-headers &rest rest) and pass it all to `message-mail'. That should be compatible with both Emacs 23 and 24, and is future-proof. Regards, Dmitry > > Tomi > > > 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 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch