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]
Date: Wed, 13 Jan 2021 08:37:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>> "RP" == Robert Pluim <rpluim@gmail.com> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
>>> Uwe Brauer <oub@mat.ucm.es> writes:
>> 
>>> What's your 'abbrev-file-name' set to? Emacs uses 'load' to read it,
>>> so it should be a complete pathname, ie "~/.abbrev_defs", or it should
>>> be in your 'load-path' somewhere.
>> 
>> Good and bad news. I repeated the test carefully looking around for old
>> abbrev.el or .abbrev_defs file.
>> 
>> 1. Good, I can confirm that your patched abbrev.el works in the
>> sense that write-abbrev-file does not destroy the properties of
>> the table.
>> 
>> 2. However I tried to add a local abbrev (or an inverse local
>> abbrev) in the fundamental mode, but I obtain 
>> 
>> obarray-get: Wrong type argument: vectorp, ([## 0 0 0 0 0 0 0 0 0 ...] [## 0 
>> 0 0 0 0 0 0 0 0 ...]) [2 times]

> Could you tell me exactly what you did? I suspect there are more
> places that are not aware of the :parents property that need fixing.

I will first describe the problem adding a local abbrev, I suspect that
fixing that problem would also fix the flyspell problem, since flyspell
uses the local-abbrev command (at least in my setting: I have
set
(setq flyspell-use-global-abbrev-table-p nil))



Steps to reproduce (I attach the files for convenience)

    1. Start emacs -Q

    2. Load the patched abbrev.el provided by Robert

    3. Load or execute the following

       a. (setq abbrev-file-name "~/Abbrev-Doble/.abbrev-new_defs") ; or
          any other path

       b. (read-abbrev-file "~/Abbrev-Doble/.abbrev-double_defs") ; file 
attached

       c. (setq-default abbrev-mode t)

    4. Open a file in fundamental mode, called say new.

    5. Execute (setq local-abbrev-table (list my-abbrev-table 
fundamental-mode-abbrev-table))

    6. Check via edit-abbrevs (note: the properties are not displayed by
       this function! Should that be fixed also?

    7. Check whether the doble expansion works:

       a. Type a que

       b. Indeed it works

    8. Add a local (inverse) abbrev:

       a. Type nacion

       b. Put the cursor at the end of the word

       c. Type C-x a i l

       d. Type naciĆ³n

       e. The error pops up
          obarray-get: Wrong type argument: vectorp, ([## 0 0 0 0 0 0 0 0 0 
...] [## 0 0 0 0 0 0 0 0 0 ...])

    9. Repeat step 7 but use C-x a i g

       a. No error! Understandable because the global abbrev table does
          not have properties.

Did I explain that enough?

Uwe 


Attachment: .abbrev-double_defs
Description: Binary data

Attachment: new
Description: Binary data

Attachment: test-doble-abbrev.el
Description: application/emacs-lisp

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


reply via email to

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