From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#6256: 24.0.50; read-event in `repeat' command Date: Mon, 18 Oct 2010 14:12:30 -0700 Message-ID: <7373B32B6D1648C2961BED0F625426FF@us.oracle.com> References: <058F2FC300154C1AB894694655B2A968@us.oracle.com><90A72397ABF34D84A3ACB3B6DE18F74A@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1287438207 30188 80.91.229.12 (18 Oct 2010 21:43:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Oct 2010 21:43:27 +0000 (UTC) Cc: 6256@debbugs.gnu.org To: "'Stefan Monnier'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 18 23:43:26 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 1P7xUJ-0006U4-63 for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Oct 2010 23:43:23 +0200 Original-Received: from localhost ([127.0.0.1]:55949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7xUI-00057L-Ac for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Oct 2010 17:43:22 -0400 Original-Received: from [140.186.70.92] (port=36948 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7xU7-000565-NO for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2010 17:43:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7xU6-0007Y9-KW for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2010 17:43:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7xU6-0007Y5-J7 for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2010 17:43:10 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P7wy3-0001V3-IR; Mon, 18 Oct 2010 17:10:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" 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 21:10:03 +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.12874361555746 (code B ref 6256); Mon, 18 Oct 2010 21:10:03 +0000 Original-Received: (at 6256) by debbugs.gnu.org; 18 Oct 2010 21:09:15 +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 1P7wxG-0001Ud-R4 for submit@debbugs.gnu.org; Mon, 18 Oct 2010 17:09:15 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7wxE-0001UV-KX for 6256@debbugs.gnu.org; Mon, 18 Oct 2010 17:09:13 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o9ILCs66019061 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Oct 2010 21:12:56 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o9IKk5uI019074; Mon, 18 Oct 2010 21:12:53 GMT Original-Received: from abhmt010.oracle.com by acsmt354.oracle.com with ESMTP id 700073761287436347; Mon, 18 Oct 2010 14:12:27 -0700 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 18 Oct 2010 14:12:27 -0700 X-Mailer: Microsoft Office Outlook 11 In-reply-to: Thread-Index: Actu8+sQgWCbzEHHS4+GdOoZTkkMZAAEjtKw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 18 Oct 2010 17:10:03 -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:40972 Archived-At: > >> 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'). 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-'? 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. Seems like the Emacs mouse-wheel behavior on Windows (the events) is generally superior to that on GNU. 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. On Windows I can make good use of those mouse buttons when I use a mouse that has them. Using `mouse-4' and 5 as stand-ins for the mouse wheel on GNU seems like an ugly workaround/hack. But I don't know the details/history. BTW - Don't know if this is related - if not, ignore for this thread, but you might want to compare my question in emacs-devel wrt an added `' when using the wheel in a standalone minibuffer (thread "mouse wheel events - why an extra ?"). > 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.