Subject: bug#39686: closed (Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 06 Mar 2020 08:47:02 +0000

Your bug report

#39686: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
39686: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39686
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings
From: "Roland Winkler" <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Fri, 6 Mar 2020 09:46:03 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

On Sat Feb 22 2020 Eli Zaretskii wrote:
> > The patch affects the autokey machinery of bibtex-mode that
> > calculates keys for new BibTeX entries based on the content of an
> > entry.  The entry point for the autokey machinery is the function
> > bibtex-generate-autokey.  In bibtex.el, this function is called once
> > by the user command bibtex-clean-entry.  No other package inside
> > emacs relies on this.
> 
> Thanks.  I'm fine with installing this on the emacs-27 branch.

Done (commit cb1877321b8a04cdb9b890d76d99a9f5a7ed5bce).

I am sorry for the delay.

Subject: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings
From: "Roland Winkler" <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Wed, 19 Feb 2020 22:54:39 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

For the records:

The bug report below was submitted to auctex (bug#39479).
I am reposting it here.

==================================================================
Hi,

The bibtex-generate-autokey function uses
'bibtex-autokey-name-change-strings' to substitute special or accented
characters or ligatures with ascii characters.

I noticed that it doesn't lead to the intended behaviour for '\oe' and
'\OE', which get converted to 'oee' rather than 'oe'. On the other
hand, '\o', '\"o', and their capitalized counterparts are correctly
converted to 'oe' (and also '\ae' to 'ae').

This quirk seems to be fixed if '\o' and '\oe' are swapped in
bibtex-autokey-name-change-strings. Then all variants are correctly
converted.

So I propose to change the current bibtex-autokey-name-change-strings into

'(("\\\\aa" . "a")
  ("\\\\AA" . "A")
  ("\\\"a\\|\\\\\\\"a\\|\\\\ae" . "ae")
  ("\\\"A\\|\\\\\\\"A\\|\\\\AE" . "Ae")
  ("\\\\i" . "i")
  ("\\\\j" . "j")
  ("\\\\l" . "l")
  ("\\\\L" . "L")
  ("\\\"o\\|\\\\\\\"o\\|\\\\oe\\|\\\\o" . "oe")
  ("\\\"O\\|\\\\\\\"O\\|\\\\OE\\|\\\\O" . "Oe")
  ("\\\"s\\|\\\\\\\"s\\|\\\\3" . "ss")
  ("\\\"u\\|\\\\\\\"u" . "ue")
  ("\\\"U\\|\\\\\\\"U" . "Ue")
  ("\\\\`\\|\\\\'\\|\\\\\\^\\|\\\\~\\|\\\\=\\|\\\\\\.\\|\\\\u\\|\\\\v\\|\\\\H\\|\\\\t\\|\\\\c\\|\\\\d\\|\\\\b"
. "")
  ("[`'\"{}#]" . "")
  ("\\\\-" . "")
  ("\\\\?[ 	\n]+\\|~" . " "))

Cheers!