From: Dmitry Gutov <dgutov@yandex.ru>
To: 23980@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#23980: 25.0.95; Events put in `unread-command-events' can be wrongly handled
Date: Tue, 20 Feb 2018 17:35:15 +0200 [thread overview]
Message-ID: <92f514d5-ca5e-e341-a625-8c94a85cb679@yandex.ru> (raw)
In-Reply-To: <CAP4=87EAStWsyCASr9jReQPCByALbEMt87NNDr+J92B8VZ4-=g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 733 bytes --]
On 11/19/17 11:39 AM, Chris Feng wrote:
> The bug was fixed by 1f3f4b1296.
Eli, any change to have this backported to emacs-26?
This reason I'm asking is, this fixed a rather nasty bug resulting from
the interaction between the newest company-mode (0.9.5) and
flyspell-mode, both of which use sit-for. This particular combination
results in a timer being run inside a sit-for, which also calls sit-for,
which in emacs-26 ends up putting e.g. (t t . 45) into
unread-command-events.
Here's how to reproduce:
- Visit the attached file.
- M-x eval-buffer.
- Start typing.
- See "<t> is undefined" in the minibuffer for every other keypress.
Originally reported here:
https://github.com/company-mode/company-mode/issues/760
[-- Attachment #2: sit-for-bug.el --]
[-- Type: text/x-emacs-lisp, Size: 427 bytes --]
(defvar foo-timer nil)
(defun foo-pre-command ()
(when foo-timer
(cancel-timer foo-timer)
(setq foo-timer nil)))
(defun foo-post-command ()
(run-with-timer 0.01 nil #'foo-idle))
(defun foo-idle ()
(sit-for 5))
(add-hook 'pre-command-hook 'foo-pre-command)
(add-hook 'post-command-hook 'foo-post-command)
(flyspell-mode)
;; This causes unread-command-events to sometimes contain
;; e.g. ((t t . 45))
mmmmmm
next prev parent reply other threads:[~2018-02-20 15:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-14 14:03 bug#23980: 25.0.95; Events put in `unread-command-events' can be wrongly handled Chris Feng
2017-11-19 9:39 ` Chris Feng
2018-02-20 15:35 ` Dmitry Gutov [this message]
2018-02-20 18:37 ` Eli Zaretskii
2018-02-20 21:16 ` Dmitry Gutov
2018-02-21 4:22 ` Eli Zaretskii
2018-02-21 7:40 ` Chris Feng
2018-02-21 10:47 ` Dmitry Gutov
2018-02-21 12:23 ` Dmitry Gutov
2018-02-21 17:48 ` Eli Zaretskii
2018-02-21 21:45 ` Dmitry Gutov
2018-02-22 7:39 ` Eli Zaretskii
2018-12-19 13:54 ` Dmitry Gutov
2018-12-19 15:27 ` Eli Zaretskii
2018-12-19 16:07 ` Dmitry Gutov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=92f514d5-ca5e-e341-a625-8c94a85cb679@yandex.ru \
--to=dgutov@yandex.ru \
--cc=23980@debbugs.gnu.org \
--cc=eliz@gnu.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 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).