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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 06 Mar 2025 09:38:50 +0200

> 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 used by many other related commands, and also because
lgrep uses --exclude and --include options, so the "--" you asked for
cannot be before those options we add.