unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Radon Rosborough <radon.neon@gmail.com>
To: 31692@debbugs.gnu.org
Subject: bug#31692: Emacs sometimes drops key events
Date: Sat, 2 Jun 2018 20:21:32 -0600	[thread overview]
Message-ID: <CADB4rJHVC43L-DiEpAtaXXnrJRi0uwuYWiGtZXTbZ7ebkRQ8ww@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2376 bytes --]

For the past year or two, my Emacs has occasionally had fits where it
drops some of my key events. The symptom is that I type something like
"radian" and I get "rdian".

This happens more often when things are laggy in general, but also
happens at other times. Usually, my Emacs will get into a state where
it'll do it a lot, at least for a little while, but I can't reliably
reproduce that state.

I noticed that whenever a key is dropped, the text "Quit" is logged in
the *Messages* buffer. However, `keyboard-quit' doesn't get called; I
checked by adding an advice. Something in the C code causes a quit
event to be signaled and also aborts the processing of my key event,
apparently.

I have confirmed that the problem still happens when none of Flycheck,
Company, ElDoc are active. So it's not any of those. I haven't managed
to reproduce the problem when Aggressive Indent is disabled, but that
doesn't necessarily mean that Aggressive Indent is the problem. It
could just be that Aggressive Indent makes my Emacs much slower, and
so the bug is more likely to be observed.

Typically, the dropped key does not even show up in the lossage (C-h
l). However, one time I did notice this curious phenomenon:

     r [self-insert-command]
     a d [self-insert-command]
     i [self-insert-command]
     a [self-insert-command]
     n [self-insert-command]

Where I typed "radian" but what was inserted was "rdian". The
corresponding excerpt of the vector returned by `recent-keys' was:

     114
     (nil . self-insert-command)
     97 100
     (nil . self-insert-command)
     105
     (nil . self-insert-command)
     97
     (nil . self-insert-command)
     110
     (nil . self-insert-command)

In the terminal, I've noticed things like the letters A-D getting
inserted when I use the arrow keys. I presume that this is because one
of the events in the escape sequence is eaten by this bug, and the
rest of it gets misinterpreted.

I have no idea how to go about debugging this, and unfortunately I
don't know how to reliably reproduce the problem. But it's been with
me a long time and it doesn't look like it's going away on its own.
Can someone give me pointers on how to work towards a solution?

Environment information:
  Emacs - 26.1, Homebrew, --with-cocoa --with-modules
  OS - macOS, 10.11.6
  Configuration - https://github.com/raxod502/radian

Thanks,
Radon

[-- Attachment #2: Type: text/html, Size: 3281 bytes --]

             reply	other threads:[~2018-06-03  2:21 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-03  2:21 Radon Rosborough [this message]
2018-06-03  2:36 ` bug#31692: Emacs sometimes drops key events Eli Zaretskii
2018-06-03  4:54   ` Radon Rosborough
2018-06-03 15:05     ` Eli Zaretskii
2018-06-03 19:23       ` Alan Third
2018-06-04 10:41         ` João Távora
2018-06-05  0:59   ` Michael Heerdegen
2018-06-05  2:37     ` Eli Zaretskii
2018-06-05  2:41       ` Radon Rosborough
2018-06-05  4:11         ` Eli Zaretskii
2018-06-05 21:40           ` Michael Heerdegen
2018-06-06  2:37             ` Eli Zaretskii
2018-06-06  2:58               ` Michael Heerdegen
2018-06-06 14:52                 ` Eli Zaretskii
2018-06-06 23:12                   ` Michael Heerdegen
2018-06-07 15:20                     ` Eli Zaretskii
2018-06-06 14:45             ` Eli Zaretskii
2018-06-06 22:50               ` Michael Heerdegen
2018-06-07 15:20                 ` Eli Zaretskii
2018-06-07 15:30                   ` Stefan Monnier
2018-06-07 15:52                     ` Eli Zaretskii
2018-06-07 18:44                       ` Stefan Monnier
2018-06-08 22:17                         ` Michael Heerdegen
2018-06-11 21:08                           ` Michael Heerdegen
2018-06-12  2:27                             ` Eli Zaretskii
2018-06-16  8:26                               ` Eli Zaretskii
2018-06-16  8:28                           ` Eli Zaretskii
2018-06-17  4:39                             ` Michael Heerdegen
2018-07-05 19:07                             ` Michael Heerdegen
2018-07-05 19:27                               ` Eli Zaretskii
2018-07-06 17:43                                 ` Michael Heerdegen
2018-06-05  2:48       ` Michael Heerdegen
2018-06-05  4:13         ` Eli Zaretskii
2018-06-05 11:57           ` Noam Postavsky
2018-06-05 14:31             ` Eli Zaretskii
2018-06-05 21:39               ` Artur Malabarba
2018-06-06 14:39                 ` Eli Zaretskii
2018-06-03 12:13 ` Noam Postavsky

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=CADB4rJHVC43L-DiEpAtaXXnrJRi0uwuYWiGtZXTbZ7ebkRQ8ww@mail.gmail.com \
    --to=radon.neon@gmail.com \
    --cc=31692@debbugs.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).