From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6256: 24.0.50; read-event in `repeat' command Date: Mon, 18 Oct 2010 21:13:19 -0400 Message-ID: References: <058F2FC300154C1AB894694655B2A968@us.oracle.com> <90A72397ABF34D84A3ACB3B6DE18F74A@us.oracle.com> <7373B32B6D1648C2961BED0F625426FF@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1287466977 29213 80.91.229.12 (19 Oct 2010 05:42:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 19 Oct 2010 05:42:57 +0000 (UTC) To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 19 07:42:55 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P84yN-0003yQ-9a for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Oct 2010 07:42:55 +0200 Original-Received: from localhost ([127.0.0.1]:40307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P84yM-0003Nm-Dz for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Oct 2010 01:42:54 -0400 Original-Received: from [140.186.70.92] (port=55939 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P84y8-0003Nb-OA for bug-gnu-emacs@gnu.org; Tue, 19 Oct 2010 01:42:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P84y3-0007yT-TN for bug-gnu-emacs@gnu.org; Tue, 19 Oct 2010 01:42:40 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P84y3-0007yP-RO for bug-gnu-emacs@gnu.org; Tue, 19 Oct 2010 01:42:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P84g6-0004qi-PM for bug-gnu-emacs@gnu.org; Tue, 19 Oct 2010 01:24:02 -0400 Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Oct 2010 05:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 6256 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 6256@debbugs.gnu.org, monnier@iro.umontreal.ca Original-Received: via spool by 6256-done@debbugs.gnu.org id=D6256.128746582218633 (code D ref 6256); Tue, 19 Oct 2010 05:24:02 +0000 Original-Received: (at 6256-done) by debbugs.gnu.org; 19 Oct 2010 05:23:42 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P84fl-0004qU-Q2 for submit@debbugs.gnu.org; Tue, 19 Oct 2010 01:23:42 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P80hs-0003Bn-FY for 6256-done@debbugs.gnu.org; Mon, 18 Oct 2010 21:09:37 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjALAD6NvExMCpO7/2dsb2JhbACgVXlyw16FSQSSGQ X-IronPort-AV: E=Sophos;i="4.57,347,1283745600"; d="scan'208";a="80065585" Original-Received: from 76-10-147-187.dsl.teksavvy.com (HELO pastel.home) ([76.10.147.187]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 18 Oct 2010 21:13:19 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 61F7AA8233; Mon, 18 Oct 2010 21:13:19 -0400 (EDT) In-Reply-To: <7373B32B6D1648C2961BED0F625426FF@us.oracle.com> (Drew Adams's message of "Mon, 18 Oct 2010 14:12:30 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Mailman-Approved-At: Tue, 19 Oct 2010 01:23:40 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 19 Oct 2010 01:24:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40984 Archived-At: >> 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