From: David Bremner Date: Sun, 25 Mar 2012 11:24:42 +0000 (+2100) Subject: Re: [PATCH 1/3] cli: refactor "notmuch tag" data structures for tagging operations X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=c3fec7345c782674ae39ecf3e54e13631a2ee1ab;p=notmuch-archives.git Re: [PATCH 1/3] cli: refactor "notmuch tag" data structures for tagging operations --- diff --git a/5b/ddb9156c021b84edb8f1dfd5f3c07cc45b82af b/5b/ddb9156c021b84edb8f1dfd5f3c07cc45b82af new file mode 100644 index 000000000..f0d5221e8 --- /dev/null +++ b/5b/ddb9156c021b84edb8f1dfd5f3c07cc45b82af @@ -0,0 +1,71 @@ +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 872D8431FB6 + for ; Sun, 25 Mar 2012 04:24:56 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 52NXYDfd5G5d for ; + Sun, 25 Mar 2012 04:24:55 -0700 (PDT) +Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238]) + (using TLSv1 with cipher AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id D9BDB431FAE + for ; Sun, 25 Mar 2012 04:24:55 -0700 (PDT) +Received: from fctnnbsc30w-142166230117.dhcp-dynamic.fibreop.nb.bellaliant.net + ([142.166.230.117] helo=zancas.localnet) + by tesseract.cs.unb.ca with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) + (Exim 4.72) (envelope-from ) + id 1SBlZ1-0007Is-An; Sun, 25 Mar 2012 08:24:51 -0300 +Received: from bremner by zancas.localnet with local (Exim 4.77) + (envelope-from ) + id 1SBlYw-0004lX-28; Sun, 25 Mar 2012 08:24:42 -0300 +From: David Bremner +To: Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [PATCH 1/3] cli: refactor "notmuch tag" data structures for + tagging operations +In-Reply-To: + <992ada5cb2fa5f89d4f38b10d62f1c178b3174e2.1332604895.git.jani@nikula.org> +References: + <992ada5cb2fa5f89d4f38b10d62f1c178b3174e2.1332604895.git.jani@nikula.org> +User-Agent: Notmuch/0.12 (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-pc-linux-gnu) +Date: Sun, 25 Mar 2012 08:24:42 -0300 +Message-ID: <87wr68zzwl.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Spam_bar: - +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: Sun, 25 Mar 2012 11:24:56 -0000 + +On Sat, 24 Mar 2012 18:14:35 +0200, Jani Nikula wrote: +> To simplify code, keep all tagging operations in a single array +> instead of separate add and remove arrays. Apply tag changes in the +> order specified on the command line, instead of first removing and +> then adding the tags. + +Like I said on IRC, my only minor reservation with this patch is that +the use of C99 struct assignment is maybe not a good tradeoff here, +since it makes the code a bit more mysterious (for the great unwashed +masses that don't know C99 as well as C89). Still, if you think extra +initialization features are worth it, I can live with it. + +d