GNU bug report logs - #39479
Wrong behaviour of bibtex-autokey-name-change-strings

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: auctex; Reported by: gojjoe2@HIDDEN; Keywords: notabug; Done: Arash Esbati <arash@HIDDEN>; Maintainer for auctex is bug-auctex@HIDDEN.
bug closed, send any further explanations to 39479 <at> debbugs.gnu.org and gojjoe2@HIDDEN Request was from Arash Esbati <arash@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) notabug. Request was from Arash Esbati <arash@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 39479 <at> debbugs.gnu.org:


Received: (at 39479) by debbugs.gnu.org; 14 Feb 2020 18:58:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 14 13:58:15 2020
Received: from localhost ([127.0.0.1]:34699 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j2gAI-0007yR-P2
	for submit <at> debbugs.gnu.org; Fri, 14 Feb 2020 13:58:15 -0500
Received: from eggs.gnu.org ([209.51.188.92]:54133)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arash@HIDDEN>) id 1j2gAH-0007yF-3l
 for 39479 <at> debbugs.gnu.org; Fri, 14 Feb 2020 13:58:13 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38407)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <arash@HIDDEN>)
 id 1j2gAB-0004xQ-Tr; Fri, 14 Feb 2020 13:58:07 -0500
Received: from pd9fb7cf1.dip0.t-ipconnect.de ([217.251.124.241]:52299
 helo=MUTANT)
 by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256)
 (Exim 4.82) (envelope-from <arash@HIDDEN>)
 id 1j2gAA-0003Vg-6n; Fri, 14 Feb 2020 13:58:06 -0500
From: Arash Esbati <arash@HIDDEN>
To: gojjoe2@HIDDEN
Subject: Re: bug#39479: Wrong behaviour of bibtex-autokey-name-change-strings
References: <43ce8fd8-4342-e855-fb09-eca93a95bc02@HIDDEN>
Date: Fri, 14 Feb 2020 19:57:53 +0100
In-Reply-To: <43ce8fd8-4342-e855-fb09-eca93a95bc02@HIDDEN> (gojjoe's
 message of "Fri, 7 Feb 2020 13:27:26 +0100")
Message-ID: <86k14pq9n2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39479
Cc: winkler@HIDDEN, 39479 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi,

