bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45693: [two word expansion works, but write-abbrev-file destroys it]


From: Uwe Brauer
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes:

> Uwe Brauer <oub@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!

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]