all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nick Andryshak <nandryshak@gmail.com>
To: 19718@debbugs.gnu.org
Subject: bug#19718: read_filtered_event echos mouse events until character is inputted
Date: Wed, 28 Jan 2015 15:35:43 -0500	[thread overview]
Message-ID: <CAF_1MKW8jOfc3J5tH+ABeWysoqvsaSPrHRHNLHATmLerrHP+BQ@mail.gmail.com> (raw)

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

See this Stack Exchange question:

http://emacs.stackexchange.com/questions/7443/mouse-problem-in-org-mode-export-window

The asker is trying to use the mouse wheel to scroll the org-export-dispatch
window. org-export-dispatch is using the built-in function
read-char-exclusive,
which in turn calls read_filtered_event with the parameter error_nonascii
set to
0. Unlike read-char, which will throw an error upon receiving a mouse event,
read-char-exclusive just keeps retrying, and eventually the echo area will
become full of mouse event names.

Here's the git diff of a small, possible fix for this issue:

$ git diff
diff --git a/src/lread.c b/src/lread.c
index 69ec059..0041b03 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -651,7 +651,10 @@ read_filtered_event (bool no_switch_frame, bool
ascii_required,
              error ("Non-character input-event");
            }
          else
-           goto retry;
+            {
+              message1 (0);
+              goto retry;
+            }
        }
     }


Nick Andryshak

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

             reply	other threads:[~2015-01-28 20:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 20:35 Nick Andryshak [this message]
2018-05-15  2:43 ` bug#19718: read_filtered_event echos mouse events until character is inputted Noam Postavsky
2020-08-25  9:54 ` Lars Ingebrigtsen
2020-08-25  9:58   ` Eli Zaretskii
2020-08-25 10:13     ` Lars Ingebrigtsen
2020-08-25 10:38       ` Eli Zaretskii
2020-08-25 10:40         ` Lars Ingebrigtsen
2022-01-24 17:19           ` Lars Ingebrigtsen
2022-01-27 15:21             ` Lars Ingebrigtsen

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=CAF_1MKW8jOfc3J5tH+ABeWysoqvsaSPrHRHNLHATmLerrHP+BQ@mail.gmail.com \
    --to=nandryshak@gmail.com \
    --cc=19718@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 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.