thanks for your report.  The function in question is part of `bibtex.el'
which in return is part of Emacs itself and not AUCTeX.  I'm CC'ing
bibtex maintainer asking him if he could have a look at your
suggestion.  If you don't receive an answer in due time, please consider
reporting this issue as an Emacs bug.

@Roland: Can you please have a look at the report below?  TIA.

I will close this report since it doesn't apply to AUCTeX.

Best, Arash

gojjoe2--- via bug-auctex via Bug reporting list for AUCTeX <bug-auctex@HIDDEN> writes:

> 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!
>
> _______________________________________________
> bug-auctex mailing list
> bug-auctex@HIDDEN
> https://lists.gnu.org/mailman/listinfo/bug-auctex




Information forwarded to bug-auctex@HIDDEN:
bug#39479; Package auctex. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 Feb 2020 13:48:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 07 08:48:23 2020
Received: from localhost ([127.0.0.1]:49008 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j03za-0003wK-Pc
	for submit <at> debbugs.gnu.org; Fri, 07 Feb 2020 08:48:23 -0500
Received: from lists.gnu.org ([209.51.188.17]:50475)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gojjoe2@HIDDEN>) id 1j02jP-0007mp-Qo
 for submit <at> debbugs.gnu.org; Fri, 07 Feb 2020 07:27:36 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:45941)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <gojjoe2@HIDDEN>) id 1j02jO-00029d-Ng
 for bug-auctex@HIDDEN; Fri, 07 Feb 2020 07:27:35 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50,
 FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,URIBL_BLOCKED autolearn=disabled
 version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gojjoe2@HIDDEN>) id 1j02jN-0007qB-Li
 for bug-auctex@HIDDEN; Fri, 07 Feb 2020 07:27:34 -0500
Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:46571)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <gojjoe2@HIDDEN>)
 id 1j02jN-0007or-DG
 for bug-auctex@HIDDEN; Fri, 07 Feb 2020 07:27:33 -0500
Received: by mail-lj1-x22f.google.com with SMTP id x14so1903766ljd.13
 for <bug-auctex@HIDDEN>; Fri, 07 Feb 2020 04:27:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=googlemail.com; s=20161025;
 h=from:to:subject:message-id:date:user-agent:mime-version
 :content-language:content-transfer-encoding;
 bh=KrflVamtQKpsN5Aqcp9S4d6gYLSzTavFcaH/AgtY0lQ=;
 b=OCHuZAVPhOsYILTZYAvy9idH7fBLAuje+fs/j22KYAGsIcSL2rITYMqhFrDIReg5f7
 xom6sV3r9+mLAU/Lm/9DuzFJCd2MgjxDDo1Lof05aheP8edMRCqdkW+8rHlRODFOW0Ey
 eiZ06mUzYXgfhaFJ81Z7uf4PP1htE3zlr9yf6UvtoJ94ehl8r+HvIgtAxQXsQcgGqeNb
 7d5wyZa64B/tD5TN0F76l8u6a4lov7pMC3k7x3s6zt3RRsi1YJ86kh1SzBgq8QVtHZpY
 tYi4aAHXeTCx/9PyCf8Ff+EkRHZ40fwNwZJX8NyDOa7QTTx4MRq5MYLSHyCtGZyKv7cI
 3H0Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:message-id:date:user-agent
 :mime-version:content-language:content-transfer-encoding;
 bh=KrflVamtQKpsN5Aqcp9S4d6gYLSzTavFcaH/AgtY0lQ=;
 b=aCYnJOeqpQr6H/xyCcU2MnMAfiIi+ewwSlFnbJ8Y3mZGIivA1mC20UhANOZjawGBmR
 DUl3hZ3T9wuZ2AnYhqCWft13o4yyiYKYxFq10/u6yLh02soOaGFrQvSO8VSQhdQbYAtj
 Zl2l2VuPWZGbX8xct8kSeoJQCWiM3kJLPeKxbeeiLsvIk4t7C36mZxM9cfaDFAV1itUL
 6TZAxzl7Yf9U+DgLpN+AJ9NBLQjY7PW+fWBFI/NZ3LFyHYiBOXHLTPiEeFTexQ3KTdu3
 KE+AOuN1IXGltLArLjUaRxDJKp8gYIsNp2QGTEHzRhYVbql+p5qdX2QRN6zu0Y/Ww2EA
 AiAQ==
X-Gm-Message-State: APjAAAVt3CPieRquczcCJixk3uquX4QWGFglsGX92AI/Ge9dW4Ox6Ta/
 A2IUcvaHaibK5b1DeXxS2XISDvtG
X-Google-Smtp-Source: APXvYqzr2KkZq9+Pglrx3EVZDlQzI1DU0m9wXpGK12H8sh0Ur4uceMQlpKNOVjGVSwlBKQuBSv/J8w==
X-Received: by 2002:a2e:9218:: with SMTP id k24mr5087168ljg.262.1581078451513; 
 Fri, 07 Feb 2020 04:27:31 -0800 (PST)
Received: from [10.24.84.163] (129-241-231-157-gw.cgn.ntnu.no.
 [129.241.231.157])
 by smtp.gmail.com with ESMTPSA id u7sm999317lfn.31.2020.02.07.04.27.29
 for <bug-auctex@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 07 Feb 2020 04:27:30 -0800 (PST)
From: gojjoe2@HIDDEN
X-Google-Original-From: gojjoe@HIDDEN
To: bug-auctex@HIDDEN
Subject: Wrong behaviour of bibtex-autokey-name-change-strings
Message-ID: <43ce8fd8-4342-e855-fb09-eca93a95bc02@HIDDEN>
Date: Fri, 7 Feb 2020 13:27:26 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:68.0) Gecko/20100101
 Thunderbird/68.4.2
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-CA
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2a00:1450:4864:20::22f
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  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 corr [...] 
 Content analysis details:   (2.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: googlemail.com]
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (gojjoe2[at]googlemail.com)
 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
 in digit (gojjoe2[at]googlemail.com)
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [209.51.188.17 listed in list.dnswl.org]
 2.0 SPOOFED_FREEMAIL       No description available.
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 07 Feb 2020 08:48:21 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

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!




Acknowledgement sent to gojjoe2@HIDDEN:
New bug report received and forwarded. Copy sent to bug-auctex@HIDDEN. Full text available.
Report forwarded to bug-auctex@HIDDEN:
bug#39479; Package auctex. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 14 Feb 2020 20:45:02 UTC

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