Questions tagged [abbrev]

is for the abbreviation feature of Emacs where a string of characters are expanded to a longer string. Mainly used to reduce typing, `abbrev` are recorded in a table that is shared locally, among buffers of the same major mode, or even globally. Some Emacs features, such as mail, implement their own `abbrev` functionality. Use additional tags when appropriate.

11 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
104 views

How to cycle between language specific abbrev tables in a buffer?

I have (human-)language-specific abbrev-tables named like lang-francais-mode-abbrev-table, lang-castellano8-mode-abbrev-table backed by my ~/.emacs.d/abbrev_defs file. The language names are the ...
2
votes
0answers
94 views

specify global-abbrev-table in a separate file

I know one can define where abbrev files are saved with something like this (setq abbrev-file-name "/home/zeltak/.emacs.d/abbrv/personal_abbrv.txt") but this file has several section like (define-...
1
vote
0answers
13 views

How can I always expand abbrevs with prefixes?

How can I remove the need to use M-' for abbrevs with a prefix? From the manual: You may wish to expand an abbrev and attach a prefix to the expansion; for example, if cnst expands into ...
1
vote
0answers
67 views

Can you use a regexp in an abbrev definition?

I want to replace words like 1st with 1^{st} and 102nd with 102^{nd} while typing in emacs. Basically I want to replace things that match this: "\([0-9]+\)\(st\|nd\|rd\|th\)" with this \1^{\2} as I ...
1
vote
0answers
152 views

Triggering abbreviation expansion or auto completion automatically from a regular expression match?

With abbrev mode, I can define abbreviations that trigger when I type a certain term. For example, typing "yn" would be expanded to "Your Name". For this, "yn" must have been defined as an ...
0
votes
0answers
15 views

Abbrev-mode is not counting a number of expanding

When I use abbrev-mode in Emacs 27, it works very nicely. However, the counting for the expanding word always shows :count 0 after restarting emacs like below: ("tt" "test" nil :...
0
votes
1answer
30 views

How to prevent <RET> from triggering abbrev expansion?

I am trying to stop emacs from expanding abbrevs after I press the return key. If I press return, I simply want to create a new line without expanding any abbrev at point. I am relatively new at elisp....
0
votes
0answers
23 views

How to disable Emacs asking if user wants to save abbrevs defined with :system property in a major mode

My Emacs version is 27.1 I am developing a major mode and I want to include some abbrevs to ship with it. I noticed that Emacs asks if user wants to save the abbrevs even if abbrevs have property :...
0
votes
0answers
13 views

Ensuring multiple abbrevs expand to same string

I would like to define multiple abbrevs that expand to the same string. Currently, I have the following in my abbrevs file. (define-abbrev-table 'global-abbrev-table '(("abbrev1" "...
0
votes
2answers
80 views

Automatically `expand-abbrev` with `org-meta-return` and `org-insert-heading-respect-content`

I take notes with org-mode and abbrev-mode. Normally pressing SPC or RET leads to any abbreviations at point expanding before the edit is made. This doesn't happen when I use C-RET (org-insert-...
0
votes
0answers
66 views

How to use abbrev with different configuration for each mode?

How can abbrev-mode be enabled per mode (so enable for org-mode and python-mode for example, but not other modes).And each mode use its own set of abbreviations?