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 4A36A429E34 for ; Sun, 29 Jan 2012 21:00:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 Odp1eDQs8fTn for ; Sun, 29 Jan 2012 20:59:59 -0800 (PST) Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU [18.7.68.36]) by olra.theworths.org (Postfix) with ESMTP id 6971F431FBC for ; Sun, 29 Jan 2012 20:59:59 -0800 (PST) X-AuditID: 12074424-b7fae6d000000906-98-4f2623ce36e9 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP id A0.4D.02310.EC3262F4; Sun, 29 Jan 2012 23:59:58 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q0U4xvOD013047; Sun, 29 Jan 2012 23:59:58 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0U4xu2D000317 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sun, 29 Jan 2012 23:59:57 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1RrjKe-0000WW-9f; Sun, 29 Jan 2012 23:59:08 -0500 Date: Sun, 29 Jan 2012 23:59:08 -0500 From: Austin Clements To: Dmitry Kurochkin Subject: Re: [PATCH v2 11/13] emacs: code cleanup in `notmuch-show-operate-all', no functional changes Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1327890382-548-12-git-send-email-dmitry.kurochkin@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphleLIzCtJLcpLzFFi42IR4hRV1j2nrOZv8GShucXVrf3sFtdvzmR2 YPLYOesuu8ezVbeYA5iiuGxSUnMyy1KL9O0SuDIubJ3PUrCHr+LJvX3sDYwrubsYOTkkBEwk fhw9yAhhi0lcuLeerYuRi0NIYB+jxJHO5+wQzgZGiW1Hp4JVCQmcZJJ48c4dIrGEUaJl21l2 kASLgKrEmodTWEFsNgENiW37l4M1iAgYSty6+IoZxGYWkJb49ruZCcQWFsiQePfiJFgvr4CO xK95XSwQQ08wSrS/XcEMkRCUODnzCQtEs5bEjX8vgZo5wAYt/8cBEuYU8JJYNP062F5RARWJ KSe3sU1gFJqFpHsWku5ZCN0LGJlXMcqm5Fbp5iZm5hSnJusWJyfm5aUW6Zrr5WaW6KWmlG5i BAU2u4vKDsbmQ0qHGAU4GJV4eAP/qfoLsSaWFVfmHmKU5GBSEuV1UVLzF+JLyk+pzEgszogv Ks1JLT7EKMHBrCTC++gnUDlvSmJlVWpRPkxKmoNFSZxXQ+udn5BAemJJanZqakFqEUxWhoND SYL3P8hQwaLU9NSKtMycEoQ0EwcnyHAeoOGcwEQgxFtckJhbnJkOkT/FqCglzvsBpFkAJJFR mgfXC0s8rxjFgV4R5n0BUsUDTFpw3a+ABjMBDX7OAHJ1cUkiQkqqgXGS1/evHH93f1fZrXhC vlYz7Ctfi7N+n+Av5y//Pt2x1/3d0bVcVeFqa/NpBmMRja2yri8Kg2aJMT3OZXb+ffPLrwN9 R6ZUbZn4bOmjg1fWRRtKTtqafaigzMJ4mXCvZeVMw1svQyfdX9rqXtCTujJJTDY33Ero4YRg yUl9a2VV66MltD8K+iuxFGckGmoxFxUnAgBl00MDFwMAAA== 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:00:01 -0000 notmuch-show-tag-all, in the first line of the commit message. As in the previous patch, if the previous patch comes earlier in the series, notmuch-show-tag-all could be written this way initially. 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.