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: Wed, 20 Oct 2010 21:08:39 -0400 Message-ID: References: <058F2FC300154C1AB894694655B2A968@us.oracle.com> <90A72397ABF34D84A3ACB3B6DE18F74A@us.oracle.com> <0658C0CCC79D466BA9DE233F5980CAE5@us.oracle.com> <8E5430CB43B84B91BB47DB3C0C710C44@us.oracle.com> <02C729C63ABB48A898C742329EE4ADB0@us.oracle.com> <08402D206B354E10BD8F86D4CD5FA9E8@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1287623569 17049 80.91.229.12 (21 Oct 2010 01:12:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 21 Oct 2010 01:12:49 +0000 (UTC) Cc: 6256@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 21 03:12:47 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 1P8ji2-0001Dw-DN for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Oct 2010 03:12:46 +0200 Original-Received: from localhost ([127.0.0.1]:55520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8ji1-0001uG-Rg for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Oct 2010 21:12:45 -0400 Original-Received: from [140.186.70.92] (port=37558 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8jhv-0001u9-UL for bug-gnu-emacs@gnu.org; Wed, 20 Oct 2010 21:12:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8jhu-0005jy-NV for bug-gnu-emacs@gnu.org; Wed, 20 Oct 2010 21:12:39 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8jhu-0005jt-LN for bug-gnu-emacs@gnu.org; Wed, 20 Oct 2010 21:12:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P8jaY-0000T9-6q; Wed, 20 Oct 2010 21:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Oct 2010 01:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6256 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6256-submit@debbugs.gnu.org id=B6256.12876230941797 (code B ref 6256); Thu, 21 Oct 2010 01:05:02 +0000 Original-Received: (at 6256) by debbugs.gnu.org; 21 Oct 2010 01:04:54 +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 1P8jaP-0000Sw-Lj for submit@debbugs.gnu.org; Wed, 20 Oct 2010 21:04:53 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P8jaN-0000Sr-HR for 6256@debbugs.gnu.org; Wed, 20 Oct 2010 21:04:52 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApYJABIvv0xMCpO7/2dsb2JhbACgVXpyv1SFSgSSGw X-IronPort-AV: E=Sophos;i="4.58,214,1286164800"; d="scan'208";a="80273772" Original-Received: from 76-10-147-187.dsl.teksavvy.com (HELO ceviche.home) ([76.10.147.187]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 20 Oct 2010 21:08:40 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id D30A366112; Wed, 20 Oct 2010 21:08:39 -0400 (EDT) In-Reply-To: <08402D206B354E10BD8F86D4CD5FA9E8@us.oracle.com> (Drew Adams's message of "Wed, 20 Oct 2010 13:55:35 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 20 Oct 2010 21:05: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:41018 Archived-At: > I was thinking that that code would work because it remains abstract (in > principle). It just decomposes the event into its components and compares > those. There is (in principle) nothing platform-specific about it. In principle, your message call should have generated a message. In principle my (eq (or (car-safe evt) evt) (or (car-safe repeat-repeat-char) repeat-repeat-char)) is 100% equivalent (tho more efficient) to your (and (equal (event-basic-type evt) (event-basic-type repeat-repeat-char)) (equal (event-modifiers evt) (event-modifiers repeat-repeat-char)))) But obviously, there's more at play here. >> That on X11, the second event is *not* the same as the first because >> mouse wheel send first a down and then an up event. > I see. So it sounds like we need an abstraction to deal with that - > I'd think that would be useful anyway. After all, there is no good > reason to distinguish the first wheel rotation (in a given direction). > At least there is no good reason to _always_ do that, even if someone > might find a reason why that might be useful sometimes. [ You're misunderstanding. ] I know how to deal with the X11 side. It's dealt with, the code works. Let's concentrate on your case. E.g.: >> You could also try >> (while (let ((evt (read-event))) >> (message "EVT: %S, R-R-CHAR: %S" evt repeat-repeat-char) >> (and (equal (event-basic-type evt) >> (event-basic-type repeat-repeat-char)) >> (equal (event-modifiers evt) >> (event-modifiers repeat-repeat-char)))) >> (repeat repeat-arg)) Or adding the suggested `message' calls before/after read-key or elsewhere to try and see what are the values of repeat-repeat-char at various places rather than try and guess them. Stefan