GNU bug report logs - #76767
30.1; lgrep doesn't protect regex with -- before

Previous Next

Package: emacs;

Reported by: Joel Reicher <joel.reicher <at> gmail.com>

Date: Thu, 6 Mar 2025 02:04:02 UTC

Severity: normal

Found in version 30.1

Full log


Message #11 received at 76767 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76767 <at> debbugs.gnu.org, Joel Reicher <joel.reicher <at> gmail.com>
Subject: Re: bug#76767: 30.1; lgrep doesn't protect regex with -- before
Date: Thu, 06 Mar 2025 09:07:45 +0100
On Mär 06 2025, Eli Zaretskii wrote:

>> From: Joel Reicher <joel.reicher <at> gmail.com>
>> 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, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




This bug report was last modified 105 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.