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 #8 received at 76767 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Joel Reicher <joel.reicher <at> gmail.com>
Cc: 76767 <at> debbugs.gnu.org
Subject: Re: bug#76767: 30.1; lgrep doesn't protect regex with -- before
Date: Thu, 06 Mar 2025 09:38:50 +0200
> 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 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.




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.