Subject: bug#74861: 31.0.50; etags no longer processing shy groups as expected in --regex options

From: Daniel Villeneuve <[email-masked]>
Date: Sat, 14 Dec 2024 16:00:24 -0500

On 12/14/24 13:39, Paul Eggert wrote:

On 12/14/24 01:33, Eli Zaretskii wrote:

I'm guessing this is because Emacs 27 switched to the Gnulib's regex
implementation in etags and other lib-src programs, whereas previous
versions used the Emacs's own regex code (which is still used for
Emacs's own regex search and replacement code).

CC'ing Paul Eggert, in the hope he can tell whether this is expected
or not, or how to fix it.

Yes that's expected, as glibc/Gnulib regex doesn't do shy groups. A workaround is to not use shy groups, e.g.:

etags --regex='/DEFINE_FF *(\(TAG \)? *\([^)]+\)/\2/' \
--output ETAGS-test foo.c

This should be portable between both older and newer etags.

Thanks for analyzing this.
This looks like a silent change.
Maybe etags' documentation should reflect this, as currently the man
page still says "The syntax of regexps is the same as in emacs."
which is no longer true.