From: Uwe Brauer <oub@mat.ucm.es>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: larsi@gnus.org, Robert Pluim <rpluim@gmail.com>, 45693@debbugs.gnu.org
Subject: bug#45693: [two word expansion works, but write-abbrev-file destroys it]
Date: Wed, 13 Jan 2021 08:37:04 +0100 [thread overview]
Message-ID: <87h7nl2spr.fsf@mat.ucm.es> (raw)
In-Reply-To: <87v9cam56e.fsf@mat.ucm.es>
[-- Attachment #1.1: Type: text/plain, Size: 2549 bytes --]
>>> "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 #1.2: .abbrev-double_defs --]
[-- Type: application/octet-stream, Size: 292 bytes --]
;;-*-coding: utf-8;-*-
(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)
("a final" "al final" nil :count 34)
)
"Uwe's table"
:regexp "\\(\\w+ \\w+\\)")
[-- Attachment #1.3: new --]
[-- Type: application/octet-stream, Size: 366 bytes --]
(setq local-abbrev-table (list my-abbrev-table fundamental-mode-abbrev-table))
así
a que
nacion nación
(write-abbrev-file "~/Abbrev-Doble/.abbrev-new_defs")
# flyspell stuff
(ispell-change-dictionary "castellano8" nil)
(global-set-key [(shift home)] 'flyspell-auto-correct-word)
(setq flyspell-abbrev-p t)
(setq flyspell-use-global-abbrev-table-p nil)
[-- Attachment #1.4: test-doble-abbrev.el --]
[-- Type: application/emacs-lisp, Size: 236 bytes --]
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
next prev parent reply other threads:[~2021-01-13 7:37 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 15:54 bug#45693: 28.0.50; abbrev does not expand two words any more Uwe Brauer
2021-01-10 14:35 ` Lars Ingebrigtsen
2021-01-10 15:51 ` Uwe Brauer
2021-01-10 15:52 ` Lars Ingebrigtsen
2021-01-10 17:22 ` Uwe Brauer
2021-01-10 21:21 ` 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) Uwe Brauer
2021-01-11 10:49 ` bug#45693: [two word expansion works, but write-abbrev-file destroys it] Robert Pluim
2021-01-11 15:26 ` Eli Zaretskii
2021-01-11 15:50 ` Uwe Brauer
2021-01-11 17:38 ` Robert Pluim
2021-01-11 20:17 ` Uwe Brauer
2021-01-11 20:38 ` Robert Pluim
2021-01-11 20:48 ` Uwe Brauer
2021-01-11 21:03 ` Robert Pluim
2021-01-12 8:01 ` Uwe Brauer
2021-01-12 10:34 ` Robert Pluim
2021-01-12 13:26 ` Uwe Brauer
2021-01-12 16:45 ` Uwe Brauer
2021-01-12 17:59 ` Robert Pluim
2021-01-13 7:37 ` Uwe Brauer [this message]
2021-01-13 9:16 ` Robert Pluim
2021-01-13 9:28 ` Uwe Brauer
2021-01-13 9:39 ` Robert Pluim
2021-01-13 9:51 ` Uwe Brauer
2021-01-13 10:09 ` Robert Pluim
2021-01-13 13:18 ` Uwe Brauer
2021-01-13 14:03 ` Robert Pluim
2021-01-13 16:25 ` Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h7nl2spr.fsf@mat.ucm.es \
--to=oub@mat.ucm.es \
--cc=45693@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=rpluim@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.