GNU bug report logs - #45693
28.0.50; abbrev does not expand two words any more

Previous Next

Package: emacs;

Reported by: Uwe Brauer <oub <at> mat.ucm.es>

Date: Wed, 6 Jan 2021 15:56:02 UTC

Severity: normal

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Uwe Brauer <oub <at> mat.ucm.es>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Uwe Brauer <oub <at> mat.ucm.es>, Robert Pluim <rpluim <at> gmail.com>, 45693 <at> debbugs.gnu.org
Subject: bug#45693: [two word expansion works, but write-abbrev-file destroys it] (was: bug#45693: 28.0.50; abbrev does not expand two words any more)
Date: Sun, 10 Jan 2021 22:21:11 +0100
[Message part 1 (text/plain, inline)]
>>> "LI" == Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Uwe Brauer <oub <at> mat.ucm.es> writes:
>> I am trying to set up a recipe to reproduce that behavior. If I do that,
>> should I open a new bug or just post it here?

> Just post it here.

The solution posted by Robert Pluim allows a two word expansion but will
be destroyed by write-abbrev-file

Step to reproduce the issue.

    1. Start emacs -Q (using master commit  "84ec57fe06e187f41a3546131d5dae3b185c3511")

    2. Create an abbrev file (see attachment) called .abbrev-doble_defs
       that contain 
       (define-abbrev-table 'fundamental-mode-abbrev-table
      '(
        ("asi" "así" nil :count 0)))

        (define-abbrev-table 'my-abbrev-table
      '(
        ("a que" "a qué" nil :count 0))
      "Uwe's table"
      :regexp "\\(\\w+ \\w+\\)")

    3. Load files with the following lines
       (setq abbrev-file-name "~/ALLES/HGs/init_files/Abbrev-Doble/.abbrev-new_defs")
       (read-abbrev-file "~/ALLES/HGs/init_files/Abbrev-Doble/.abbrev-double_defs")
       (setq-default abbrev-mode t)
       Or any other path that is convenient.

    4. Open new file in fundamental mode, say called new
       execute in that file
       (setq local-abbrev-table (list my-abbrev-table fundamental-mode-abbrev-table))

       Then asi--> así
       and 
       a que--> a quë

    5. (write-abbrev-file "~/ALLES/HGs/init_files/Abbrev-Doble/.abbrev-new_defs")

The part 
        (define-abbrev-table 'my-abbrev-table
      '(
        ("a que" "a qué" nil :count 0))
      "Uwe's table"
      :regexp "\\(\\w+ \\w+\\)")

Is gone!
[smime.p7s (application/pkcs7-signature, attachment)]

This bug report was last modified 4 years and 156 days ago.

Previous Next


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