[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Abbrev for shorthand purposes
From: |
kf |
Subject: |
Re: Abbrev for shorthand purposes |
Date: |
Sat, 6 Aug 2022 20:08:06 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
On 8/5/22 1:31 AM, uzibalqa via Users list for the GNU Emacs text editor
wrote:
Have been trying to use abbrev for shorthand purposes. I can go from text to
shorthand but not the other way round, because
of the punctuation. Is there something I can do? Use of abbrev-mode also fails
in situations when different the same abbreviation
could expand to more than one word.
("wayward" "wa/") ("westward" "W/")
("adjustment" "ajs-") ("armament" "am-")
("basement" "bs-") ("casement" "ks-")
("enactment" "nak-") ("enjoyment" "njy-")
("enlargement" "nlj-") ("entertainment" "Ntn-") ("measurement" "mz/-") ("movement"
"mv-")
("recommend" "rk-") ("require" "rqi") ("separate" "sp;")
("silk" "slk") ("struck" "Sk") ("subject" "sj")
Since no one else has yet to reply, I'll jump in with my non-expertise.
I see at least two problems: (1) the order of your terms is reversed,
e.g., '("wayward" "wa/")' should be '("wa/" "wayward")' and (2) those
term pairs should be one to a line, at least that's how emacs has always
constructed my ~/.abbrevs file.
In addition, there are some other terms to each line. Here's a small
part of my ~/.abbrevs file:
....
(define-abbrev-table 'global-abbrev-table
'(
("aann" "Just got an annoyance phone call." nil :count 14)
("abck" "back" nil :count 3)
("abiltiy" "ability" nil :count 2)
("abotu" "about" nil :count 41)
("abt" "about" nil :count 1)
("abuot" "about" nil :count 7)
....
The first line defines a table of abbrevs for all modes. My ~/.abbrevs
contains multiple tables, each for a different mode.
Note that there are 5 elements to each line. Unfortunately, I
understand only the first two, but that much has worked for me for a
long time.
hth.