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

From: Uwe Brauer <[email-masked]>
Date: Tue, 12 Jan 2021 14:26:29 +0100

>>> "RP" == Robert Pluim <[email-masked]> writes:

> Uwe Brauer <[email-masked]> writes:
>>> Uwe Brauer <[email-masked]> writes:
>> 
>>> It should have been, and was in my testing
>> 
>> 
>>> Iʼve only tested my code, not proven it bug-free :-)
>> 
>> 
>> I think I found a bug. I restart my emacs with your patched abbrev file
>> and all my stuff, then I obtain the following error:
>> 
>> Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" ".abbrev_defs")
>> load(".abbrev_defs" nil t)
>> read-abbrev-file(".abbrev_defs" t)
>> quietly-read-abbrev-file(".abbrev_defs")
>> command-line()
>> normal-top-level()
>> 

> What's your 'abbrev-file-name' set to? Emacs uses 'load' to read it,

,----
| abbrev-file-name is a variable defined in ‘abbrev.el’.
| Its value is ".abbrev_defs"
| Original value was 
| "/home/oub/.abbrev_defs"
| 
|   You can customize this variable.
| 
| Documentation:
| Default name of file from which to read abbrevs.
`----

The default value .abbrev_defs seems odd to me shouldn't it per default
be
"~/.abbrev_defs" at least for Unix/BSD dialects and MacOS?

> so it should be a complete pathname, ie "~/.abbrev_defs", or it should
> be in your 'load-path' somewhere.

But the point is. If I use the vanilla abbrev file from master I don't
get an error, with your patched version I do, but I think I know what's
up, I had some old abbrev.el file somewhere in my load path. Because
with abbrev vanilla from emacs master, my abbrevs are not loaded.
I check that and re try your patched version later (I still struggle
with flyspells abbrev mechanism).