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 97331431FAF for ; Thu, 3 Jan 2013 11:41:37 -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 cGFJjXjQyNgy for ; Thu, 3 Jan 2013 11:41:37 -0800 (PST) Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id DFC10431FAE for ; Thu, 3 Jan 2013 11:41:36 -0800 (PST) Received: by mail-wg0-f44.google.com with SMTP id dr12so7059840wgb.23 for ; Thu, 03 Jan 2013 11:41:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type:x-gm-message-state; bh=mANRJSuF5HGbhFhAMGpom9SyErDGnmXFbQoCX4jLyVo=; b=BkyaB5FsB3Htpp4w6T3twYzvGUPXEyqapr7uxofVjsex+sX2ug+O2pO/MZclJQk3ya uFJtXnbCMsNVCqiwB3pYVkMcr7VmdfR7wWYBr9m8ZVjAqPazFn3U1NqyRS4yDxhwTVye 2qJpqSTU1YMi2iQmtvL1MdWGsa76TguLlLPt7e3LekpiqvZSRErvjGdAsFLoa8xev9B8 qXEJ/LGcjlurvBEgbSx5BO5+X5NWBtTBQX3NCCUYozS88vvZ+oVDJst41v8m527KUVbn Sehuaciw24rGqlnG4t5UnsRUVcq/vAiiZh3NRplOmuDmqc/20t+xQSKa2M9RQUZu7fIp m6yA== X-Received: by 10.194.61.105 with SMTP id o9mr80605080wjr.8.1357242095728; Thu, 03 Jan 2013 11:41:35 -0800 (PST) Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3]) by mx.google.com with ESMTPS id gz3sm90820301wib.2.2013.01.03.11.41.33 (version=SSLv3 cipher=OTHER); Thu, 03 Jan 2013 11:41:34 -0800 (PST) From: Jani Nikula To: David Bremner , Mark Walters , notmuch@notmuchmail.org Subject: Re: Xapian-quoting based batch-tagging. In-Reply-To: <87txr9q763.fsf@zancas.localnet> References: <1356464567-21779-1-git-send-email-david@tethera.net> <87ehid5h64.fsf@qmul.ac.uk> <87txr9q763.fsf@zancas.localnet> User-Agent: Notmuch/0.14+235~gdaf492b (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Thu, 03 Jan 2013 20:41:28 +0100 Message-ID: <87mwwqgil3.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gm-Message-State: ALoCoQlmMqumEnP+K6pZJ08qUjQJzLf9YCNd/ACwxDSz2TcapOOdpgkpDrkTJ81f9H1Xg0pdQJ6T 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: Thu, 03 Jan 2013 19:41:37 -0000 On Wed, 26 Dec 2012, David Bremner wrote: > 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 I think we should just live with it. It's a bunch of code with some UI wrinkles for a marginal feature. BR, Jani. > > - 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 > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch