From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 992196DE098A for ; Thu, 18 Aug 2016 01:15:15 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.007 X-Spam-Level: X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[AWL=0.004, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CAy88YZSqIa1 for ; Thu, 18 Aug 2016 01:15:14 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 365C36DE0946 for ; Thu, 18 Aug 2016 01:15:14 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1baITx-0005Ji-Qt; Thu, 18 Aug 2016 04:15:21 -0400 Received: (nullmailer pid 19297 invoked by uid 1000); Thu, 18 Aug 2016 08:15:08 -0000 From: David Bremner To: Jani Nikula , David Bremner , notmuch@notmuchmail.org Subject: [PATCH] lib: reword comment about XFOLDER: prefix Date: Thu, 18 Aug 2016 05:14:56 -0300 Message-Id: <1471508096-19252-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 2.8.1 In-Reply-To: <87vaz580v3.fsf@nikula.org> References: <87vaz580v3.fsf@nikula.org> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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, 18 Aug 2016 08:15:15 -0000 I believe the current one is misleading, because in my experiments Xapian did not add : when prefix and term were both upper case. Indeed, it's hard to see how it could, because prefixes are added at a layer above Xapian in our code. See _notmuch_message_add_term for an example. Also try to explain why this is a good idea. --- lib/database.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 57a98c9..30ee303 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -260,10 +260,10 @@ static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = { { "id", "Q" }, { "path", "P" }, /* - * Without the ":", since this is a multi-letter prefix, Xapian - * will add a colon itself if the first letter of the path is - * upper-case ASCII. Including the ":" forces there to always be a - * colon, which keeps our own logic simpler. + * Unconditionally add ':' to reduce potential ambiguity with + * overlapping prefixes and/or terms that start with capital + * letters. See xapian document termprefixes.html for related + * discussion. */ { "folder", "XFOLDER:" }, }; -- 2.8.1