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 D60D3429E25 for ; Fri, 16 Dec 2011 03:17:12 -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 Z8PIis44s9cX for ; Fri, 16 Dec 2011 03:17:11 -0800 (PST) Received: from mail-qw0-f46.google.com (mail-qw0-f46.google.com [209.85.216.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 4FED6431FD0 for ; Fri, 16 Dec 2011 03:17:11 -0800 (PST) Received: by qadc12 with SMTP id c12so1046761qad.5 for ; Fri, 16 Dec 2011 03:17:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; bh=c1FiJmjWHdKWi3RzrsKN3NsQY2xnWTrbV+Y4YdS7yFY=; b=BNN0z2pV9UQnHnE1LYiTr+YEMgrLkNIys0nws1IMCKZgnG9RV2bsdADW4n5PLIDXR9 3nW+OEaQ8KQ1c9tPMq+zfIfDE2hqeghxO7Q4/REGShzf7wHmVsBCxMn2sZYmqJJAb2RF 7NJ2vMGXOq0vVA6lmoTaa9P/hvbuzQvKMHUDw= Received: by 10.224.100.71 with SMTP id x7mr10884371qan.33.1324034230612; Fri, 16 Dec 2011 03:17:10 -0800 (PST) Received: from localhost.localdomain (c-68-80-94-73.hsd1.pa.comcast.net. [68.80.94.73]) by mx.google.com with ESMTPS id i10sm19050804qac.17.2011.12.16.03.17.08 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 16 Dec 2011 03:17:09 -0800 (PST) From: Aaron Ecay To: notmuch@notmuchmail.org Subject: [PATCH] [emacs] Add an argument to notmuch-mua-mail Date: Fri, 16 Dec 2011 06:16:45 -0500 Message-Id: <1324034205-73049-1-git-send-email-aaronecay@gmail.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: References: 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:17:13 -0000 >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" --- The previous version of this patch would break older emacsen. Not passing the return-action argument through to message-mail isn't nice, but the alternative is to conditionally pass it based on the emacs version, which is less nice. Thanks for the review Dmitry and Tomi. emacs/notmuch-mua.el | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 8824b08..da31fdd 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) -- 1.7.8