Re: [PATCH 2/5] Add quotes around id:"message-id" queries.
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Fri, 2 Jul 2010 13:04:46 +0000 (17:04 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:10 +0000 (09:37 -0800)
08/9677793a1b8d775cffe8f8f4ea111e7e274bee [new file with mode: 0644]

diff --git a/08/9677793a1b8d775cffe8f8f4ea111e7e274bee b/08/9677793a1b8d775cffe8f8f4ea111e7e274bee
new file mode 100644 (file)
index 0000000..b62a5f4
--- /dev/null
@@ -0,0 +1,114 @@
+Return-Path: <dmitry.kurochkin@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1B4B74196F4\r
+       for <notmuch@notmuchmail.org>; Fri,  2 Jul 2010 06:05:05 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.999\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5\r
+       tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
+       DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001] autolearn=ham\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id NxB5m-Dq4tta for <notmuch@notmuchmail.org>;\r
+       Fri,  2 Jul 2010 06:04:54 -0700 (PDT)\r
+Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
+ [74.125.82.45])       by olra.theworths.org (Postfix) with ESMTP id EF9BA4196F3       for\r
+ <notmuch@notmuchmail.org>; Fri,  2 Jul 2010 06:04:53 -0700 (PDT)\r
+Received: by wwb18 with SMTP id 18so370778wwb.2\r
+       for <notmuch@notmuchmail.org>; Fri, 02 Jul 2010 06:04:52 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=domainkey-signature:received:received:from:to:subject:in-reply-to\r
+       :references:user-agent:date:message-id:mime-version:content-type;\r
+       bh=2Q3gpqSOTuthPTeXSWsKdBWM/9wkzyCdPiVPQYH34d4=;\r
+       b=DEp54sF9rZApc9vOVs4efMVu2AQ1TmOUXmDjHU8tmSCiuKK4m4gr3R+rzMicp11fTL\r
+       ff6JKU5UK67j7CBNNM6rQsjuwhDt0ANGQC7df/hcpISJZRERvrYuy+v4A7un8GlezyWI\r
+       eI6ZBAHdo6pK8zpQnXKb8022StLNJKD/0K4SM=\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
+       h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+       :mime-version:content-type;\r
+       b=rHrcuKTUy/H2Lgh9ZqbMdKwRgUzwaUX5liQYEb93L8+9hFH9KQ9xnkUoF4Lu/03xCF\r
+       tkdWdB4Lb2FzYSq0dmKtjCU8mPVYmyLrBOAJGYyMOKv+zUuNJu/oGwM0J8iCJSiCeGIL\r
+       wpgRDQ9RdMh52PWWSFNMxZjvbcyRiseh9n+/M=\r
+Received: by 10.213.33.134 with SMTP id h6mr641602ebd.87.1278075892394;\r
+       Fri, 02 Jul 2010 06:04:52 -0700 (PDT)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id a48sm5360823eei.18.2010.07.02.06.04.47\r
+       (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
+       Fri, 02 Jul 2010 06:04:48 -0700 (PDT)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: Olly Betts <olly@survex.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 2/5] Add quotes around id:"message-id" queries.\r
+In-Reply-To: <slrni2qrg7.chp.olly@msgid.survex.com>\r
+References: <1278000507-22290-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+       <1278000507-22290-3-git-send-email-dmitry.kurochkin@gmail.com>\r
+       <slrni2qrg7.chp.olly@msgid.survex.com>\r
+User-Agent: Notmuch/0.3.1-61-ge828543 (http://notmuchmail.org) Emacs/23.2.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Fri, 02 Jul 2010 17:04:46 +0400\r
+Message-ID: <87bpaq6nm9.fsf@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 02 Jul 2010 13:05:05 -0000\r
+\r
+On Fri, 2 Jul 2010 04:41:43 +0000 (UTC), Olly Betts <olly@survex.com> wrote:\r
+> On 2010-07-01, Dmitry Kurochkin wrote:\r
+> > -  (concat "id:" (notmuch-show-get-prop :id props)))\r
+> > +  (concat "id:\"" (notmuch-show-get-prop :id props) "\""))\r
+> \r
+> This is probably a good idea (the ".." example is arguably a Xapian bug so\r
+> that should be fixed soon, but you find all sorts of junk in message-ids.\r
+> \r
+\r
+If I comment out add_valuerangeprocessor call in\r
+notmuch_database_open(), ids with .. are matched fine with no quotes.\r
+\r
+So it seems that xapian uses the ValueRangeProcessor for all terms\r
+while it should be used for one value parsing only. Is this correct?\r
+\r
+Is there a xapian bug for this?\r
+\r
+> However, the quoting feature this relies on was added in Xapian 1.0.18 (and\r
+> 1.1.4), and with older versions this will break for *all* message-ids (even\r
+> those which currently work).\r
+> \r
+\r
+Indeed.\r
+\r
+> Also, if you're going to quote the message-id, you should escaping any "\r
+> characters in the message-id (by doubling them).\r
+> \r
+\r
+Right.\r
+\r
+I have found a xapian bug #128 "Allow queryparser to treat some prefixes\r
+as literal text". Seems to be just what we need here. Perhaps instead of\r
+quoting in emacs client, we can wait for the value range parsing fix\r
+(can be fixed in minor release?) and use #128 when it is available. IMHO\r
+should be good enought in most cases. What do you think?\r
+\r
+Regards,\r
+  Dmitry\r
+\r
+> Cheers,\r
+>     Olly\r
+> \r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r