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 A7E49431FD0 for ; Sat, 17 Dec 2011 07:25:00 -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 Iatxo83ak405 for ; Sat, 17 Dec 2011 07:24:59 -0800 (PST) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 200CF431FB6 for ; Sat, 17 Dec 2011 07:24:59 -0800 (PST) Received: by qcha6 with SMTP id a6so2940758qch.26 for ; Sat, 17 Dec 2011 07:24:57 -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=xBRstSCdj83T18rEYyNDka7Mf2x+S+75vqj0taTviV4=; b=S5PAbtKglmvp5UGmw75h+HaspUKUVNMSVs3+tSTsq6RBBs6jv9MR8MM5TBOGYsmJTo h4DLJlNSx4l34BGCyizcSW0ZufAaSX0fW3ijVkkVai3xGB4b+2xTih0m7v5vgl0N02yZ yEVFgcGLW5WsSjDzvZgW7vqQ8doFwypFok1i8= Received: by 10.229.137.83 with SMTP id v19mr3199246qct.82.1324135497349; Sat, 17 Dec 2011 07:24:57 -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 ha3sm26915169qab.2.2011.12.17.07.24.56 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 17 Dec 2011 07:24:56 -0800 (PST) From: Aaron Ecay To: notmuch@notmuchmail.org Subject: [PATCH] [emacs] Add an argument to notmuch-mua-mail Date: Sat, 17 Dec 2011 10:24:47 -0500 Message-Id: <1324135487-4130-1-git-send-email-aaronecay@gmail.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <87ty4zw9b5.fsf@gmail.com> References: <87ty4zw9b5.fsf@gmail.com> 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: Sat, 17 Dec 2011 15:25:00 -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" --- emacs/notmuch-mua.el | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 8824b08..b525762 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -124,9 +124,10 @@ list." (message-goto-to)) -(defun notmuch-mua-mail (&optional to subject other-headers continue - switch-function yank-action send-actions) - "Invoke the notmuch mail composition window." +(defun notmuch-mua-mail (&optional to subject other-headers &rest other-args) + "Invoke the notmuch mail composition window. + +OTHER-ARGS are passed through to `message-mail'." (interactive) (when notmuch-mua-user-agent-function @@ -138,8 +139,7 @@ list." (push (cons "From" (concat (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers)) - (message-mail to subject other-headers continue - switch-function yank-action send-actions) + (apply #'message-mail to subject other-headers other-args) (message-sort-headers) (message-hide-headers) (set-buffer-modified-p nil) -- 1.7.8