GNU bug report logs -
#35397
flyspell-mode affects delete-selection-mode
Previous Next
To reply to this bug, email your comments to 35397 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#35397
; Package
emacs
.
(Tue, 23 Apr 2019 15:46:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Евгений Курневский <kurnevsky <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 23 Apr 2019 15:46:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Emacs version: 26.2
Steps to reproduce:
emacs -Q
M-x delete-selection-mode
M-x flyspell-mode
Type one word, select it and type one character. This character will be
selected for flyspell-delay seconds.
Desired behavior - selection disappears right after new character is
inserted, as without flyspell-mode.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#35397
; Package
emacs
.
(Sun, 30 Jun 2019 16:50:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 35397 <at> debbugs.gnu.org (full text, mbox):
Евгений Курневский <kurnevsky <at> gmail.com> writes:
> Emacs version: 26.2
> Steps to reproduce:
> emacs -Q
> M-x delete-selection-mode
> M-x flyspell-mode
> Type one word, select it and type one character. This character will be selected for flyspell-delay seconds.
> Desired behavior - selection disappears right after new character is inserted, as without flyspell-mode.
I tried the following steps:
0. emacs -Q
1. M-x delete-selection-mode
2. M-x flyspell-mode
3. foobar C-SPC C-a x
What I see is that "x" is highlighted for flyspell-delay seconds. If I
continue typing before that, the highlighting immediately disappears.
If I type "1" instead of "x", there is no highlighting.
Crucially, the "x" does not get replaced by subsequent characters, as it
would have been under delete-selection-mode if the "x" was actually
selected. In other words, if you change step three to:
3. foobar C-SPC C-a xyz
You see a buffer containing "xyz".
Thus, the problem seems to be the highlighting only, which could perhaps
be somewhat confusing to a user. I think this is indeed a bug (or
buglet), although its mostly cosmetic.
Could you please confirm this, or are you talking about something else?
Thanks,
Stefan Kangas
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#35397
; Package
emacs
.
(Sun, 30 Jun 2019 17:55:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 35397 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Yes, you are right, the problem is with highlighting. But there is another
undesired consequence - flyspell mode prevents `company` popup in this
case, it appears only after second character is typed. I investigated it a
bit and it seems it's caused by `sit-for` used inside
`flyspell-check-word-p`. So I came up with a workaround that solves both
these issues:
(advice-add 'flyspell-check-word-p :around (lambda (orig-fun &rest args)
(if (eq this-command
'self-insert-command)
(memq
(get-char-code-property (char-before) 'general-category) '(Zs Zl Zp))
(apply orig-fun args))))
This makes flyspell return immediately when `self-insert-command` was used.
[Message part 2 (text/html, inline)]
Severity set to 'minor' from 'normal'
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Mon, 01 Jul 2019 04:50:02 GMT)
Full text and
rfc822 format available.
Severity set to 'wishlist' from 'minor'
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Fri, 23 Aug 2019 06:40:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 298 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.