* bug#16702: 24.3.50; flyspell in message mode messes up latin prefix input
@ 2014-02-09 17:16 Ivan Kanis
2014-02-11 18:41 ` Agustin Martin
0 siblings, 1 reply; 6+ messages in thread
From: Ivan Kanis @ 2014-02-09 17:16 UTC (permalink / raw)
To: 16702
1) emacs -Q
2) eval the following in *scratch*
(add-hook 'message-signature-setup-hook (lambda () (flyspell-mode 1)))
3) M-x gnus-msg-mail
4) C-\ latin-prefix
5) d'
I expect a ' with a underscore instead I get the following in the echo
area:
' '[ 'AEIOUWYaeiouwy]
I don't have the ispell program installed, I use aspell instead.
In GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.20)
of 2014-02-08 on tao.kanis.fr
Repository revision: 116348 michael.albinus@gmx.de-20140208133515-mgy8agwqq4nc6bfb
Windowing system distributor `The X.Org Foundation', version 11.0.11403000
System Description: Ubuntu 13.10
Configured using:
`configure --prefix=/home/ivan/emacs-bzr --without-compress-install
'CFLAGS=-g -DSYSTEM_PURESIZE_EXTRA=1000000''
Important settings:
value of $LANG: en_US.UTF8
locale-coding-system: utf-8-unix
Major mode: Message
Minor modes in effect:
flyspell-mode: t
mml-mode: t
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
auto-fill-function: message-do-auto-fill
transient-mark-mode: t
abbrev-mode: t
Recent input:
C-y H-i H-i H-i H-i <up> <up> <up> C-e C-x C-e <down>
<down> C-e C-x C-e M-x g n u s m s <backspace> <backspace>
- s m <backspace> <backspace> m s <tab> <return> C-\
j a <tab> <return> g e n k i SPC <return> g M-x r e
p <tab> o <tab> r <tab> <return>
Recent messages:
H-i is undefined [4 times]
ivan-message-setup
(ivan-message-setup)
Gnus not running; using plain Message mode
Mark set
Starting new Ispell process /usr/bin/aspell with default dictionary...
Loading quail/japanese...done
Loading /home/ivan/.kkcrc...done
Loading ja-dic/ja-dic...done
Making completion list... [2 times]
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug sendmail ja-dic mule-util cus-start
cus-load japan-util kkc ja-dic-utl quail help-mode hashcash flyspell
ispell gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime
smime password-cache dig mailcap gnus-sum nnoo gnus-group gnus-undo
nnmail mail-source gnus-start gnus-spec gnus-int gnus-range gnus-win
message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
gmm-utils mailheader gnus gnus-ems nnheader gnus-util mail-utils mm-util
help-fns mail-prsvr wid-edit cl-loaddefs cl-lib time-date tooltip
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#16702: 24.3.50; flyspell in message mode messes up latin prefix input
2014-02-09 17:16 bug#16702: 24.3.50; flyspell in message mode messes up latin prefix input Ivan Kanis
@ 2014-02-11 18:41 ` Agustin Martin
2014-02-12 21:36 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Agustin Martin @ 2014-02-11 18:41 UTC (permalink / raw)
To: Ivan Kanis, 16702
On Sun, Feb 09, 2014 at 06:16:51PM +0100, Ivan Kanis wrote:
> 1) emacs -Q
> 2) eval the following in *scratch*
>
> (add-hook 'message-signature-setup-hook (lambda () (flyspell-mode 1)))
>
> 3) M-x gnus-msg-mail
> 4) C-\ latin-prefix
> 5) d'
>
> I expect a ' with a underscore instead I get the following in the echo
> area:
>
> ' '[ 'AEIOUWYaeiouwy]
>
> I don't have the ispell program installed, I use aspell instead.
Hi,
For the records I get the same result if I skip the step to enable
flyspell. Seems unrelated to flyspell.
Regards,
--
Agustin
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#16702: 24.3.50; flyspell in message mode messes up latin prefix input
2014-02-11 18:41 ` Agustin Martin
@ 2014-02-12 21:36 ` Glenn Morris
2014-02-12 22:04 ` Glenn Morris
2014-02-13 16:26 ` Eli Zaretskii
0 siblings, 2 replies; 6+ messages in thread
From: Glenn Morris @ 2014-02-12 21:36 UTC (permalink / raw)
To: Agustin Martin; +Cc: Ivan Kanis, 16702
Agustin Martin wrote:
> For the records I get the same result if I skip the step to enable
> flyspell.
I don't. (It does seem unrelated to gnus-msg-mail though, so not sure
why that was included in the description.)
emacs -Q
C-\ latin-prefix RET
d'
-> now displayed in the buffer "d" followed by "'" with underline.
Echo area displays stuff you can input next.
Repeat with
emacs -Q -f flyspell-mode
and just see "d" followed by nothing in the buffer, and one extra
element at the front of the echo area list.
It seems to be just a display issue, because the input method still
works (eg if you type "d'y", you get "d" followed by an accented "y".)
This is a change from 24.3.
(Also, this is fairly obviously a duplicate of
http://debbugs.gnu.org/16701; did it really need two reports? )
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#16702: 24.3.50; flyspell in message mode messes up latin prefix input
2014-02-12 21:36 ` Glenn Morris
@ 2014-02-12 22:04 ` Glenn Morris
2014-02-13 16:26 ` Eli Zaretskii
1 sibling, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2014-02-12 22:04 UTC (permalink / raw)
To: Agustin Martin; +Cc: Ivan Kanis, 16702
PS loading 24.3's flyspell.el in current trunk does not help, so it's
not a change in flyspell.el causing this.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#16702: 24.3.50; flyspell in message mode messes up latin prefix input
2014-02-12 21:36 ` Glenn Morris
2014-02-12 22:04 ` Glenn Morris
@ 2014-02-13 16:26 ` Eli Zaretskii
2014-02-13 17:17 ` Stefan Monnier
1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2014-02-13 16:26 UTC (permalink / raw)
To: Glenn Morris, Stefan Monnier; +Cc: agustin.martin, ivan, 16702
> From: Glenn Morris <rgm@gnu.org>
> Date: Wed, 12 Feb 2014 16:36:31 -0500
> Cc: Ivan Kanis <ivan@tao.kanis.fr>, 16702@debbugs.gnu.org
>
> emacs -Q
> C-\ latin-prefix RET
> d'
> -> now displayed in the buffer "d" followed by "'" with underline.
> Echo area displays stuff you can input next.
>
>
> Repeat with
> emacs -Q -f flyspell-mode
>
> and just see "d" followed by nothing in the buffer, and one extra
> element at the front of the echo area list.
>
>
> It seems to be just a display issue, because the input method still
> works (eg if you type "d'y", you get "d" followed by an accented "y".)
I see the same symptoms, but I don't think it's a display issue. I
think it's an issue with how we read events in sit-for.
The problem seems to be with this code in flyspell (part of
flyspell-check-word-p):
(cond
((get this-command 'flyspell-deplacement)
(not (eq flyspell-previous-command this-command)))
((get this-command 'flyspell-delayed)
;; The current command is not delayed, that
;; is that we must check the word now.
(and (not unread-command-events) <<<<<<<<<<<<<<<<<<<
(sit-for flyspell-delay))) <<<<<<<<<<<<<<<<<<<
(t t)))
This is Flyspell giving the user a chance to take a short break while
typing a word, and avoid spell-checking incomplete words. If you
customize flyspell-delay to zero, the problem goes away.
The change that introduced this bug is the following portion of
revision 113293:
- (let ((read (read-event nil nil seconds)))
+ ;; FIXME: we should not read-event here at all, because it's much too
+ ;; difficult to reliably "undo" a read-event by pushing it onto
+ ;; unread-command-events.
+ (let ((read (read-event nil t seconds)))
We now call read-event with 2nd arg t instead of nil. If I revert
this single change, the problem goes away even without zeroing out
flyspell-delay.
Of course, I'm not saying we should actually revert this change: it
was done for a reason. But hopefully, Stefan, who made that change,
will know how to fix this problem, which is that asking sit-for to
read events while inheriting the input method sometimes isn't TRT.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#16702: 24.3.50; flyspell in message mode messes up latin prefix input
2014-02-13 16:26 ` Eli Zaretskii
@ 2014-02-13 17:17 ` Stefan Monnier
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2014-02-13 17:17 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: ivan, 16702, agustin.martin
> Of course, I'm not saying we should actually revert this change: it
> was done for a reason.
The reason was another interaction with the same sit-for in flyspell,
where the event read needed to be read while inheriting input method.
We fundamentally have two bugs:
- sit-for shouldn't use read-event: as noted it's impossible to
undo it via unread-command-events.
- flyspell shouldn't use sit-for: it should return immediately and start
a timer to do the delayed check.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-13 17:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-09 17:16 bug#16702: 24.3.50; flyspell in message mode messes up latin prefix input Ivan Kanis
2014-02-11 18:41 ` Agustin Martin
2014-02-12 21:36 ` Glenn Morris
2014-02-12 22:04 ` Glenn Morris
2014-02-13 16:26 ` Eli Zaretskii
2014-02-13 17:17 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).