From: Jean Louis <bugs@gnu.support>
To: wilnerthomas@tutanota.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: Setting up abbrev
Date: Sun, 31 Jul 2022 16:08:09 +0300 [thread overview]
Message-ID: <YuZ+ucBrwA9vOR/F@protected.localdomain> (raw)
In-Reply-To: <N8JCX9q--3-2@tutanota.com>
* wilnerthomas--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2022-07-31 15:24]:
> Have seen discussions about abbrev. How does it work exactly, and
> how could I set it up to test it?
It is very handy and useful to use Emacs feature to abbreviate longer
phrases and expand them automatically on the fly.
Best is if you evalute following in Emacs and read it from manual:
(info "(emacs) Abbrevs")
29.2 Defining Abbrevs
=====================
‘C-x a g’
Define an abbrev, using one or more words before point as its
expansion (‘add-global-abbrev’).
‘C-x a l’
Similar, but define an abbrev specific to the current major mode
(‘add-mode-abbrev’).
‘C-x a i g’
Define a word in the buffer as an abbrev
(‘inverse-add-global-abbrev’).
‘C-x a i l’
Define a word in the buffer as a mode-specific abbrev
(‘inverse-add-mode-abbrev’).
‘M-x define-global-abbrev <RET> ABBREV <RET> EXP <RET>’
Define ABBREV as an abbrev expanding into EXP.
‘M-x define-mode-abbrev <RET> ABBREV <RET> EXP <RET>’
Define ABBREV as a mode-specific abbrev expanding into EXP.
‘M-x kill-all-abbrevs’
Discard all abbrev definitions, leaving a blank slate.
Let us say you have following words: We are the champions⬛ and your
cursor is there on the end of the word "champions", you could write
{C-4 C-x a g} and enter into minibuffer: "wechamp" and then any time
you write "wechamp" and press {C-x '} after "wechamp" it would expand
to "We are the champions".
I often use it to expand websites, such as wgnu to expand to
https://www.GNU.org
Then if you do {M-x abbrev-mode RET} the expansion takes place
automatically.
Links in this email are surrounded by curly brackets and represent
Hyperbole package's hyperlinks which may be automatically invoked by
{M-RET}
In fact, my signature below is never automatically added, I use
abbrevs for that. My real signature is:
actfsf
suprms
however, then when I enter "actfsf" it expands into what you see here
below.
So signatures I always add manually, but by using abbrevs. 👀
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
next prev parent reply other threads:[~2022-07-31 13:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-31 12:23 Setting up abbrev wilnerthomas--- via Users list for the GNU Emacs text editor
2022-07-31 13:08 ` Jean Louis [this message]
2022-08-01 3:06 ` Emanuel Berg
2022-08-01 6:04 ` Jean Louis
2022-08-01 7:42 ` Emanuel Berg
[not found] ` <YuZ+ucBrwA9vOR/F@protected.localdomain-N8JMuQk----2>
2022-07-31 15:35 ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-07-31 16:40 ` [External] : " Drew Adams
2022-08-01 6:21 ` Jean Louis
2022-08-01 6:05 ` Jean Louis
2022-07-31 20:02 ` kf
2022-08-01 3:03 ` Emanuel Berg
2022-08-01 10:41 ` uzibalqa
2022-08-01 11:39 ` Emanuel Berg
2022-08-01 14:56 ` [External] : " Drew Adams
2022-08-01 15:14 ` Emanuel Berg
2022-08-01 16:36 ` Drew Adams
2022-08-01 16:57 ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-08-01 18:36 ` Emanuel Berg
2022-08-01 19:20 ` Drew Adams
2022-08-01 16:56 ` tomas
2022-08-01 18:40 ` Emanuel Berg
2022-08-01 20:37 ` tomas
2022-08-01 11:33 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-08-01 11:42 ` Emanuel Berg
2022-08-01 12:54 ` carlmarcos--- via Users list for the GNU Emacs text editor
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YuZ+ucBrwA9vOR/F@protected.localdomain \
--to=bugs@gnu.support \
--cc=help-gnu-emacs@gnu.org \
--cc=wilnerthomas@tutanota.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).