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 14:40:17 -0400 Message-ID: References: <058F2FC300154C1AB894694655B2A968@us.oracle.com> <90A72397ABF34D84A3ACB3B6DE18F74A@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1287427383 8517 80.91.229.12 (18 Oct 2010 18:43:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Oct 2010 18:43:03 +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 Mon Oct 18 20:43:00 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 1P7ufh-00050o-HH for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Oct 2010 20:42:57 +0200 Original-Received: from localhost ([127.0.0.1]:52428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7ufg-0003qb-RZ for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Oct 2010 14:42:56 -0400 Original-Received: from [140.186.70.92] (port=49215 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7ufJ-0003eF-Uc for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2010 14:42:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7ufI-0003b6-FE for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2010 14:42:33 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7ufI-0003b2-Cw for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2010 14:42:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P7uZy-0000Kk-ET; Mon, 18 Oct 2010 14:37: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: Mon, 18 Oct 2010 18:37: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.12874269961274 (code B ref 6256); Mon, 18 Oct 2010 18:37:02 +0000 Original-Received: (at 6256) by debbugs.gnu.org; 18 Oct 2010 18:36:36 +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 1P7uZY-0000KV-Ca for submit@debbugs.gnu.org; Mon, 18 Oct 2010 14:36:36 -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 1P7uZW-0000KQ-M5 for 6256@debbugs.gnu.org; Mon, 18 Oct 2010 14:36:35 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjALANgxvExMCpO7/2dsb2JhbACgM3lywDKFSQSSGQ X-IronPort-AV: E=Sophos;i="4.57,345,1283745600"; d="scan'208";a="80036888" 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 14:40:17 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 60C8BA822C; Mon, 18 Oct 2010 14:40:17 -0400 (EDT) In-Reply-To: (Drew Adams's message of "Sun, 12 Sep 2010 09:06:38 -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: Mon, 18 Oct 2010 14:37: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:40965 Archived-At: >> If you want to test for yourself, then: >> 1. Load the Bookmark+ files (see below). It's not exactly self-contained and going through all those links to finally download each file is rather inconvenient. So in order to help me help you, in the future, please try and make it easier. E.g. with a single download, and then a single load-file. >> 4. Now try C-x p followed by repeated mouse-wheel down or up >> movements. You should see the same movement to each bookmark >> in turn, and the same position messages. With your code the wheel >> repetition does not work. Indeed it doesn't work. >> With the code I sent it does work. >> This is the `while' condition I sent (again): >> (while (let ((evt (read-event))) >> (and (equal (event-basic-type evt) >> (event-basic-type repeat-repeat-char)) >> (equal (event-modifiers evt) >> (event-modifiers repeat-repeat-char)))) 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'). 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. Stefan === modified file 'lisp/repeat.el' --- lisp/repeat.el 2010-09-11 18:23:45 +0000 +++ lisp/repeat.el 2010-10-18 18:34:24 +0000 @@ -335,7 +335,7 @@ (setq real-last-command 'repeat) (setq repeat-undo-count 1) (unwind-protect - (while (let ((evt (read-event))) ;FIXME: read-key maybe? + (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)