From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 227731F8C6 for ; Fri, 10 Sep 2021 14:12:01 +0000 (UTC) Received: by mail-qt1-x82e.google.com with SMTP id x5so1480563qtq.13 for ; Fri, 10 Sep 2021 07:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=date:from:to:subject:message-id:mime-version:content-disposition; bh=x3VRamBh76Q5QreNTXqdJqFe7BDMmkgV3cHBPF6r/Vs=; b=Z7oPqtdHPk6mLryQZtnc2NRaAqRKDnm44enP0UOYiTQ67T2irO466snz+RODfLCjhn CtXR0CadGUEPeafaOdDRjp7+PomIHfVKqj3InItFn8L1NZS0fLQMXpQpl6CVuYehRDFz 1+Ui60QqKDIcLMqQ2yHvrvsXWz+4qO3iOsXAI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=x3VRamBh76Q5QreNTXqdJqFe7BDMmkgV3cHBPF6r/Vs=; b=HYmYTbrVxPBxoDDqzS4BR/HJEfjw7F/7UWmy+YLlGr9bMwVLbV+c5+2yW1GKks6Z2Y tJes5pIuOxUGIbjsxAgwOTCdeZuoRkDlcczmKiTXH7eVwdcrzqBeFnMN55udgGNbGiqJ ZUSLFQdHGiFMkydIYSmMpfG8c0WA1H8H7G9GULMi4iLotRkUoetdOu3QqnjvhEDZTwra sGVjSki1TZPbG0EMAZN8eouC91xoR7fKFfuA0mX2TOc/G5pa0l6v2LqR4WVri+0jynjW mxD69Z8IEJCqvXuhsP1FM+sUcGpWzBmkOT7e/seFxVWHkgzq70eKTVrn8zsBeXlg00uP wHDg== X-Gm-Message-State: AOAM531+ZSK9MEe/HiZulxudPF7WPkGLkDec0P+izZSUiEXoPxZ3Ient dZV2tAVvvC2hHNvIxyOnj0suOyjPoQ9HAg== X-Google-Smtp-Source: ABdhPJw9a1wI7sCw++It0Hmajt89LbJ/b9YLVgf4/CYxE6JgUtkZvGk1/YopesMA7lFxy96K33QxRA== X-Received: by 2002:a05:622a:1116:: with SMTP id e22mr8003765qty.211.1631283119656; Fri, 10 Sep 2021 07:11:59 -0700 (PDT) Received: from meerkat.local (bras-base-mtrlpq5031w-grc-32-216-209-220-181.dsl.bell.ca. [216.209.220.181]) by smtp.gmail.com with ESMTPSA id h9sm3679203qkl.4.2021.09.10.07.11.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 07:11:59 -0700 (PDT) Date: Fri, 10 Sep 2021 10:11:57 -0400 From: Konstantin Ryabitsev To: meta@public-inbox.org Subject: RFC: normalize whitespace in lei queries Message-ID: <20210910141157.6u5adehpx7wftkor@meerkat.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline List-Id: Just a quickie note. I was trying to make my query more readable, so I switched my test example to the following: [lei] q = (dfn:Documentation/security/landlock.rst \ OR dfn:Documentation/userspace-api/landlock.rst \ OR dfn:include/uapi/linux/landlock.h \ OR dfn:samples/landlock/ \ OR dfn:security/landlock/ \ OR dfn:tools/testing/selftests/landlock/ \ OR dfhh:landlock OR dfctx:landlock) \ AND rt:2.months.ago.. However, I noticed that curl queries ended up gaining a lot of ++++: # /usr/bin/curl -Sf -s -d '' https://lore.kernel.org/all/?q=(dfn%3ADocumentation%2Fsecurity%2Flandlock.rst++++++++++OR+dfn%3ADocumentation%2Fuserspace-api%2Flandlock.rst++++++++++OR+dfn%3Ainclude%2Fuapi%2Flinux%2Flandlock.h++++++++++OR+dfn%3Asamples%2Flandlock%2F++++++++++OR+dfn%3Asecurity%2Flandlock%2F++++++++++OR+dfn%3Atools%2Ftesting%2Fselftests%2Flandlock%2F++++++++++OR+dfhh%3Alandlock+OR+dfctx%3Alandlock)+++++++++AND+rt%3A1625943784..&x=m&t=1 I think it's reasonable to normalize \s+ into a single space for all queries, right? Another observation is that when I missed a \ on one of the lines, I managed to make lei unusable. :) $ lei up --all failed to close (git config -z -l --includes --file=/home/user/.cache/lei/saved-tmp.1581950.1631282889.config) pipe: 32768 at /usr/local/share/perl/5.32.1/PublicInbox/Config.pm line 172. $ lei edit-search ~/work/temp/lei/landlock failed to close (git config -z -l --includes --file=/home/user/.local/share/lei/saved-searches/landlock-1804cfad691a409f55598a8528566d5f1539b2632e1db7e206cb147396582631/lei.saved-search) pipe: 32768 at /usr/local/share/perl/5.32.1/PublicInbox/Config.pm line 172. I fixed it by manually editing lei.saved-search and adding the missing backslash. Not sure what the proper solution for this is -- perhaps attempting to parse the edited config file and refusing to save it if it doesn't work? -K