Subject: Re: bug#76767: 30.1; lgrep doesn't protect regex with -- before

From: Andreas Schwab <[email-masked]>
Date: Thu, 06 Mar 2025 09:07:45 +0100

On Mär 06 2025, Eli Zaretskii wrote:

>> From: Joel Reicher <[email-masked]>
>> Date: Thu, 06 Mar 2025 13:02:46 +1100
>> 
>> 
>> If the search string begins with `-' the string is interpreted as a flag to grep.
>
> You should be able to solve this if you invoke lgrep with C-u or with
> "C-u C-u".
>
> I'm not sure it is easy to always protect the regexp, since (1) we use
> grep-template

grep-template already prefixes the regexp with -e, so I don't understand
why the problem exists.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."