GNU bug report logs -
#6256
24.0.50; read-event in `repeat' command
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Mon, 24 May 2010 15:13:02 UTC
Severity: normal
Found in version 24.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #61 received at 6256-done <at> debbugs.gnu.org (full text, mbox):
>> But that doesn't work either in my tests: the problem is that the
>> last-command-event was `mouse-4' (i.e. the up event) whereas
>> read-event returns `down-mouse-4' (a subsequent read-event would
>> return the `mouse-4').
> No doubt that is a difference between Emacs on Windows and Emacs on GNU.
> BTW, the behavior you describe doesn't really seem very right for
> a mouse wheel: Why should the first wheel event be `down-'?
Under X11, wheel-up and wheel-down events are buttons, so they get
pressed&released like any other (actually, it seems to be the case for
the hardware as well, so it's not a complete invention of the X11
layer). I.e. when you turn up the wheel by 3 steps, you get 6 events.
> I would think that `down-' would only be called for when you press the
> mouse wheel (as in mouse-2 clicking using the wheel). Whatever.
You also get such a down in that case, but that's a down-mouse-2 rather
than a down-mouse-4 or down-mouse-5: pressing on the wheel is
a completely different button from "turning the wheel".
> Seems like the Emacs mouse-wheel behavior on Windows (the events) is
> generally superior to that on GNU.
Yes, tho it's mostly not Emacs's fault. X11's handling of wheels is
not great.
> What about fixing the latter so that it comes up to speed?
> Another problem is that it precludes having `mouse-4' and `mouse-5'
> correspond to actual mouse buttons.
That's a general problem under X11, yes. There are various ways to work
around the problem, but it's a source of annoyances. Typically, the
additional buttons will then appear not as mouse-4/5 but for example as
mouse-6,7,8.
>> For my case, replacing the read-event by `read-key' happens to make
>> it work (see patch below). Please confirm whether or not it fixes it
>> for you, and if it doesn't, please show me the values of
>> `repeat-repeat-char' and `evt' in the above test.
>> + (while (let ((evt (read-key)))
>> ;; For clicks, we need to strip the meta-data to
>> ;; check the underlying event name.
>> (eq (or (car-safe evt) evt)
> Yes, that works for me too. Please install it if you see no problems
> with it. Thx.
Thanks, it's installed in emacs-23, closed,
Stefan
This bug report was last modified 14 years and 272 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.