From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Langton, Asher" Newsgroups: gmane.emacs.bugs Subject: bug#6594: 23.2; xterm-mouse-mode bug Date: Mon, 25 Jul 2011 20:46:49 -0700 Message-ID: References: <4C3757C8.7040009@oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1311794232 12929 80.91.229.12 (27 Jul 2011 19:17:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2011 19:17:12 +0000 (UTC) To: 6594@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 27 21:17:08 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qm9bP-00048H-CW for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jul 2011 21:17:07 +0200 Original-Received: from localhost ([::1]:44502 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm9bO-0004TZ-OV for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jul 2011 15:17:06 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm9bM-0004TI-JP for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2011 15:17:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qm9bL-000363-Bl for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2011 15:17:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm9bL-00035l-AD for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2011 15:17:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qm9bK-0007Em-RX; Wed, 27 Jul 2011 15:17:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <4C3757C8.7040009@oracle.com> Resent-From: "Langton, Asher" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jul 2011 19:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6594 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.131179418127748 (code B ref -1); Wed, 27 Jul 2011 19:17:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Jul 2011 19:16:21 +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 1Qm9ae-0007DO-Ns for submit@debbugs.gnu.org; Wed, 27 Jul 2011 15:16:21 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QlYbn-0005dL-1l for submit@debbugs.gnu.org; Mon, 25 Jul 2011 23:47:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QlYbh-0004tC-8t for submit@debbugs.gnu.org; Mon, 25 Jul 2011 23:46:58 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:49825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlYbh-0004t8-7R for submit@debbugs.gnu.org; Mon, 25 Jul 2011 23:46:57 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlYbf-0005d2-TW for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2011 23:46:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QlYbe-0004sq-Td for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2011 23:46:55 -0400 Original-Received: from nspiron-1.llnl.gov ([128.115.41.81]:26523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlYbe-0004sH-G7 for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2011 23:46:54 -0400 X-Attachments: None Original-Received: from nspexhub-1.llnl.gov (HELO nspexhub-1.the-lab.llnl.gov) ([128.115.54.113]) by nspiron-1.llnl.gov with ESMTP; 25 Jul 2011 20:46:51 -0700 Original-Received: from NSPEXMBX-B.the-lab.llnl.gov ([128.115.54.102]) by nspexhub-1.the-lab.llnl.gov ([172.16.54.113]) with mapi; Mon, 25 Jul 2011 20:46:51 -0700 Thread-Topic: bug#6594: 23.2; xterm-mouse-mode bug Thread-Index: AcxLRqbyAiFRqYZgTYOcHKYl8hVvxw== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.12.0.110505 acceptlanguage: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Wed, 27 Jul 2011 15:16:19 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 27 Jul 2011 15:17:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:49625 Archived-At: [Apologies if this is a duplicate; my previous two replies to this bug report never showed up.] I put a print statement in xterm-mouse-event that displayed the values of type, x, and y. For some arbitrary clicks, here was the output (all in pairs; mouse-1 and down-mouse-1, I assume): In xterm-mouse-event with 0,130023656,46 In xterm-mouse-event with 3,130023656,46 In xterm-mouse-event with 0,37,35 In xterm-mouse-event with 3,37,35 In xterm-mouse-event with 0,12,33 In xterm-mouse-event with 3,12,33 In xterm-mouse-event with 0,130023730,17 In xterm-mouse-event with 3,130023730,17 It appears that the value of x jumps to 0x8000000 around the 94th column. I don't know much about the internals of emacs nor what the valid character values are here, but this fix works for me on both Linux and OSX: --- xt-mouse.el 2011-07-25 20:41:03.000000000 -0700 +++ xt-mouse_modified.el 2011-07-25 20:40:39.000000000 -0700 @@ -122,9 +122,11 @@ ;; read xterm sequences above ascii 127 (#x7f) (defun xterm-mouse-event-read () (let ((c (read-char))) - (if (> c #x3FFF80) - (+ 128 (- c #x3FFF80)) - c))) + (cond ((and (> c #x3FFF80) (< c #x3FFFFF)) + (+ 128 (- c #x3FFF80))) + ((>=3D c #x8000000) + (+ 128 (- c #x8000000))) + (t c)))) -Asher