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.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) (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 75E871F45A for ; Sun, 30 Oct 2022 07:08:24 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ADQsUiur"; dkim-atps=neutral Received: by mail-pj1-x1034.google.com with SMTP id l22-20020a17090a3f1600b00212fbbcfb78so13369434pjc.3 for ; Sun, 30 Oct 2022 00:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=CxIXlHvhhL4XK17aM/axnX2U36o+6JGAmunsJWphsBU=; b=ADQsUiurtOFnUOjzhM6V8m/2Lz/AYc1OLMIbp/zJdWcakxpVtPCZwIpeFhAJcaUE7/ tmotxFajSq+b91RfZq2P742NrLjZierU1tDPijpzSjhBsrljWs3Y2Fwt/p7xWNs8QzNH XTC/VeETxcM7bHvsvXzKZ5or3aottC+PgtQ/pS9IdzCS+ycivQAg9lp3W8ECaGiC004H hDPjXaPXdIvsXlq2lyBYic57KJU+7R6QYqQQVOQjUpBHMXBemgt5hl13Mfmk5QZTYpBB lPij+PtRDEh6qLNPtsyAcFZey+oSTF1niQDSIJx+OmvjdyfxZqqRNhq8Jn0hGpke05wS PsSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CxIXlHvhhL4XK17aM/axnX2U36o+6JGAmunsJWphsBU=; b=okuowboHFNud48PFWu0fs0HM/kI4gTF6Jc1ik0QsY0iMRUios+NbmDxRM8Fqln1kF0 2l8WukypGU9XtKvWPauQX+KNrgmHKWOUuQfDso7eN8Wspwwn9gAnZUcQuoA3Cb9g2/jJ fKSb3H5P2SWZxN3P4SYGwOgaUX0xoTxtnSxlAwHQ6/0DNcIhYrBx3sSGev2ScvasADVE EIo/uTNFjRN10jE1m1j26ytinjfYRLrPfNg7S9zR8weHqahyPo+UjFvTirPiBUBdvyXj 3fIVuY1zcU1oj3MVFfojcRxHvUjfY1JzkXbauMrOhz/BNyKysR+Tk5No8DGqHoryS5aN FlZg== X-Gm-Message-State: ACrzQf1oGcZQVp5iovLMyoDTfWC5HV1PW7fZ5KhEEpQ+r1HaipuHMv/d Qk4Keg7gPrysDD4KUfv8A0mmcTzNhynMjA== X-Google-Smtp-Source: AMsMyM5Id+Q9RF8BppARhhEjwudS0CZoVaEDpSbYUFc4OauRbrXA6eCeNpIwq1njkVpSrGaTyWEsAg== X-Received: by 2002:a17:902:b907:b0:178:2898:8084 with SMTP id bf7-20020a170902b90700b0017828988084mr7865107plb.140.1667113703571; Sun, 30 Oct 2022 00:08:23 -0700 (PDT) Received: from Laptop-X1 ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id r15-20020a63a54f000000b0046ef0114367sm1942761pgu.71.2022.10.30.00.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 00:08:23 -0700 (PDT) Date: Sun, 30 Oct 2022 15:08:19 +0800 From: Hangbin Liu To: Eric Wong Cc: meta@public-inbox.org Subject: Re: [Need Help] lei add quotes at the search Message-ID: References: <20221030051333.M329162@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221030051333.M329162@dcvr> List-Id: Hi Eric, Thanks for the help. On Sun, Oct 30, 2022 at 05:13:33AM +0000, Eric Wong wrote: > Hangbin Liu wrote: > > Hi, > > > > I used to use a search like > > > > lei q -I https://lore.kernel.org/all/ -o ~/Mail/liuhangbin --threads --dedupe=mid '((tc:liuhangbin AND rt:6.month.ago..) NOT (tc:stable@vger.kernel.org OR f:sfr@canb.auug.org.au)' > > > > It works on fc35. But after I update to fc36 with lei-1.9.0-1.fc36. It start to > > add quotes in the search link and make the search never works. e.g. > > Are you able to show the curl CLI from fc35? > Which public-inbox/lei version was it? > > I'm actually curious fc35 worked at all, since the quoting would've > been broken, I think... Sorry, I don't have the fc35 environment now. > > > $ lei q -I https://lore.kernel.org/all/ -o ~/Mail/liuhangbin --threads --dedupe=mid '((tc:liuhangbin AND rt:6.month.ago..) NOT (tc:stable@vger.kernel.org OR f:sfr@canb.auug.org.au)' > > # /home/Liu/.local/share/lei/store 0/0 > > # /usr/bin/curl -Sf -s -d '' https://lore.kernel.org/all/?x=m&t=1&q=((tc%3A%22liuhangbin+AND+rt%3A6.month.ago..)+NOT+(tc%3Astable%40vger.kernel.org+OR+f%3Asfr%40canb.auug.org.au)%22 > > # 0 written to /home/Liu/Mail/liuhangbin/ (0 matches) > > > > Do you think if this is a bug, or I should update my search. > > The %22 in fc36 is because your entire query is treated as one > element in argv and matches expected behavior. > > Since '(' and ')' in the shell CLI is special, I suggest either: I'm curious about why the quote(%22) is added after "tc", not after "(" > > a) using --stdin to enter queries containing '(' and ')' > > b) quoting (or escaping) only the '(' and ')': > > '('tc:liuhangbin AND rt:6.month.ago..')' NOT ... > > or > > \(tc:liuhangbin AND rt:6.month.ago..\) NOT ... with this way, the cmd line works. And in config file, it would looks like [lei] q = ((tc:liuhangbin q = AND q = rt:6.month.ago..) q = NOT q = (tc:stable@vger.kernel.org q = OR q = f:sfr@canb.auug.org.au) But if I have a long search line. This will breaks too much and hard to edit. e.g. My real previous search is like [lei] q = (tc:liuhangbin OR \ (dfn:drivers/net/wireguard/ AND rt:6.month.ago..) OR \ (dfn:tools/testing/selftests/net/ AND rt:1.month.ago..) OR \ (dfn:drivers/net/team/ AND rt:6.month.ago..) OR \ (dfn:net/ipv4/igmp.c AND rt:6.month.ago..) OR \ (dfn:net/ipv6/mcast.c AND rt:6.month.ago..)) \ NOT (tc:stable@vger.kernel.org OR f:sfr@canb.auug.org.au) If I add "\" on each "(", this will break to a very long config search. I tried to adjust it to [lei] q = (tc:liuhangbin OR \ (dfn:drivers/net/wireguard/ AND rt:6.month.ago..) OR \ (dfn:tools/testing/selftests/net/ AND rt:1.month.ago..) OR \ (dfn:drivers/net/team/ AND rt:6.month.ago..) OR \ (dfn:net/ipv4/igmp.c AND rt:6.month.ago..) OR \ (dfn:net/ipv6/mcast.c AND rt:6.month.ago..)) q = NOT q = (tc:stable@vger.kernel.org q = OR q = f:sfr@canb.auug.org.au) And now it works... $ lei up /home/Liu/Mail/gmail/Linux_Kernel # https://lore.kernel.org/all/ limiting to 2022-09-30 17:00 +0800 and newer 60927 lei_xsearch 0 wq_worker: query_one_mset: Exception: Unknown range operation at /usr/share/perl5/vendor_perl/PublicInbox/IPC.pm line 254. # /usr/bin/curl -Sf -s -d '' https://lore.kernel.org/all/?x=m&t=1&q=((tc%3Aliuhangbin+OR+(dfn%3Adrivers%2Fnet%2Fwireguard%2F+AND+rt%3A6.month.ago..)+OR+(dfn%3Atools%2Ftesting%2Fselftests%2Fnet%2F+AND+rt%3A1.month.ago..)+OR+(dfn%3Adrivers%2Fnet%2Fteam%2F+AND+rt%3A6.month.ago..)+OR+(dfn%3Anet%2Fipv4%2Figmp.c+AND+rt%3A6.month.ago..)+OR+(dfn%3Anet%2Fipv6%2Fmcast.c+AND+rt%3A1651301673..))+NOT+(tc%3Astable%40vger.kernel.org+OR+f%3Asfr%40canb.auug.org.au))+AND+dt%3A20220930090001.. # https://lore.kernel.org/all/ 43/? So I want to know when/why *lei* add the quotes. Thanks Hangbin