From: Juri Linkov <juri@linkov.net>
To: Alan Third <alan@idiocy.org>
Cc: 36516@debbugs.gnu.org
Subject: bug#36516: Wrong dynamic abbrev expansion after space
Date: Sat, 03 Aug 2019 23:58:13 +0300 [thread overview]
Message-ID: <877e7ux8q6.fsf@mail.linkov.net> (raw)
In-Reply-To: <20190803113439.GC31224@breton.holly.idiocy.org> (Alan Third's message of "Sat, 3 Aug 2019 12:34:39 +0100")
>> Maybe it's possible to break out of the vicious cycle of ‘SPC M-/’
>> repetitions by making ‘SPC M-/’ look like a normal expansion, e.g.:
>
> This looks good to me. The only problem is it breaks the test for
> bug#1948. I think it no longer squashes all the spaces.
Sorry for breaking the test, I'll try to find a fix that will pass all tests.
Meanwhile, I started to rely heavily on consequent calls of M-/ and
today this feature reared its ugly head (so then could it be called
a misfeature). Here's is the case that raises the error:
0. emacs -Q
1. Type these two lines:
str 1
str 2
(optionally set debug-on-error to t)
2. On the third line type:
s ;; self-insert-command
M-/ ;; dabbrev-expand
SPC ;; self-insert-command
M-/ ;; dabbrev-expand
M-/ ;; dabbrev-expand
<backspace> ;; backward-delete-char-untabify
<backspace> ;; backward-delete-char-untabify
<backspace> ;; backward-delete-char-untabify
<backspace> ;; backward-delete-char-untabify
<backspace> ;; backward-delete-char-untabify
The amount of <backspace> keypresses depends on the length
of the random word expanded, so the intention is to delete
that word and the space character.
SPC ;; self-insert-command
M-/ ;; dabbrev-expand
and the bug is revealed that signals this error:
Debugger entered--Lisp error: (search-failed "\\(?:\\sw\\|\\s_\\)+")
re-search-forward("\\(?:\\sw\\|\\s_\\)+")
dabbrev-expand(nil)
funcall-interactively(dabbrev-expand nil)
call-interactively(dabbrev-expand nil nil)
command-execute(dabbrev-expand)
next prev parent reply other threads:[~2019-08-03 20:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-05 18:38 bug#36516: Wrong dynamic abbrev expansion after space Juri Linkov
2019-07-05 19:23 ` Eli Zaretskii
2019-07-07 22:13 ` Juri Linkov
2019-07-08 2:33 ` Eli Zaretskii
2019-07-08 21:35 ` Juri Linkov
2019-07-13 8:10 ` Eli Zaretskii
2019-07-27 17:18 ` Alan Third
2019-07-28 20:47 ` Juri Linkov
2019-08-03 11:34 ` Alan Third
2019-08-03 20:58 ` Juri Linkov [this message]
2020-08-22 14:18 ` Lars Ingebrigtsen
2020-08-23 18:43 ` Juri Linkov
2019-07-22 15:34 ` Noam Postavsky
2019-07-23 21:15 ` Juri Linkov
2019-07-23 21:27 ` Noam Postavsky
2019-07-27 10:26 ` Alan Third
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877e7ux8q6.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=36516@debbugs.gnu.org \
--cc=alan@idiocy.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.