From: David Bremner Date: Wed, 26 Dec 2012 13:23:00 +0000 (+2000) Subject: Re: Xapian-quoting based batch-tagging. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=428bc66ea582be0c82730f08e26800e8b2997fc2;p=notmuch-archives.git Re: Xapian-quoting based batch-tagging. --- diff --git a/5a/793cda6dc6a734e4b1a858c1b4fe017728a844 b/5a/793cda6dc6a734e4b1a858c1b4fe017728a844 new file mode 100644 index 000000000..06c40c755 --- /dev/null +++ b/5a/793cda6dc6a734e4b1a858c1b4fe017728a844 @@ -0,0 +1,94 @@ +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 CB35C431FAF + for ; Wed, 26 Dec 2012 05:23:34 -0800 (PST) +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 fveILabMZHis for ; + Wed, 26 Dec 2012 05:23:33 -0800 (PST) +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 05049431FAE + for ; Wed, 26 Dec 2012 05:23:33 -0800 (PST) +Received: from fctnnbsc30w-156034082078.dhcp-dynamic.fibreop.nb.bellaliant.net + ([156.34.82.78] helo=zancas.localnet) + by tesseract.cs.unb.ca with esmtpsa + (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) + (envelope-from ) + id 1TnqxC-0002PM-W7; Wed, 26 Dec 2012 09:23:27 -0400 +Received: from bremner by zancas.localnet with local (Exim 4.80) + (envelope-from ) + id 1Tnqwm-0003UO-3a; Wed, 26 Dec 2012 09:23:00 -0400 +From: David Bremner +To: Mark Walters , notmuch@notmuchmail.org +Subject: Re: Xapian-quoting based batch-tagging. +In-Reply-To: <87ehid5h64.fsf@qmul.ac.uk> +References: <1356464567-21779-1-git-send-email-david@tethera.net> + <87ehid5h64.fsf@qmul.ac.uk> +User-Agent: Notmuch/0.14+213~g4af1ac6 (http://notmuchmail.org) Emacs/24.2.1 + (x86_64-pc-linux-gnu) +Date: Wed, 26 Dec 2012 09:23:00 -0400 +Message-ID: <87txr9q763.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain +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: Wed, 26 Dec 2012 13:23:34 -0000 + +Mark Walters writes: + +> I am unclear about how this is going to deal with queries containing +> newlines. For dump/restore I think this is not a problem (as Austin and +> others have said), but for batch tagging I think it could be; for +> example the query could be for a tag containing a newline. + +Yes, that's true, this patch series does not support queries with tags +with embedded newlines. They can still be removed (and added) via either +batch tagging or the command line. We could just live with this, or + +- The current syntax allows for detecting options at the start of the + line; perhaps a future fix would be to have the batch tagging and + command line tagging accept an optionally hex encoded query, something + like: + + --hex +found%20it -- tag:%22stupid%0Atag%22 + +- Alternatively, we could add hex decoding on top of xapian quoting for + queries. One UI downside is that people have to remember that % are + special. + + +found%25it -- tag:lost%25it + + Another is that quoting is still (surprisingly) necessary for encoded + spaces + + +found%20it -- tag:"lost%20it" + + Introducing yet another escape format, e.g. "\n" would require more + code, and not really much benefit afaict versus re-using hex-encoding. + Offhand I don't see how to avoid this without some level of query + pre-processing a-la + + id:1356313183-9266-1-git-send-email-david@tethera.net + +d