From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id B0C5540CAE4 for ; Mon, 9 Apr 2012 11:42:06 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.098 X-Spam-Level: X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 VPUgNIrZDc2p for ; Mon, 9 Apr 2012 11:42:06 -0700 (PDT) Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D14C340CAC7 for ; Mon, 9 Apr 2012 11:42:05 -0700 (PDT) Received: from smtp.qmul.ac.uk ([138.37.6.40]) by mail2.qmul.ac.uk with esmtp (Exim 4.71) (envelope-from ) id 1SHJXP-0008GX-Qq; Mon, 09 Apr 2012 19:42:04 +0100 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1SHJXP-0004D0-HY; Mon, 09 Apr 2012 19:42:03 +0100 From: Mark Walters To: Jameson Graef Rollins , Notmuch Mail Subject: Re: [PATCH 7/8] emacs: modify show tag functions to use new notmuch-tag interface In-Reply-To: <1333845338-22960-8-git-send-email-jrollins@finestructure.net> References: <1333354853-25729-1-git-send-email-jrollins@finestructure.net> <1333845338-22960-1-git-send-email-jrollins@finestructure.net> <1333845338-22960-2-git-send-email-jrollins@finestructure.net> <1333845338-22960-3-git-send-email-jrollins@finestructure.net> <1333845338-22960-4-git-send-email-jrollins@finestructure.net> <1333845338-22960-5-git-send-email-jrollins@finestructure.net> <1333845338-22960-6-git-send-email-jrollins@finestructure.net> <1333845338-22960-7-git-send-email-jrollins@finestructure.net> <1333845338-22960-8-git-send-email-jrollins@finestructure.net> User-Agent: Notmuch/0.12+111~g5c30f66 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Mon, 09 Apr 2012 19:42:20 +0100 Message-ID: <87y5q4lpbn.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Sender-Host-Address: 94.192.233.223 X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: b6ab2e450acd5a52c128883779276f2e (of first 20000 bytes) X-SpamAssassin-Score: -1.8 X-SpamAssassin-SpamBar: - X-SpamAssassin-Report: The QM spam filters have analysed this message to determine if it is spam. We require at least 5.0 points to mark a message as spam. This message scored -1.8 points. Summary of the scoring: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [138.37.6.40 listed in list.dnswl.org] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * 0.5 AWL AWL: From: address is in the auto white-list X-QM-Scan-Virus: ClamAV says the message is clean 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: Mon, 09 Apr 2012 18:42:06 -0000 On Sun, 08 Apr 2012, Jameson Graef Rollins wrote: > The main change here is to modify argument parsing so as to not force > tag-changes to be a list, and to let notmuch-tag handle prompting the > user when required. doc strings are also updated and cleaned up. One other comment on this patch is that it would be nice to have a tag region in show view as well. Of course that is a feature request rather than a requirement for this patch series! Best wishes Mark > --- > emacs/notmuch-show.el | 26 +++++++++++++++----------- > 1 files changed, 15 insertions(+), 11 deletions(-) > > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el > index a4c313d..69bca02 100644 > --- a/emacs/notmuch-show.el > +++ b/emacs/notmuch-show.el > @@ -1641,22 +1641,26 @@ TAG-CHANGES is a list of tag operations for `notmuch-tag'." > (let* ((current-tags (notmuch-show-get-tags)) > (new-tags (notmuch-update-tags current-tags tag-changes))) > (unless (equal current-tags new-tags) > - (apply 'notmuch-tag (notmuch-show-get-message-id) tag-changes) > + (funcall 'notmuch-tag (notmuch-show-get-message-id) tag-changes) > (notmuch-show-set-tags new-tags)))) > > -(defun notmuch-show-tag (&optional initial-input) > - "Change tags for the current message, read input from the minibuffer." > +(defun notmuch-show-tag (&optional tag-changes) > + "Change tags for the current message. > + > +See `notmuch-tag' for information on the format of TAG-CHANGES." > (interactive) > - (let ((tag-changes (notmuch-read-tag-changes > - initial-input (notmuch-show-get-message-id)))) > - (apply 'notmuch-show-tag-message tag-changes))) > + (setq tag-changes (funcall 'notmuch-tag (notmuch-show-get-message-id) tag-changes)) > + (let* ((current-tags (notmuch-show-get-tags)) > + (new-tags (notmuch-update-tags current-tags tag-changes))) > + (unless (equal current-tags new-tags) > + (notmuch-show-set-tags new-tags)))) > > -(defun notmuch-show-tag-all (&rest tag-changes) > - "Change tags for all messages in the current buffer. > +(defun notmuch-show-tag-all (&optional tag-changes) > + "Change tags for all messages in the current show buffer. > > -TAG-CHANGES is a list of tag operations for `notmuch-tag'." > - (interactive (notmuch-read-tag-changes nil notmuch-show-thread-id)) > - (apply 'notmuch-tag (notmuch-show-get-messages-ids-search) tag-changes) > +See `notmuch-tag' for information on the format of TAG-CHANGES." > + (interactive) > + (setq tag-changes (funcall 'notmuch-tag (notmuch-show-get-messages-ids-search) tag-changes)) > (notmuch-show-mapc > (lambda () > (let* ((current-tags (notmuch-show-get-tags)) > -- > 1.7.9.1 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch