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 B0DD5429E25 for ; Fri, 16 Dec 2011 03:24:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.7 X-Spam-Level: * X-Spam-Status: No, score=1.7 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, RCVD_IN_DNSWL_LOW=-0.7] 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 k+P69ZJalQwM for ; Fri, 16 Dec 2011 03:24:13 -0800 (PST) Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D4BD1431FD0 for ; Fri, 16 Dec 2011 03:24:12 -0800 (PST) Received: by faaa5 with SMTP id a5so3133556faa.26 for ; Fri, 16 Dec 2011 03:24:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=hyElZ6DUucxCKFqBdogU8dOE0/pZvzfdl0s5tHAOz1k=; b=hjeD21d6IsdKaQR3EZ8rcmTD9CLVEHhxpT8FIQx4Xy1IFJCvwXm3o7JkmwNrUGa2I5 raIMIsxM52V+GAnENu57Ggyp15ERAD7MiYb1Qyi3ty/zvBa9NA18IROaz3mRtbdrslsD CgTth3stZUuH2xcJrjXyy/gwJSvpjiek/xyMA= Received: by 10.180.96.103 with SMTP id dr7mr12072973wib.16.1324034651567; Fri, 16 Dec 2011 03:24:11 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id v10sm12636125wiy.23.2011.12.16.03.24.10 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 16 Dec 2011 03:24:10 -0800 (PST) From: Dmitry Kurochkin To: Tomi Ollila , Aaron Ecay , notmuch@notmuchmail.org Subject: Re: [PATCH] [emacs] Add an argument to notmuch-mua-mail In-Reply-To: References: <1324031439-72313-1-git-send-email-aaronecay@gmail.com> User-Agent: Notmuch/0.10.2+96~g74e5ae5 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Fri, 16 Dec 2011 15:23:31 +0400 Message-ID: <87ty50sqto.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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:24:13 -0000 On Fri, 16 Dec 2011 13:06:21 +0200, Tomi Ollila wrote: > 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 ? > 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