Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2AA6D429E25 for ; Fri, 16 Dec 2011 03:06:29 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QZQBmktJhdtY for ; Fri, 16 Dec 2011 03:06:28 -0800 (PST) Received: from mail-gw3.nixu.fi (mail-gw3.nixu.fi [193.209.237.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id F2EFB431FD0 for ; Fri, 16 Dec 2011 03:06:27 -0800 (PST) Received: from pps.filterd (mail-gw3 [127.0.0.1]) by mail-gw3.nixu.fi (8.14.4/8.14.4) with SMTP id pBGB6Cl5026548; Fri, 16 Dec 2011 13:06:22 +0200 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) by mail-gw3.nixu.fi with ESMTP id 114cs0tprx-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Fri, 16 Dec 2011 13:06:22 +0200 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pBGB6LdN031644; Fri, 16 Dec 2011 13:06:21 +0200 From: Tomi Ollila To: Aaron Ecay , notmuch@notmuchmail.org Subject: Re: [PATCH] [emacs] Add an argument to notmuch-mua-mail In-Reply-To: <1324031439-72313-1-git-send-email-aaronecay@gmail.com> References: <1324031439-72313-1-git-send-email-aaronecay@gmail.com> User-Agent: Notmuch/0.10.2+93~g631d290 (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110, 1.0.211, 0.0.0000 definitions=2011-12-16_04:2011-12-16, 2011-12-16, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1112160046 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Fri, 16 Dec 2011 11:06:29 -0000 On Fri, 16 Dec 2011 05:30:39 -0500, Aaron Ecay 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 > --- 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 ? 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