unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: meta@public-inbox.org
Subject: Re: [Need Help] lei add quotes at the search
Date: Sun, 30 Oct 2022 05:13:33 +0000	[thread overview]
Message-ID: <20221030051333.M329162@dcvr> (raw)
In-Reply-To: <Y133d6QnZoKvoTmP@Laptop-X1>

Hangbin Liu <liuhangbin@gmail.com> 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...

> $ 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:

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 ...

  Which makes your argv something like:

    [ "(tc:liuhangbin", "AND", "rt:6.month.ago..)", "NOT", ... ]

  reply	other threads:[~2022-10-30  5:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30  4:03 [Need Help] lei add quotes at the search Hangbin Liu
2022-10-30  5:13 ` Eric Wong [this message]
2022-10-30  7:08   ` Hangbin Liu
2022-10-30 23:06     ` Eric Wong
2022-10-31  7:36       ` Hangbin Liu
2022-10-31  7:47       ` Hangbin Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221030051333.M329162@dcvr \
    --to=e@80x24.org \
    --cc=liuhangbin@gmail.com \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).