GNU bug report logs -
#39686
25.2; Wrong behaviour of bibtex-autokey-name-change-strings
Previous Next
Reported by: "Roland Winkler" <winkler <at> gnu.org>
Date: Thu, 20 Feb 2020 04:56:02 UTC
Severity: normal
Found in version 25.2
Done: "Roland Winkler" <winkler <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #35 received at 39686 <at> debbugs.gnu.org (full text, mbox):
21 feb. 2020 kl. 21.03 skrev Roland Winkler <winkler <at> gnu.org>:
> In LaTeX syntax, OLD-REGEXP can appear anywhere inside what LaTeX
> considers a word (which even may include spaces). So to make things
> more fool-proofed, it would be necessary to parse more carefully the
> LaTeX code. I do not think this effort is needed here as these
> regexps have worked well for at least two decades. The patch fixes
> a minor problem of these regexps pointed out by the OP. But
> otherwise it preserves their spirit.
In LaTeX you can't just write 'b\oeuf'; it will complain that '\oeuf' is undefined. You have to write 'b\oe uf' or 'b{\oe}uf'. Thus there is a word break at the end. (Accents, like '\"o', are different; there is only a single letter after the '\"'.)
With your table, you replace '\o' with 'oe', but what if the text uses a different \-sequence starting with \o, like '\omega'? After substitution, you would have 'oemega' which wasn't intended.
Safer then to tack on a zero-width assertion, like
"\\\\\\(?:o\\|oe\\)\\>"
for example. Or, if you think it's hard to read,
(rx "\\" (or "o" "oe") word-end)
This bug report was last modified 5 years and 75 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.