unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19718: read_filtered_event echos mouse events until character is inputted
@ 2015-01-28 20:35 Nick Andryshak
  2018-05-15  2:43 ` Noam Postavsky
  2020-08-25  9:54 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 9+ messages in thread
From: Nick Andryshak @ 2015-01-28 20:35 UTC (permalink / raw)
  To: 19718

[-- 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 --]

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-27 15:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28 20:35 bug#19718: read_filtered_event echos mouse events until character is inputted Nick Andryshak
2018-05-15  2:43 ` 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

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).