From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id A70631F406; Mon, 16 Oct 2023 21:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1697492459; bh=7Ubzega7pny4PEI5/k7SvPqIdMMVpjSfeyRWFZXWEU0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nIzr9Ga+QmhO+TKd2KzaGpXctmkF0itAYX1oXCi3sJJczfXsLIgfd5badvvpBbp/t RnN9c1Q2OiqN2agMrSnITiRdURVku5uFzMDoi5kR8f26uep1Epmjvu0u3CvemmuK04 K7hJE9VFzOK5UyX61B09f6qKeiB1JXI9AiG61yro= Date: Mon, 16 Oct 2023 21:39:46 +0000 From: Eric Wong To: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Cc: meta@public-inbox.org Subject: Re: [PATCH 3/3] search: rectify comment (rt: documented since 738c4a65719e) Message-ID: <20231016213946.M370695@dcvr> References: <20231016113304.2788497-1-stepnem@smrk.net> <20231016113304.2788497-3-stepnem@smrk.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231016113304.2788497-3-stepnem@smrk.net> List-Id: Štěpán Němec wrote: > Fixes: 738c4a65719e ("www: various help text updates") > --- > On a related note, there's this comment in LeiXSearch.pm:312: > > # this should really be rt: (received-time), but no stable > # public-inbox releases support it, yet. > my $dt = 'dt:'.strftime('%Y%m%d%H%M%S', gmtime($lr)).'..'; > > So I went all "hey, it's been 3 releases with rt:, let's do this", > and suddenly, `lei up` stopped getting any updates :-] > The problem is that the date syntax handling for d:, dt: and rt: is not > the same (date_parse_prepare in Search.pm), which doesn't seem ideal to > me, either, but maybe that's intentional/necessary? Yeah, probably: "rt:$lr.."; is correct. It's historical baggage since rt: wasn't really used until we got IMAP (2020); and we didn't have user-friendly approxidate parsing until 2021. d: and dt: had to be at least usable before 2021, so it's more usable in "raw" form. It's expensive to reindex so it's not something I'm inclined to force users into doing, either... d: was a short-sighted mistake and redundant. I suppose we could stop indexing d: at some point (like we do with --skip-docdata) and translate all (not just most) d: into dt: in the parser. > On a totally unrelated note, this patch is a nice example of how > --diff-algorithm=histogram (which I use by default) sometimes produces > diffs that are both longer and more confusing than with any other > (git-provided) algorithm: Heh, I've never touched --diff-algorithm. But I sometimes pipe messages to `lei rediff -W' or `lei rediff -U100' to get more context. I hope to add support for rediff to the WWW UI once coderepo integration is improved.