From unknown Wed Jun 18 00:26:38 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#39686 <39686@debbugs.gnu.org> To: bug#39686 <39686@debbugs.gnu.org> Subject: Status: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings Reply-To: bug#39686 <39686@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:26:38 +0000 retitle 39686 25.2; Wrong behaviour of bibtex-autokey-name-change-strings reassign 39686 emacs submitter 39686 "Roland Winkler" severity 39686 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 19 23:55:17 2020 Received: (at submit) by debbugs.gnu.org; 20 Feb 2020 04:55:17 +0000 Received: from localhost ([127.0.0.1]:43700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4dro-0004Ui-MT for submit@debbugs.gnu.org; Wed, 19 Feb 2020 23:55:16 -0500 Received: from lists.gnu.org ([209.51.188.17]:52311) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4drm-0004Ua-UU for submit@debbugs.gnu.org; Wed, 19 Feb 2020 23:55:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48588) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4drl-0007I9-UE for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2020 23:55:14 -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.0 required=5.0 tests=ALL_TRUSTED,BAYES_40 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j4drl-0000iX-Qc; Wed, 19 Feb 2020 23:55:13 -0500 Received: from [2601:240:8300:d3d0:248b:bf11:be2e:5309] (port=48288 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1j4drj-00076U-VX; Wed, 19 Feb 2020 23:55:13 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <4367.92615.138020.24142@gargle.gargle.HOWL> Date: Wed, 19 Feb 2020 22:54:39 -0600 From: "Roland Winkler" To: bug-gnu-emacs@gnu.org Subject: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings 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: submit Cc: gojjoe2@googlemail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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! From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 20 00:04:22 2020 Received: (at 39686) by debbugs.gnu.org; 20 Feb 2020 05:04:22 +0000 Received: from localhost ([127.0.0.1]:43716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4e0b-0004kq-Q7 for submit@debbugs.gnu.org; Thu, 20 Feb 2020 00:04:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34323) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4e0a-0004ke-9D for 39686@debbugs.gnu.org; Thu, 20 Feb 2020 00:04:20 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j4e0V-0005vC-5X; Thu, 20 Feb 2020 00:04:15 -0500 Received: from [2601:240:8300:d3d0:248b:bf11:be2e:5309] (port=48324 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1j4e0T-0003zr-V3; Thu, 20 Feb 2020 00:04:14 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <4941.12888.304926.24142@gargle.gargle.HOWL> Date: Wed, 19 Feb 2020 23:04:13 -0600 From: "Roland Winkler" To: 39686@debbugs.gnu.org Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings In-Reply-To: References: <4367.92615.138020.24142@gargle.gargle.HOWL> 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: 39686 Cc: gojjoe2@googlemail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 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. I suggest that the value of bibtex-autokey-transcriptions should be calculated by regexp-opt. That makes the code more readable and it fixes this problem for free. Can you confirm that the following works as it should? (defvar bibtex-autokey-transcriptions (nconc (mapcar (lambda (a) (cons (regexp-opt (car a)) (cdr a))) '(;; language specific characters (("\\aa") . "a") ; \aa -> a (("\\AA") . "A") ; \AA -> A (("\"a" "\\\"a" "\\ae") . "ae") ; "a,\"a,\ae -> ae (("\"A" "\\\"A" "\\AE") . "Ae") ; "A,\"A,\AE -> Ae (("\\i") . "i") ; \i -> i (("\\j") . "j") ; \j -> j (("\\l") . "l") ; \l -> l (("\\L") . "L") ; \L -> L (("\"o" "\\\"o" "\\o" "\\oe") . "oe") ; "o,\"o,\o,\oe -> oe (("\"O" "\\\"O" "\\O" "\\OE") . "Oe") ; "O,\"O,\O,\OE -> Oe (("\"s" "\\\"s" "\\3") . "ss") ; "s,\"s,\3 -> ss (("\"u" "\\\"u") . "ue") ; "u,\"u -> ue (("\"U" "\\\"U") . "Ue") ; "U,\"U -> Ue ;; hyphen, accents (("\\-" "\\`" "\\'" "\\^" "\\~" "\\=" "\\." "\\u" "\\v" "\\H" "\\t" "\\c" "\\d" "\\b") . "") ;; space (("~") . " "))) ;; more spaces '(("[\s\t\n]*\\(?:\\\\\\)?[\s\t\n]+" . " ") ;; braces, quotes, concatenation. ("[`'\"{}#]" . ""))) "Alist of (OLD-REGEXP . NEW-STRING) pairs. Used by the default values of `bibtex-autokey-name-change-strings' and `bibtex-autokey-titleword-change-strings'. Defaults to translating some language specific characters to their ASCII transcriptions, and removing any character accents.") From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 09:06:13 2020 Received: (at 39686) by debbugs.gnu.org; 21 Feb 2020 14:06:13 +0000 Received: from localhost ([127.0.0.1]:46549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j58wW-0007at-QK for submit@debbugs.gnu.org; Fri, 21 Feb 2020 09:06:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j58wU-0007af-Ru for 39686@debbugs.gnu.org; Fri, 21 Feb 2020 09:06:11 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j58wP-0007r3-OE; Fri, 21 Feb 2020 09:06:05 -0500 Received: from [2601:240:8300:d3d0:248b:bf11:be2e:5309] (port=54316 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1j58wM-0006Eg-Pr; Fri, 21 Feb 2020 09:06:05 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <58313.86150.684238.24143@gargle.gargle.HOWL> Date: Fri, 21 Feb 2020 08:06:01 -0600 From: "Roland Winkler" To: gojjoe2@googlemail.com Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings In-Reply-To: <86569ef7-ff5f-4a3a-bbbd-3e1a3990bce9@gmail.com> References: <4367.92615.138020.24142@gargle.gargle.HOWL> <4941.12888.304926.24142@gargle.gargle.HOWL> <86569ef7-ff5f-4a3a-bbbd-3e1a3990bce9@gmail.com> 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: 39686 Cc: 39686@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Fri Feb 21 2020 gojjoe2@googlemail.com wrote: > Yes it does, at least for the specific problem I found with > "\oe". Thank you very much! Thanks for for confirming it fixes your problem. > Can you tell me where to insert this redefinition in my init file, > while I wait for the next Emacs version? I tried adding it to my > own bibtex-hook and to "eval-after-load 'bibtex ...", but it > doesn't seem to have any effect in either. At the moment is called > directly in the init file. Bibtex-mode uses the variable bibtex-autokey-transcriptions to define the default values of `bibtex-autokey-name-change-strings' and `bibtex-autokey-titleword-change-strings'. So something like eval-after-load will work only if it deals with all three variables. Say, you first set bibtex-autokey-transcriptions to its new value; then you use this to set `bibtex-autokey-name-change-strings' and `bibtex-autokey-titleword-change-strings'. It is probably easier to simply set bibtex-autokey-transcriptions in your init file to its new value. Normally, emacs should load bibtex-mode later. Then it will use your value of bibtex-autokey-transcriptions to set the values of `bibtex-autokey-name-change-strings' and `bibtex-autokey-titleword-change-strings'. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 09:13:59 2020 Received: (at 39686) by debbugs.gnu.org; 21 Feb 2020 14:13:59 +0000 Received: from localhost ([127.0.0.1]:46563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5943-0007mQ-Jw for submit@debbugs.gnu.org; Fri, 21 Feb 2020 09:13:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56627) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5941-0007mE-Ub for 39686@debbugs.gnu.org; Fri, 21 Feb 2020 09:13:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j593w-0004PK-QT; Fri, 21 Feb 2020 09:13:52 -0500 Received: from [2601:240:8300:d3d0:248b:bf11:be2e:5309] (port=54340 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1j593v-00054s-Nx; Fri, 21 Feb 2020 09:13:52 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <58783.27471.62850.24143@gargle.gargle.HOWL> Date: Fri, 21 Feb 2020 08:13:51 -0600 From: "Roland Winkler" To: 39686@debbugs.gnu.org, Eli Zaretskii Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings In-Reply-To: <4941.12888.304926.24142@gargle.gargle.HOWL> References: <4367.92615.138020.24142@gargle.gargle.HOWL> <4941.12888.304926.24142@gargle.gargle.HOWL> 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: 39686 Cc: gojjoe2@googlemail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Eli I do not know the exact status of Emacs 27. Is it OK to install the patch below into the Emacs 27 branch? The patch fixes a bug that must have existed for at least about 20 years. So likely it will not affect many users. But even if the patch has a hidden new bug, it should not break anything crucial for users either. Roland (defvar bibtex-autokey-transcriptions (nconc (mapcar (lambda (a) (cons (regexp-opt (car a)) (cdr a))) '(;; language specific characters (("\\aa") . "a") ; \aa -> a (("\\AA") . "A") ; \AA -> A (("\"a" "\\\"a" "\\ae") . "ae") ; "a,\"a,\ae -> ae (("\"A" "\\\"A" "\\AE") . "Ae") ; "A,\"A,\AE -> Ae (("\\i") . "i") ; \i -> i (("\\j") . "j") ; \j -> j (("\\l") . "l") ; \l -> l (("\\L") . "L") ; \L -> L (("\"o" "\\\"o" "\\o" "\\oe") . "oe") ; "o,\"o,\o,\oe -> oe (("\"O" "\\\"O" "\\O" "\\OE") . "Oe") ; "O,\"O,\O,\OE -> Oe (("\"s" "\\\"s" "\\3") . "ss") ; "s,\"s,\3 -> ss (("\"u" "\\\"u") . "ue") ; "u,\"u -> ue (("\"U" "\\\"U") . "Ue") ; "U,\"U -> Ue ;; hyphen, accents (("\\-" "\\`" "\\'" "\\^" "\\~" "\\=" "\\." "\\u" "\\v" "\\H" "\\t" "\\c" "\\d" "\\b") . "") ;; space (("~") . " "))) ;; more spaces '(("[\s\t\n]*\\(?:\\\\\\)?[\s\t\n]+" . " ") ;; braces, quotes, concatenation. ("[`'\"{}#]" . ""))) "Alist of (OLD-REGEXP . NEW-STRING) pairs. Used by the default values of `bibtex-autokey-name-change-strings' and `bibtex-autokey-titleword-change-strings'. Defaults to translating some language specific characters to their ASCII transcriptions, and removing any character accents.") From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 10:01:38 2020 Received: (at 39686) by debbugs.gnu.org; 21 Feb 2020 15:01:38 +0000 Received: from localhost ([127.0.0.1]:47812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j59oA-0004od-0P for submit@debbugs.gnu.org; Fri, 21 Feb 2020 10:01:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j59o7-0004oP-4k for 39686@debbugs.gnu.org; Fri, 21 Feb 2020 10:01:36 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j59o1-0004tR-Uf; Fri, 21 Feb 2020 10:01:29 -0500 Received: from [176.228.60.248] (port=4478 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j59nv-0004LU-Ua; Fri, 21 Feb 2020 10:01:27 -0500 Date: Fri, 21 Feb 2020 17:01:13 +0200 Message-Id: <837e0gj87a.fsf@gnu.org> From: Eli Zaretskii To: "Roland Winkler" In-reply-to: <58783.27471.62850.24143@gargle.gargle.HOWL> (winkler@gnu.org) Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings References: <4367.92615.138020.24142@gargle.gargle.HOWL> <4941.12888.304926.24142@gargle.gargle.HOWL> <58783.27471.62850.24143@gargle.gargle.HOWL> 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: 39686 Cc: gojjoe2@googlemail.com, 39686@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Date: Fri, 21 Feb 2020 08:13:51 -0600 > From: "Roland Winkler" > CC: gojjoe2@googlemail.com > > I do not know the exact status of Emacs 27. Is it OK to install the > patch below into the Emacs 27 branch? I don't see a patch, just a defvar. Which part(s) of that are modified, and how? Also, what commands/features will be affected by this change? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 10:32:37 2020 Received: (at 39686) by debbugs.gnu.org; 21 Feb 2020 15:32:37 +0000 Received: from localhost ([127.0.0.1]:47830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5AI8-0005d7-VE for submit@debbugs.gnu.org; Fri, 21 Feb 2020 10:32:37 -0500 Received: from mail-lj1-f177.google.com ([209.85.208.177]:40869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j54WN-0004g0-PE for 39686@debbugs.gnu.org; Fri, 21 Feb 2020 04:22:56 -0500 Received: by mail-lj1-f177.google.com with SMTP id n18so1447803ljo.7 for <39686@debbugs.gnu.org>; Fri, 21 Feb 2020 01:22:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=IVJkkkefZbbSqlb42QwImaiN+yThSBrPq7B9z+kxuVg=; b=TEAyWYWme97meoReGdo3PikQ3pK2o/4qSu9YJINt9Cfjc1zh/pNcy289++fU3FON7P S1t6a/erq5zLhmTg+bzPy+pTDN8wIwIJVBr2PKUiQ0r3eyow+4sieAikT8w+WNIaqJ8W x3yH064H648BU9b43LVuLTKJMXOoHqYLCCxqcj+PbMWnLwUld7yLoYRvBCd2P0gyETeq 9ImGT1crXj3srnGQ5LN0HNGPLnxF6oVEoKwjq5qIAVHYp1ZG9NO/6UpNuLQFyk3CI7eb RNoufrCeLAuMPm7KAynQTthLOXQ3qnqB8ifI8iqw+kt4QAkZbZ5TGI5WVrcSciPdEEP8 j1rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=IVJkkkefZbbSqlb42QwImaiN+yThSBrPq7B9z+kxuVg=; b=HwC6t9pFVrEChitxL6HX3QKxapDcnfTqtwNsh2MP1RIrOtECmXhmO/f+sMwRytVqLw OD0l8W2Nd4sp6ec8lHKcF+i4h/f/41UAnaVvtu3DN4jTi5IPuuNHXTTPSTZMrxNvfVky DOv18bTT+9YbLT3RCHIaxFx/aH9RBAMBNt2WyrdEq0iv1tWHKNs6q8VrMh+0C7U5Etrp fuSVd+dyaLyMgNisq895ms+Ce8YRp3d+vgSKczL1TVxx0VF4pJwGnc3lY23DzgCl5aVU 5eK4tpEYTBQpazMTebsLlcX4kOqzy7As4A1rk37ifowXMqDuloOrwdfCJsaNl5bMUC08 I5JQ== X-Gm-Message-State: APjAAAUfbKbJ8aOb44Vryn9fO2pM+y6vU7NViN+qshZUACuarxr/oeLx Fkz+Nz5cJKhwnrJdcor348g= X-Google-Smtp-Source: APXvYqyKAqN6BClX2hfXzsT4HtkwPxui0s7Ft2vWfR2NyxxM0e2Q6Hgitcb35rnH36b56FNgbfZgxA== X-Received: by 2002:a2e:80d1:: with SMTP id r17mr21764823ljg.292.1582276969614; Fri, 21 Feb 2020 01:22:49 -0800 (PST) Received: from [10.24.87.163] (129-241-230-62-gw.cgn.ntnu.no. [129.241.230.62]) by smtp.gmail.com with ESMTPSA id g15sm1280006ljl.10.2020.02.21.01.22.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Feb 2020 01:22:48 -0800 (PST) From: gojjoe2@googlemail.com X-Google-Original-From: gojjoe2@gmail.com Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings To: 39686@debbugs.gnu.org References: <4367.92615.138020.24142@gargle.gargle.HOWL> <4941.12888.304926.24142@gargle.gargle.HOWL> Message-ID: <86569ef7-ff5f-4a3a-bbbd-3e1a3990bce9@gmail.com> Date: Fri, 21 Feb 2020 10:22:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <4941.12888.304926.24142@gargle.gargle.HOWL> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-CA Content-Transfer-Encoding: 7bit X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 39686 X-Mailman-Approved-At: Fri, 21 Feb 2020 10:32:36 -0500 Cc: Roland Winkler X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Roland, thank you for looking into this. > I suggest that the value of bibtex-autokey-transcriptions should be > calculated by regexp-opt. That makes the code more readable and it > fixes this problem for free. > > Can you confirm that the following works as it should? Yes it does, at least for the specific problem I found with "\oe". Thank you very much! Can you tell me where to insert this redefinition in my init file, while I wait for the next Emacs version? I tried adding it to my own bibtex-hook and to "eval-after-load 'bibtex ...", but it doesn't seem to have any effect in either. At the moment is called directly in the init file. Cheers, Luca From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 10:32:37 2020 Received: (at 39686) by debbugs.gnu.org; 21 Feb 2020 15:32:37 +0000 Received: from localhost ([127.0.0.1]:47832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5AI9-0005d9-8d for submit@debbugs.gnu.org; Fri, 21 Feb 2020 10:32:37 -0500 Received: from mail-lj1-f174.google.com ([209.85.208.174]:36145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j58zL-0007ek-Su for 39686@debbugs.gnu.org; Fri, 21 Feb 2020 09:09:08 -0500 Received: by mail-lj1-f174.google.com with SMTP id r19so2331902ljg.3 for <39686@debbugs.gnu.org>; Fri, 21 Feb 2020 06:09:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=zOiHAPp/qjVlFbJKNjSydCMVmut5ioO/HL9vBnn9bkc=; b=LNIqac/6gRB1yYIAdM/KxdUdv2GTNNYFoNclt4Gtl+F8PNiFNBALloFsREvfCT4WBY g+XLkgNNjPVbmf6RzGYjWXsWMT8p/gJ5Bqx5vh77A9QOTmCxlGpcuvXDj9sqIP/pvLwm 4DpeRAgM482Z9W6lQ8I2MTh2DidKiR4ob/up1smgpbh4T6vc1uA/PYOWYlMmpCQk7378 GM2jd4ga5ExkvZrNGbZcz9bkYf/lQSVicQsQPH361u48bMqG/Jbrc7BHR5N7jYLb4Mft HVt/aTNGapii7Tk+6t9svUNpRT0qEsMkLEhFPROtPSQ46SPzn9Md45dSRFDpYalYzY0B 214g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zOiHAPp/qjVlFbJKNjSydCMVmut5ioO/HL9vBnn9bkc=; b=KXkc9NhgIjptfm7a2szzACePcz8IvteA11bG8+2ZPtloEIdBwibTFWk22lb0zFszof D8HSxDo3vFRrox03WZxwgY884wi4cMc0/3hQicjXffNUZ+H1gKKteSE4N+fJTKn6YbTt iLIbNspbRHGgbpo19+OjVfTC0nz/bpnHx50q10JbM6HhRO0U6mLkFhiqKpq2XPBrckHt kt8JcxhUB5DgkCFhNQpbV81+PgZ98tXWui/Vw4wq07ZjLVzJIm0OiJ0UbudkBvuoWLyi AV878f2pV9UqdCfCZ2OA9NFbEwhE45JA7zVZ1bsGw+d7zwEA39WQYi89ECQDw4MbF3uN kxtg== X-Gm-Message-State: APjAAAVEU5cxLqhOYkt+kkZixDqS/fvRRpSM04Gbd4kyk07Z2cZ9+B/A Q/cjodMtHqgaeX/KxVkA/ibucUzh X-Google-Smtp-Source: APXvYqxa3lycB3HNsdd53sTHC7nDQQWkfXY0x8TCCBqUCT3v3xZN2TmKQnBAcejCp9AA6k97/0XO2g== X-Received: by 2002:a2e:5304:: with SMTP id h4mr21963005ljb.75.1582294141578; Fri, 21 Feb 2020 06:09:01 -0800 (PST) Received: from [10.24.87.163] (129-241-230-62-gw.cgn.ntnu.no. [129.241.230.62]) by smtp.gmail.com with ESMTPSA id f4sm1717182ljo.79.2020.02.21.06.09.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Feb 2020 06:09:00 -0800 (PST) From: gojjoe2@googlemail.com X-Google-Original-From: gojjoe2@gmail.com Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings To: Roland Winkler References: <4367.92615.138020.24142@gargle.gargle.HOWL> <4941.12888.304926.24142@gargle.gargle.HOWL> <86569ef7-ff5f-4a3a-bbbd-3e1a3990bce9@gmail.com> <58313.86150.684238.24143@gargle.gargle.HOWL> Message-ID: <74c639ff-e0bd-9d75-29ed-10c397b0443f@gmail.com> Date: Fri, 21 Feb 2020 15:08:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <58313.86150.684238.24143@gargle.gargle.HOWL> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-CA Content-Transfer-Encoding: 7bit X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 39686 X-Mailman-Approved-At: Fri, 21 Feb 2020 10:32:36 -0500 Cc: 39686@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > Bibtex-mode uses the variable bibtex-autokey-transcriptions to > define the default values of `bibtex-autokey-name-change-strings' > and `bibtex-autokey-titleword-change-strings'. So something like > eval-after-load will work only if it deals with all three variables. > Say, you first set bibtex-autokey-transcriptions to its new value; > then you use this to set `bibtex-autokey-name-change-strings' and > `bibtex-autokey-titleword-change-strings'. > > It is probably easier to simply set bibtex-autokey-transcriptions in > your init file to its new value. Normally, emacs should load > bibtex-mode later. Then it will use your value of > bibtex-autokey-transcriptions to set the values of > `bibtex-autokey-name-change-strings' and > `bibtex-autokey-titleword-change-strings'> Thank you for the explanation. I'm doing as you say and everything seems to work smoothly. Please feel free to close this bug report. Cheers, Luca From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 11:05:24 2020 Received: (at 39686) by debbugs.gnu.org; 21 Feb 2020 16:05:24 +0000 Received: from localhost ([127.0.0.1]:47869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5Ans-0006Ul-Fs for submit@debbugs.gnu.org; Fri, 21 Feb 2020 11:05:24 -0500 Received: from mail1433c50.megamailservers.eu ([91.136.14.33]:60266 helo=mail263c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5Ano-0006US-Mr for 39686@debbugs.gnu.org; Fri, 21 Feb 2020 11:05:23 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1582301113; bh=6uX+Sm3/iQ5f/tDlu+lNZfqxAm5gjSLpYW7RfOUCZaw=; h=From:Subject:Date:Cc:To:From; b=lqm1KWTBevyI1pnA3RqIPUKNqJTVo1kpf1XmmZ2gXoHGNhpviNW0J/u0AZywqtHBB EY4+W9bMmybS/yh7bXt1E1MaIyLLGU9WDDqA+xITJWHe+G8pBxM5yER6MYKI40AQqg VOgW8CUR1rwUyT4Je/ZvhHd0hYGyb9uikePUZjEE= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail263c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 01LG5Bvw027813; Fri, 21 Feb 2020 16:05:12 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings Message-Id: <7219B520-D833-427B-A8E4-35FF71201356@acm.org> Date: Fri, 21 Feb 2020 17:05:10 +0100 To: Roland Winkler X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020A.5E4FFFB9.0038, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=II989TnG c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=o2ViWAdj8IZ8SElPGo8A:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.2 (+) 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: Correct me if I'm wrong, but it looks like the assumption is that all possible \-sequences have been enumerated in that list. More likely, some kind of anchoring after the match is needed, like word-e [...] Content analysis details: (1.2 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: megamailservers.eu] 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.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 39686 Cc: Eli Zaretskii , gojjoe2@googlemail.com, 39686@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Correct me if I'm wrong, but it looks like the assumption is that all = possible \-sequences have been enumerated in that list. More likely, = some kind of anchoring after the match is needed, like word-end ("\\>"). = Then the matching order doesn't matter. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 14:50:10 2020 Received: (at 39686) by debbugs.gnu.org; 21 Feb 2020 19:50:11 +0000 Received: from localhost ([127.0.0.1]:48173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5EJO-0001T4-Iy for submit@debbugs.gnu.org; Fri, 21 Feb 2020 14:50:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5EJM-0001Si-AS for 39686@debbugs.gnu.org; Fri, 21 Feb 2020 14:50:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j5EJH-0000N9-44; Fri, 21 Feb 2020 14:50:03 -0500 Received: from mobile-130-126-255-248.near.illinois.edu ([130.126.255.248]:54367 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1j5EJG-0006Ez-66; Fri, 21 Feb 2020 14:50:02 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <13417.821.396724.24144@gargle.gargle.HOWL> Date: Fri, 21 Feb 2020 13:50:01 -0600 From: "Roland Winkler" To: Eli Zaretskii Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings In-Reply-To: <837e0gj87a.fsf@gnu.org> References: <4367.92615.138020.24142@gargle.gargle.HOWL> <4941.12888.304926.24142@gargle.gargle.HOWL> <58783.27471.62850.24143@gargle.gargle.HOWL> <837e0gj87a.fsf@gnu.org> 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: 39686 Cc: gojjoe2@googlemail.com, 39686@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Fri Feb 21 2020 Eli Zaretskii wrote: > I don't see a patch, just a defvar. Which part(s) of that are > modified, and how? > > Also, what commands/features will be affected by this change? I am sorry, I had tried to keep things readable for the OP. A proper patch is attached below. 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. diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index a7be57e..670e763 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1006,32 +1006,36 @@ bibtex-autokey-expand-strings :type 'boolean) (defvar bibtex-autokey-transcriptions - '(;; language specific characters - ("\\\\aa" . "a") ; \aa -> a - ("\\\\AA" . "A") ; \AA -> A - ("\\\"a\\|\\\\\\\"a\\|\\\\ae" . "ae") ; "a,\"a,\ae -> ae - ("\\\"A\\|\\\\\\\"A\\|\\\\AE" . "Ae") ; "A,\"A,\AE -> Ae - ("\\\\i" . "i") ; \i -> i - ("\\\\j" . "j") ; \j -> j - ("\\\\l" . "l") ; \l -> l - ("\\\\L" . "L") ; \L -> L - ("\\\"o\\|\\\\\\\"o\\|\\\\o\\|\\\\oe" . "oe") ; "o,\"o,\o,\oe -> oe - ("\\\"O\\|\\\\\\\"O\\|\\\\O\\|\\\\OE" . "Oe") ; "O,\"O,\O,\OE -> Oe - ("\\\"s\\|\\\\\\\"s\\|\\\\3" . "ss") ; "s,\"s,\3 -> ss - ("\\\"u\\|\\\\\\\"u" . "ue") ; "u,\"u -> ue - ("\\\"U\\|\\\\\\\"U" . "Ue") ; "U,\"U -> Ue - ;; accents - ("\\\\`\\|\\\\'\\|\\\\\\^\\|\\\\~\\|\\\\=\\|\\\\\\.\\|\\\\u\\|\\\\v\\|\\\\H\\|\\\\t\\|\\\\c\\|\\\\d\\|\\\\b" . "") - ;; braces, quotes, concatenation. - ("[`'\"{}#]" . "") - ("\\\\-" . "") ; \- -> - ;; spaces - ("\\\\?[ \t\n]+\\|~" . " ")) + (nconc + (mapcar (lambda (a) (cons (regexp-opt (car a)) (cdr a))) + '(;; language specific characters + (("\\aa") . "a") ; \aa -> a + (("\\AA") . "A") ; \AA -> A + (("\"a" "\\\"a" "\\ae") . "ae") ; "a,\"a,\ae -> ae + (("\"A" "\\\"A" "\\AE") . "Ae") ; "A,\"A,\AE -> Ae + (("\\i") . "i") ; \i -> i + (("\\j") . "j") ; \j -> j + (("\\l") . "l") ; \l -> l + (("\\L") . "L") ; \L -> L + (("\"o" "\\\"o" "\\o" "\\oe") . "oe") ; "o,\"o,\o,\oe -> oe + (("\"O" "\\\"O" "\\O" "\\OE") . "Oe") ; "O,\"O,\O,\OE -> Oe + (("\"s" "\\\"s" "\\3") . "ss") ; "s,\"s,\3 -> ss + (("\"u" "\\\"u") . "ue") ; "u,\"u -> ue + (("\"U" "\\\"U") . "Ue") ; "U,\"U -> Ue + ;; hyphen, accents + (("\\-" "\\`" "\\'" "\\^" "\\~" "\\=" "\\." "\\u" "\\v" + "\\H" "\\t" "\\c" "\\d" "\\b") . "") + ;; space + (("~") . " "))) + ;; more spaces + '(("[\s\t\n]*\\(?:\\\\\\)?[\s\t\n]+" . " ") + ;; braces, quotes, concatenation. + ("[`'\"{}#]" . ""))) "Alist of (OLD-REGEXP . NEW-STRING) pairs. -Used by the default values of `bibtex-autokey-name-change-strings' and +Used as default values of `bibtex-autokey-name-change-strings' and `bibtex-autokey-titleword-change-strings'. Defaults to translating some language specific characters to their ASCII transcriptions, and -removing any character accents.") +removing any accent characters.") (defcustom bibtex-autokey-name-change-strings bibtex-autokey-transcriptions From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 15:03:38 2020 Received: (at 39686) by debbugs.gnu.org; 21 Feb 2020 20:03:38 +0000 Received: from localhost ([127.0.0.1]:48177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5EWP-0001nm-TZ for submit@debbugs.gnu.org; Fri, 21 Feb 2020 15:03:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5EWO-0001na-Cg for 39686@debbugs.gnu.org; Fri, 21 Feb 2020 15:03:36 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j5EWI-0002LG-Vp; Fri, 21 Feb 2020 15:03:31 -0500 Received: from mobile-130-126-255-248.near.illinois.edu ([130.126.255.248]:49796 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1j5EWI-0000Ct-Co; Fri, 21 Feb 2020 15:03:30 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <14225.14543.383801.24144@gargle.gargle.HOWL> Date: Fri, 21 Feb 2020 14:03:29 -0600 From: "Roland Winkler" To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings In-Reply-To: <7219B520-D833-427B-A8E4-35FF71201356@acm.org> References: <7219B520-D833-427B-A8E4-35FF71201356@acm.org> 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: 39686 Cc: Eli Zaretskii , gojjoe2@googlemail.com, 39686@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Fri Feb 21 2020 Mattias Engdeg=C3=A5rd wrote: > Correct me if I'm wrong, but it looks like the assumption is that > all possible \-sequences have been enumerated in that list. More > likely, some kind of anchoring after the match is needed, like > word-end ("\\>"). Then the matching order doesn't matter. I am not sure I understand. The idea in bibtex-autokey-transcriptions is that each match of OLD-REGEXP is replaced in full by NEW-STRING. Subexpressions are ignored. 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. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 15:43:14 2020 Received: (at 39686) by debbugs.gnu.org; 21 Feb 2020 20:43:15 +0000 Received: from localhost ([127.0.0.1]:48216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5F8k-0004ny-Kl for submit@debbugs.gnu.org; Fri, 21 Feb 2020 15:43:14 -0500 Received: from mail237c50.megamailservers.eu ([91.136.10.247]:52936 helo=mail56c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5F8i-0004np-PR for 39686@debbugs.gnu.org; Fri, 21 Feb 2020 15:43:13 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1582317791; bh=1mHnMlcC4RSKDiphUBSUkEDCIFLtDDSrdJU61gSwVzU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=WYoo30Cl8HR+joKuKYlqswhMPUiDDN2RBCxgt3DN3/YbWOT+OuyaDc2eaz3arDuR3 ENSdWMi4A8vgcg0RP8ylh27Tny1FuZt5HSVf+OhvbPyi2LI/Oh0Ln9KD5mEXAJEA55 9ZxYNWzed0yyxGxVSNCwG2F6beuq531Z47nOpEE4= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail56c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 01LKh9P1030071; Fri, 21 Feb 2020 20:43:10 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <14225.14543.383801.24144@gargle.gargle.HOWL> Date: Fri, 21 Feb 2020 21:43:08 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <6F3F5510-4567-47A2-B0AA-88E2FED57167@acm.org> References: <7219B520-D833-427B-A8E4-35FF71201356@acm.org> <14225.14543.383801.24144@gargle.gargle.HOWL> To: Roland Winkler X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0210.5E5040DF.0017, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Hc1qsRM8 c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=s8KEOM3ZS6JGeiu2cQYA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Spam-Score: 1.2 (+) 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: 21 feb. 2020 kl. 21.03 skrev Roland Winkler : > 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 caref [...] Content analysis details: (1.2 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: megamailservers.eu] 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.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 39686 Cc: Eli Zaretskii , gojjoe2@googlemail.com, 39686@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 21 feb. 2020 kl. 21.03 skrev Roland Winkler : > 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) From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 16:03:20 2020 Received: (at 39686) by debbugs.gnu.org; 21 Feb 2020 21:03:20 +0000 Received: from localhost ([127.0.0.1]:48233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5FSC-0005JV-4p for submit@debbugs.gnu.org; Fri, 21 Feb 2020 16:03:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5FSA-0005JG-Vh for 39686@debbugs.gnu.org; Fri, 21 Feb 2020 16:03:19 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j5FS5-0000pu-Pr; Fri, 21 Feb 2020 16:03:13 -0500 Received: from mobile-130-126-255-248.near.illinois.edu ([130.126.255.248]:38596 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1j5FS4-0007za-El; Fri, 21 Feb 2020 16:03:12 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <17807.59258.546985.24144@gargle.gargle.HOWL> Date: Fri, 21 Feb 2020 15:03:11 -0600 From: "Roland Winkler" To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings In-Reply-To: <6F3F5510-4567-47A2-B0AA-88E2FED57167@acm.org> References: <7219B520-D833-427B-A8E4-35FF71201356@acm.org> <14225.14543.383801.24144@gargle.gargle.HOWL> <6F3F5510-4567-47A2-B0AA-88E2FED57167@acm.org> 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: 39686 Cc: Eli Zaretskii , gojjoe2@googlemail.com, 39686@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Fri Feb 21 2020 Mattias Engdeg=C3=A5rd wrote: > 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. In bibtex-mode, all this is used in the context of what is supposed to represent names and titles of books and articles. The current scheme has been in place for at least two decades and nobody complained about this. (Note that the current thread is about something else.) So I assume that what you are concerned about is so rare (at least in the context of the autokey machinery) that it is not worth the effort. But feel free to provide a patch along these lines. However, that patch should certainly go into master because it modifies the current scheme. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 16:32:30 2020 Received: (at 39686) by debbugs.gnu.org; 21 Feb 2020 21:32:30 +0000 Received: from localhost ([127.0.0.1]:48260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5FuP-00064O-Oh for submit@debbugs.gnu.org; Fri, 21 Feb 2020 16:32:29 -0500 Received: from mail1455c50.megamailservers.eu ([91.136.14.55]:43938 helo=mail266c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5FuN-000648-Gn for 39686@debbugs.gnu.org; Fri, 21 Feb 2020 16:32:28 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1582320739; bh=1R0CVDS1yF2nNA/uVVU8no6YPk1D39JdnNyW7dzBxSI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=OAPyKZLk/YXZXfqBkoOOm4fZ1x364lf+2DIRFh/iuRD1o5bkuHMVLsBr6sY/wJsKH TF6BeQpUYtqS8SOMzfrU6DmTriMwKY5+Y3kmEJtHt/yGImxCj49a74zCORLXGVQTMA Cj6/dnQHQxky69DX+EdK4E94Fe88hK/bwCNVGSz8= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 01LLWH93001273; Fri, 21 Feb 2020 21:32:18 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <17807.59258.546985.24144@gargle.gargle.HOWL> Date: Fri, 21 Feb 2020 22:32:16 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <7219B520-D833-427B-A8E4-35FF71201356@acm.org> <14225.14543.383801.24144@gargle.gargle.HOWL> <6F3F5510-4567-47A2-B0AA-88E2FED57167@acm.org> <17807.59258.546985.24144@gargle.gargle.HOWL> To: Roland Winkler X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020F.5E504C63.0010, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=PNJxBsiC c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=dlLB1we1nIAIJeMIYnsA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Spam-Score: 1.2 (+) 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: 21 feb. 2020 kl. 22.03 skrev Roland Winkler : > So I assume that what you are concerned about is > so rare (at least in the context of the autokey machinery) that it > is not worth the effort. Content analysis details: (1.2 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: gnu.org] 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.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 39686 Cc: Eli Zaretskii , gojjoe2@googlemail.com, 39686@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 21 feb. 2020 kl. 22.03 skrev Roland Winkler : > So I assume that what you are concerned about is > so rare (at least in the context of the autokey machinery) that it > is not worth the effort. Fair enough. If you run into such a partial match problem in the future, = you now know at least one more way to solve it. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 22 04:12:26 2020 Received: (at 39686) by debbugs.gnu.org; 22 Feb 2020 09:12:26 +0000 Received: from localhost ([127.0.0.1]:48555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5Qpm-0000u7-0u for submit@debbugs.gnu.org; Sat, 22 Feb 2020 04:12:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5Qpj-0000tq-Sf for 39686@debbugs.gnu.org; Sat, 22 Feb 2020 04:12:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j5Qpe-00046c-Pm; Sat, 22 Feb 2020 04:12:18 -0500 Received: from [176.228.60.248] (port=2922 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j5Qpd-0005Uo-43; Sat, 22 Feb 2020 04:12:17 -0500 Date: Sat, 22 Feb 2020 11:12:10 +0200 Message-Id: <83r1ynhtp1.fsf@gnu.org> From: Eli Zaretskii To: "Roland Winkler" In-reply-to: <13417.821.396724.24144@gargle.gargle.HOWL> (winkler@gnu.org) Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings References: <4367.92615.138020.24142@gargle.gargle.HOWL> <4941.12888.304926.24142@gargle.gargle.HOWL> <58783.27471.62850.24143@gargle.gargle.HOWL> <837e0gj87a.fsf@gnu.org> <13417.821.396724.24144@gargle.gargle.HOWL> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39686 Cc: gojjoe2@googlemail.com, 39686@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) > Date: Fri, 21 Feb 2020 13:50:01 -0600 > From: "Roland Winkler" > Cc: 39686@debbugs.gnu.org, > gojjoe2@googlemail.com > > On Fri Feb 21 2020 Eli Zaretskii wrote: > > I don't see a patch, just a defvar. Which part(s) of that are > > modified, and how? > > > > Also, what commands/features will be affected by this change? > > I am sorry, I had tried to keep things readable for the OP. > A proper patch is attached below. > > 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. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 06 03:46:17 2020 Received: (at 39686-done) by debbugs.gnu.org; 6 Mar 2020 08:46:17 +0000 Received: from localhost ([127.0.0.1]:44039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jA8cb-0004Xo-K8 for submit@debbugs.gnu.org; Fri, 06 Mar 2020 03:46:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jA8cZ-0004Xb-0l for 39686-done@debbugs.gnu.org; Fri, 06 Mar 2020 03:46:15 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jA8cT-0005Zy-4p; Fri, 06 Mar 2020 03:46:09 -0500 Received: from wlanhome118081.uni-regensburg.de ([132.199.118.81]:46930 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1jA8cQ-0006pD-E3; Fri, 06 Mar 2020 03:46:07 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <3531.96649.617106.24162@gargle.gargle.HOWL> Date: Fri, 6 Mar 2020 09:46:03 +0100 From: "Roland Winkler" To: Eli Zaretskii Subject: Re: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings In-Reply-To: <83r1ynhtp1.fsf@gnu.org> References: <4367.92615.138020.24142@gargle.gargle.HOWL> <4941.12888.304926.24142@gargle.gargle.HOWL> <58783.27471.62850.24143@gargle.gargle.HOWL> <837e0gj87a.fsf@gnu.org> <13417.821.396724.24144@gargle.gargle.HOWL> <83r1ynhtp1.fsf@gnu.org> 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: 39686-done Cc: 39686-done@debbugs.gnu.org, gojjoe2@googlemail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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. From unknown Wed Jun 18 00:26:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 03 Apr 2020 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator