GNU bug report logs - #36243
26.2; defining inverse abbrevs include space

Previous Next

Package: emacs;

Reported by: Allen Li <darkfeline <at> felesatra.moe>

Date: Sun, 16 Jun 2019 10:36:02 UTC

Severity: normal

Tags: fixed

Found in version 26.2

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Allen Li <darkfeline <at> felesatra.moe>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.2; defining inverse abbrevs include space
Date: Sun, 16 Jun 2019 10:35:09 +0000
[Message part 1 (text/plain, inline)]
Defining an inverse abbrev in a buffer like so (@ is point):

some text foo @

C-x a i l find outer otter RET

defines an abbrev "foo " -> "find outer otter"

This abbrev is impossible to expand because it ends in a non-word
character.

It would be more convenient if the inverse abbrev definition commands
skips trailing non-word characters, e.g. in the example above defining
"foo" -> "find outer otter".  The use case for this is that I often type
something that I think should be an abbrev and upon finding that it is
not defined, I must delete the previous character before using
inverse-add-{mode,global}-abbrev.

Note that this bug affects all positive prefix arguments to
inverse-add-{mode,global}-abbrev, e.g.:

some text: .... foo @

C-u 2 C-x a i l will attempt to define an abbrev "text: .... " -> "blah",
which is completely useless.

I have attached a patch fixing this, with regression tests.

In GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.8)
 of 2019-04-12 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.12005000
[0001-Fix-defining-inverse-abbrevs-on-previous-words.patch (text/x-patch, attachment)]

This bug report was last modified 5 years and 331 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.