GNU bug report logs -
#78863
31.0.50; Feature request: add option for greedy looking-back to abbrev-before-point
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 28 Jun 2025 12:54:55 +0300
with message-id <868qlc6vio.fsf <at> gnu.org>
and subject line Re: bug#78863: 31.0.50; Feature request: add option for greedy looking-back to abbrev-before-point
has caused the debbugs.gnu.org bug report #78863,
regarding 31.0.50; Feature request: add option for greedy looking-back to abbrev-before-point
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
78863: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78863
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
This is a feature request: I have a keyboard layout with many Unicode
symbols like ∀ and such, which I would like to define abbrevs with, so
for instance I would like to define "o∀" to expand to "overall". This
doesn't work when the abbrev is isolated using backward-word, but can be
implemented using the :regexp property of `define-abbrev-table'. I would
like to define many such mixed abbrevs this way, using a regexp like
(rx (group (* (not (or space "-" "_")))))
to isolate abbrevs. The trouble is that `abbrev--before-point' uses
(looking-back re (line-beginning-position))
to isolate an abbrev when a regexp is given, which matches non-greedily.
This could be fixed fairly easily from my understanding by providing an
optional argument to `expand-abbrev' that sets the GREEDY argument of
`looking-back', which would cause `looking-back' to match greedily. I'm
guessing that this would make `looking-back' even slower but it would be
optional and a modern machine should be able to handle the matching, I'd
guess. And it would make the :regexp property of abbrev-tables a lot
more useful, I'd say.
[Message part 3 (message/rfc822, inline)]
> Date: Mon, 23 Jun 2025 16:26:55 +0000
> From: Alexander Prähauser <ahprae <at> protonmail.com>
> Cc: 78863 <at> debbugs.gnu.org
>
> "Eli Zaretskii" <eliz <at> gnu.org> writes:
>
> > [Please use Reply All to reply, to keep the bug tracker CC'd.]
>
> Oh, sorry, I meant to.
>
> > Does this mean we can close this bug? Or would you still like to
> > discuss the extension of the regexp specifications of abbrevs?
>
> You can as far as I'm concerned. I'm legitimately unsure whether it
> would be useful for other people to have the option I described, but
> with these tools already in place I think it's probably unnecessary.
OK, so closing the bug.
This bug report was last modified 56 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.