From: Dmitry Kurochkin Date: Mon, 30 Jan 2012 05:25:18 +0000 (+0400) Subject: Re: [PATCH v2 11/13] emacs: code cleanup in `notmuch-show-operate-all', no functional... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=70fdaa522f82b9be3e2b35c35640f78da1445ca1;p=notmuch-archives.git Re: [PATCH v2 11/13] emacs: code cleanup in `notmuch-show-operate-all', no functional changes --- diff --git a/e4/4d9451e8a8a46de80808c56be9c167c39ce534 b/e4/4d9451e8a8a46de80808c56be9c167c39ce534 new file mode 100644 index 000000000..440d7f7f0 --- /dev/null +++ b/e4/4d9451e8a8a46de80808c56be9c167c39ce534 @@ -0,0 +1,119 @@ +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 AC7FB431E64 + for ; Sun, 29 Jan 2012 21:26:29 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, 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 9ckzKHPvkd83 for ; + Sun, 29 Jan 2012 21:26:29 -0800 (PST) +Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com + [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 091B8431FBC + for ; Sun, 29 Jan 2012 21:26:28 -0800 (PST) +Received: by bke11 with SMTP id 11so1047572bke.26 + for ; Sun, 29 Jan 2012 21:26:27 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; + h=from:to:cc:subject:in-reply-to:references:user-agent:date + :message-id:mime-version:content-type; + bh=pvmvdfYBBfmcWmLPceFPEKHZOKnoERxfULt62rJigjI=; + b=yDRmoJ0ojRQRZ6HPg/DQX83M1oTc5D/e8/HmZAAQoWpm6OF9c94N4FErWADUmbAD9A + S0C6myIyfff3edcB4AfGjLXFdMheTB0vvJ1qSe4xpCW6aE+4/Yykcl/n2Rmd29frBDf9 + h5FiDHsGLXDWxhQbx91kDV5hCpc/2WLu9Xsj8= +Received: by 10.204.152.216 with SMTP id h24mr7960030bkw.15.1327901187589; + Sun, 29 Jan 2012 21:26:27 -0800 (PST) +Received: from localhost ([91.144.186.21]) + by mx.google.com with ESMTPS id cg2sm35090204bkb.12.2012.01.29.21.26.26 + (version=TLSv1/SSLv3 cipher=OTHER); + Sun, 29 Jan 2012 21:26:27 -0800 (PST) +From: Dmitry Kurochkin +To: Austin Clements +Subject: Re: [PATCH v2 11/13] emacs: code cleanup in + `notmuch-show-operate-all', no functional changes +In-Reply-To: <20120130045908.GO17991@mit.edu> +References: <1327725684-5887-1-git-send-email-dmitry.kurochkin@gmail.com> + <1327890382-548-1-git-send-email-dmitry.kurochkin@gmail.com> + <1327890382-548-12-git-send-email-dmitry.kurochkin@gmail.com> + <20120130045908.GO17991@mit.edu> +User-Agent: Notmuch/0.11+139~gd9b7cab (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-pc-linux-gnu) +Date: Mon, 30 Jan 2012 09:25:18 +0400 +Message-ID: <87hazd224h.fsf@gmail.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Cc: notmuch@notmuchmail.org +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, 30 Jan 2012 05:26:29 -0000 + +On Sun, 29 Jan 2012 23:59:08 -0500, Austin Clements wrote: +> notmuch-show-tag-all, in the first line of the commit message. +> + +ouch, again + +> As in the previous patch, if the previous patch comes earlier in the +> series, notmuch-show-tag-all could be written this way initially. +> + +As with the previous patch, I merged it into the patch that introduces +`notmuch-show-tag-all'. + +Regards, + Dmitry + +> Quoth Dmitry Kurochkin on Jan 30 at 6:26 am: +> > Use `notmuch-show-mapc' function instead of a custom `loop'. +> > --- +> > emacs/notmuch-show.el | 13 ++++++------- +> > 1 files changed, 6 insertions(+), 7 deletions(-) +> > +> > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +> > index b115a8f..69381ac 100644 +> > --- a/emacs/notmuch-show.el +> > +++ b/emacs/notmuch-show.el +> > @@ -1516,13 +1516,12 @@ TAG-CHANGES is a list of tag operations for `notmuch-tag'." +> > 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) +> > - (save-excursion +> > - (goto-char (point-min)) +> > - (loop do (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))) +> > - while (notmuch-show-goto-message-next)))) +> > + (notmuch-show-mapc +> > + (lambda () +> > + (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-add-tag () +> > "Same as `notmuch-show-tag' but sets initial input to '+'." +> +> -- +> Austin Clements MIT/'06/PhD/CSAIL +> amdragon@mit.edu http://web.mit.edu/amdragon +> Somewhere in the dream we call reality you will find me, +> searching for the reality we call dreams.