From unknown Fri Jun 13 10:17:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#28658 <28658@debbugs.gnu.org> To: bug#28658 <28658@debbugs.gnu.org> Subject: Status: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position Reply-To: bug#28658 <28658@debbugs.gnu.org> Date: Fri, 13 Jun 2025 17:17:31 +0000 retitle 28658 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode d= oesn't respect mouse position reassign 28658 emacs submitter 28658 Alex severity 28658 normal tag 28658 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 30 18:07:00 2017 Received: (at submit) by debbugs.gnu.org; 30 Sep 2017 22:07:00 +0000 Received: from localhost ([127.0.0.1]:41557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyPuW-0003jf-Aj for submit@debbugs.gnu.org; Sat, 30 Sep 2017 18:07:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyPuU-0003jP-5d for submit@debbugs.gnu.org; Sat, 30 Sep 2017 18:06:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyPuN-0003rQ-Pd for submit@debbugs.gnu.org; Sat, 30 Sep 2017 18:06:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55351) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dyPuN-0003r4-KW for submit@debbugs.gnu.org; Sat, 30 Sep 2017 18:06:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyPuM-0004CS-2f for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 18:06:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyPuH-0003js-2T for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 18:06:50 -0400 Received: from mail-it0-x235.google.com ([2607:f8b0:4001:c0b::235]:46456) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dyPuG-0003fu-SS for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 18:06:45 -0400 Received: by mail-it0-x235.google.com with SMTP id d192so3496418itd.1 for ; Sat, 30 Sep 2017 15:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=aaS79I5k0rCt7JWJbDPNDVJg48MKNi5sxYnuUfJxyj8=; b=XaIfIecPc36UjUspCfo213LnE1iuZ7oecIKLcqKHJQ8GjxzBVVgYQajidOC0v2alkF 8OP3ERqGzYOwYxMU9Hr+kzL0fWqxpHvx7pB6pMlnPrMmWFKAt59LyZf+CAnIbPTtaNAu /CS72CiqCCqc6+MDCPelJ6QQ4BO6Y0ICiXhOdl4svc6MCN8+0cL2UWpq/vLXZ3og8SNp kJcAUOF1nVIiVSWjwYcnFoh8X4PTCeZfFPGj12pFVaw1G9p+os2qrwSKIIX1ZY7nu0gA ugGRjcZlzwXrWwTsN1lzRqkSWF3t5HR5yNRhu8RO1DlXLUrcGQ9S2r2DZmY06GEVUbJw HmAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=aaS79I5k0rCt7JWJbDPNDVJg48MKNi5sxYnuUfJxyj8=; b=KQzqoJsp8kRGQJVDt1V+wQFmnaTC+d1/zH/31u91XyHIRNyVp1zi/3+f1KjQ1hlJjw TjQz4nz75AFn1KZzZwyrKOzaw5o6WilQkp1nyPInMRfwkE4ZWwux4Psvk0dLw1oHPsFW a8/K5m4DhPLBqL1CMZMKlAuAfRdQdq6E9tfuBEwWO+sa8SXGGpCY1C4tm6HuTWl9hlWs jG4KLOsz/NA3ZRYo0Pp36m1yhqct7ul4Ew7NRPRQ3eyWktFMnkEDFLRpNYvZcbQl3IGA AgHwNzVjydQkkuFxMxSi7XdxfZulcQTZnSeicBhpTXctRWMJ3UyDK8nqCSh8FUBrAiHj Zt7w== X-Gm-Message-State: AMCzsaUBGmmwJ35MrRlyMhD9EwbVi0qOv6FaTL3mayv410As3BU0r/bw 9gAk3HCVpkp3DeTKI7zL0LZReQ== X-Google-Smtp-Source: AOwi7QB4CzQdhPvpj80HGCnporDvBYcEz0FgUJh1jRkov4hnfNGb/sbGZXclsW7pIE+tLq6ku3CJ2A== X-Received: by 10.36.178.19 with SMTP id u19mr3001051ite.64.1506809202684; Sat, 30 Sep 2017 15:06:42 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id i203sm2847708itb.20.2017.09.30.15.06.41 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Sep 2017 15:06:41 -0700 (PDT) From: Alex To: bug-gnu-emacs@gnu.org Subject: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position Date: Sat, 30 Sep 2017 16:06:34 -0600 Message-ID: <87r2unyh79.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --=-=-= Content-Type: text/plain 1. emacs -Q -nw 2. M-x xterm-mouse-mode RET 3. Click once, then quickly move the cursor to a different word and click again. 4. Notice that the 2nd click was registered as a double click even though the cursor moved. 5. Click once, and quickly perform step 3 again. Notice that the 3rd click was registered as a triple click even though the cursor moved. I've attached a patch that fixes this behaviour. It would be nice if it worked with pixel positions rather than character positions, but I'm not sure how to do that in a terminal Emacs. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Increase-xterm-click-count-only-with-unchanged-point.patch Content-Description: click >From 77590f427ba962f5efc3f07d2e4dcadb4ec1237d Mon Sep 17 00:00:00 2001 From: Alexander Gramiak Date: Sat, 30 Sep 2017 15:47:56 -0600 Subject: [PATCH] Increase xterm click count only with unchanged point * lisp/xt-mouse.el (xterm-mouse-event): Save the last click's position and check it against the current click's position. --- lisp/xt-mouse.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 772a72d5c5..dc202e78f6 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -278,6 +278,8 @@ xterm-mouse-event (last-name (symbol-name last-type)) (last-time (nth 1 last-click)) (click-count (nth 2 last-click)) + (last-x (nth 3 last-click)) + (last-y (nth 4 last-click)) (this-time (float-time)) (name (symbol-name type))) (cond @@ -290,12 +292,14 @@ xterm-mouse-event (xterm-mouse--set-click-count event click-count))) ((not last-time) nil) ((and (> double-click-time (* 1000 (- this-time last-time))) + (eq x last-x) + (eq y last-y) (equal last-name (replace-match "" t t name))) (setq click-count (1+ click-count)) (xterm-mouse--set-click-count event click-count)) (t (setq click-count 1))) (set-terminal-parameter nil 'xterm-mouse-last-click - (list type this-time click-count))) + (list type this-time click-count x y))) (set-terminal-parameter nil 'xterm-mouse-x x) (set-terminal-parameter nil 'xterm-mouse-y y) -- 2.14.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 30 23:57:10 2017 Received: (at 28658) by debbugs.gnu.org; 1 Oct 2017 03:57:10 +0000 Received: from localhost ([127.0.0.1]:41654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyVNO-00073m-02 for submit@debbugs.gnu.org; Sat, 30 Sep 2017 23:57:10 -0400 Received: from mail-it0-f41.google.com ([209.85.214.41]:55629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyVNL-00073I-Ub for 28658@debbugs.gnu.org; Sat, 30 Sep 2017 23:57:08 -0400 Received: by mail-it0-f41.google.com with SMTP id 4so3856626itv.4 for <28658@debbugs.gnu.org>; Sat, 30 Sep 2017 20:57:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=SUvrNw8KO6PpgVvHaF5ItUHwYl82ErsqpWqjTYC4F80=; b=K0lC+Zpt9xyH7plobhKbd/Zon0JnTBUVhiKbg3pF+QY3Wu+f8It53SYfa3Sz358jc3 bSSqJ/rbPo5s9dUS+nAZcdkrk081gOoP+deKCJk05VqTsCCG9HXD6vOpcFRbQzG4pcLb XIAH1X5+5WVmC1BCj06c8smMjYyt6PTReN3YdF4eG8gMDriQORyA7jFKTH3iBxxz4s6R OvB3nPhaTXPokt82+thLJiSUR8Q4+97gOyQWa5oPPTKvf+iHaMLHLd910H6OGCJ0vAhD Ru92ItDdpJwkNC693ayDzqNFJrs4js21Ynq+SRtHWDSOznpVPZ+sE7+yuaKvRKf022K9 p9rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=SUvrNw8KO6PpgVvHaF5ItUHwYl82ErsqpWqjTYC4F80=; b=ij74H4fbSHcTHvEueIpubU8x5Xf05csGxQ/z84hzyKDwFrWvhMSIhPhZguh/F9A9vE 5SLC21HVkfubyOju6SZvIok6//C/yCKcR1+6WJ38++pi28EhOkUrd4SYq5jmgdno0wBg v19qgRmhLCUfgHE+1mLuw6RF4hjneonFzP5nma/cKFfsCEUQZQ6OTXB54huTaSkc4+iw SaelGUD1m9Qkg73vE47hlL1NBVvjUs7qroUPJeLMdcN+vI13WCvfhIzZwsrixqo61l9P lwVNgkFy/AjmYVgk2FVPiKZrCzv/GKFTveRcIO3VlqA0iPRsPP3P+/fGclf44ChjftMr EKaw== X-Gm-Message-State: AMCzsaUBCw7xS9xesZI25mvy0p+qJHo3MTfm/y6anOA364uHXTkF8kim GXjprIhzMm9oJkzt4qSomDZnxw== X-Google-Smtp-Source: AOwi7QA/M++v/4QMuNl9q3qpeLwiwoXumx7/f7gdzM5azvKo4ZycGKrJco7ULXVzZK1ICioLj5N4ug== X-Received: by 10.36.10.142 with SMTP id 136mr13253604itw.92.1506830221940; Sat, 30 Sep 2017 20:57:01 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id g196sm3054855ita.4.2017.09.30.20.57.00 for <28658@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Sep 2017 20:57:00 -0700 (PDT) From: Alex To: 28658@debbugs.gnu.org Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> Date: Sat, 30 Sep 2017 21:56:58 -0600 In-Reply-To: <87r2unyh79.fsf@gmail.com> (Alex's message of "Sat, 30 Sep 2017 16:06:34 -0600") Message-ID: <87zi9bwmet.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28658 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --=-=-= Content-Type: text/plain I also found another issue, but it doesn't really warrant a new report. If you double click right after entering xterm-mouse-mode, then you'll see: xterm-mouse-translate-1: Wrong type argument: number-or-marker-p, nil This is because click-count isn't set to 1 when `xterm-mouse-last-click' is first set in `xterm-mouse-event'. Here's a patch: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Set-xterm-click-count-to-1-even-with-no-last-click.patch Content-Description: init click >From 6bc82587b2c7554e93b603d0c5835f287673a7c5 Mon Sep 17 00:00:00 2001 From: Alexander Gramiak Date: Sat, 30 Sep 2017 21:38:10 -0600 Subject: [PATCH] Set xterm click count to 1 even with no last click * lisp/xt-mouse.el (xterm-mouse-event): Move the check for the last click so that click-count is initialized properly. (Bug#28658) --- lisp/xt-mouse.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index dc202e78f6..cbbeec82fa 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -290,8 +290,8 @@ xterm-mouse-event (string-match "down-" last-name) (equal name (replace-match "" t t last-name))) (xterm-mouse--set-click-count event click-count))) - ((not last-time) nil) - ((and (> double-click-time (* 1000 (- this-time last-time))) + ((and last-time + (> double-click-time (* 1000 (- this-time last-time))) (eq x last-x) (eq y last-y) (equal last-name (replace-match "" t t name))) -- 2.14.2 --=-=-= Content-Type: text/plain P.S. Why is the error prefixed by `xterm-mouse-translate-1' instead of `xterm-mouse-event'? --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 01 04:24:05 2017 Received: (at 28658) by debbugs.gnu.org; 1 Oct 2017 08:24:05 +0000 Received: from localhost ([127.0.0.1]:41703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyZXg-0006UA-Pu for submit@debbugs.gnu.org; Sun, 01 Oct 2017 04:24:04 -0400 Received: from mout.gmx.net ([212.227.17.22]:60873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyZXf-0006Ta-61 for 28658@debbugs.gnu.org; Sun, 01 Oct 2017 04:24:03 -0400 Received: from [192.168.1.100] ([46.125.249.11]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M9fLX-1eBSuh1MBr-00D2y5; Sun, 01 Oct 2017 10:23:56 +0200 Message-ID: <59D0A616.2000003@gmx.at> Date: Sun, 01 Oct 2017 10:23:50 +0200 From: martin rudalics MIME-Version: 1.0 To: Alex , 28658@debbugs.gnu.org Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> <87zi9bwmet.fsf@gmail.com> In-Reply-To: <87zi9bwmet.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:81NGwZeS26M4nHZn0nFJ3qWqfBzdOhgMilJjWTakiMoQ43VeLr2 voVs2DYsz9+qQanXJOWLPtwuWmD4wwUmbAskQLF0dp4+KV7PRXD+bLsrqOrBH5koZuazoU9 Tel0C9ZKBZ0iitoaHh/MasIWcaVvkjKMITbqNt1KlD9LGTZkA0dRbxcpfanZsb50ewVgALH xnoJVZpRTCQ01Hprk97WA== X-UI-Out-Filterresults: notjunk:1;V01:K0:H0YCNtzs/Xk=:8+xydaOFrLlRd8JNX9mxcf ics70AUSHUWGp5M0tu9Z9fPdBNcrbWrObHaCvLtWPcPkfvezfMgbFZeHH3fTBl8d4WW28cV9D paQLVmvZxhTIvfZqOLnHB/woAqUpouTd5lukCrVWMDsiGgEyYvo3OyvJ+NY9hZV/wk0RUE4Pd lLkUWk/TNAYFg6U/nXF5SgwJ19E6hFAZtVx9DVyDx3PaqaRs6SVfaq+mPZKzFp9yz+btkGHqX 9fx6f5RnrwMkGaTGpuV8JKvG0aN3OMSVT3KgZ2dYJwQcaXr7DLaBuJbYF26qPujDZ0RY4r7Ky w+5VI2fhqdmZEpdSqiJLoeMf3aV9+ORGB9W/sPQhPopM6nLVN6Ns6vVviVi4GZDxExsajJdmN x5CLNDE+SdF4jZkGHGsyXfg5jlmH8KSesrKoFeUiAScr1tIpQa1+PFG8EQV3euWT+TTVYB+Km YoAeHxoC/rOgSCHv1BspAK92Yf5flysLrElfh7lfmQuNrGF71YQAxqxa5BGs6Rn+JUckttSUb 8cZT83YGaNM3xkASzhi3lwRsr0hn9i3So/3mYSAwt0xUDlb0r5f4yzv78xoAcXEafP3syN9Fl 7pGBqrNVSioxqBzPAUmd6BFBhikae7PmC4le2RsgwaoJTWDtfCdMwpMRQIpjHW+NwRK1AwGCy b5LCJKVKgSkP77fEpB/9UpT/fSFHffsXC5fM4fewVHSfJjqe6O2B4pi4YzIs7dfAnhPS5We1V fvYDwgfwxe89Bo2LSnphjupsavoSc/HJUtHeLtRB8nctLrx1RkC4QgBRigu7/GvEaiQR2Dqp6 +ZjsToNDHGcDi5Y4LgY+VvFwum6ba0fyMZWF8/P74IMT7J8XrLONaFeF3k1OHHifhFQad3I X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: + ((and last-time + (> double-click-time (* 1000 (- this-time last-time))) Note that here and elsewhere coders assume that ‘double-click-time’ is a number. However, it may be also nil or t and we should fix those instances eventually (see Bug#23419). In new or changed code, at least. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.22 listed in list.dnswl.org] 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [46.125.249.11 listed in dnsbl.sorbs.net] 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [212.227.17.22 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rudalics[at]gmx.at) X-Debbugs-Envelope-To: 28658 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: + ((and last-time + (> double-click-time (* 1000 (- this-time last-time))) Note that here and elsewhere coders assume that ‘double-click-time’ is a number. However, it may be also nil or t and we should fix those instances eventually (see Bug#23419). In new or changed code, at least. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [46.125.249.11 listed in dnsbl.sorbs.net] 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [212.227.17.22 listed in dnsbl.sorbs.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.22 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rudalics[at]gmx.at) + ((and last-time + (> double-click-time (* 1000 (- this-time last-time))) Note that here and elsewhere coders assume that =E2=80=98double-click-tim= e=E2=80=99 is a number. However, it may be also nil or t and we should fix those instances eventually (see Bug#23419). In new or changed code, at least. Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 01 14:30:34 2017 Received: (at 28658) by debbugs.gnu.org; 1 Oct 2017 18:30:34 +0000 Received: from localhost ([127.0.0.1]:43100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyj0c-0002ZT-1D for submit@debbugs.gnu.org; Sun, 01 Oct 2017 14:30:34 -0400 Received: from mail-io0-f182.google.com ([209.85.223.182]:54668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyj0Z-0002Z9-VW for 28658@debbugs.gnu.org; Sun, 01 Oct 2017 14:30:32 -0400 Received: by mail-io0-f182.google.com with SMTP id h66so3217438ioh.11 for <28658@debbugs.gnu.org>; Sun, 01 Oct 2017 11:30:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=/BY/5dEShd00+EQlnaY2VxjRG5b06G8QVL/yvKQQg1s=; b=rmCoamW/Cjj1QMReVa9O/6kalPrL3OvJLMUj5FMz0ond6Z55FVe9HT/5epc43RJ9Pl rMNS1+3cktREhKQj7eR40noDsn2qZehMHs8qlAUFchC4Jb13jIh8knt4g4b01tBFRz5d 03Ej3BUXQ+z/llxvkPKNVjRkIMyJMUaK+ds4F0iLAahmZM3E2lAW1l+zdeOhyZsObgIK 5vXuxHfNr1Tps8TPZHcqHVm6w2F9sUpBUiOjw4bo9wv4K8qOyYq+YeHWcJSf4CdYZWZL 7S0oGewssJVtxsoF4+TPqH+i3eOA6Od3nkdyGWcjVoE0CyNFPKQMN4lFQAUuUKyJGLOR VeSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=/BY/5dEShd00+EQlnaY2VxjRG5b06G8QVL/yvKQQg1s=; b=AQ1NheLXZ4jSsokPWUUX/RDQ1A3qYROS57dfmg4oRrXFZFOH/BsrZmOjCiq/SgefBN Op6qtDJBwjeHhpdHdO3XhhsXgsZS6t3EdBzMlrSTRqp3QBYddp0jbFwN9c+xlIhqF+L9 r+dAd5Oi9lLNXzqG+HotZlyj91CIdRZRbbR44DUrRc9RJCxc171HOnBR+XGC/zLDP+SW WBzYVnGitYb53SnT9k1cyP6QGWY6RyvacCO76qpqKCU/iylzzWIiLPdvUVdROUe+cT85 7Bm+kN0eBjbaKxD1F1V//XGURXs9VQVRbtVqcDP2MsgRSboHv8MZbJCVMBUMJPWGl16C 6vdw== X-Gm-Message-State: AMCzsaUqB+USvH2i/mv8nPdT5WSEm1fj2hRA9M7D8MRbHJDserOZi823 QqzguogqcvqSKTdbaSBaTDG/vw== X-Google-Smtp-Source: AOwi7QA1H13bDhO+buA3j5TXN2LTn7CvHQCVrlxhPM0LQ7NiS+zs6AF/W88TKnTY0NmWUjeXBLX2ww== X-Received: by 10.107.180.216 with SMTP id d207mr23288103iof.275.1506882626182; Sun, 01 Oct 2017 11:30:26 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id m12sm3872501ita.17.2017.10.01.11.30.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 01 Oct 2017 11:30:25 -0700 (PDT) From: Alex To: martin rudalics Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> <87zi9bwmet.fsf@gmail.com> <59D0A616.2000003@gmx.at> Date: Sun, 01 Oct 2017 12:30:23 -0600 In-Reply-To: <59D0A616.2000003@gmx.at> (martin rudalics's message of "Sun, 01 Oct 2017 10:23:50 +0200") Message-ID: <878tgura9s.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28658 Cc: 28658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable martin rudalics writes: > + ((and last-time > + (> double-click-time (* 1000 (- this-time last-time))) > > Note that here and elsewhere coders assume that =E2=80=98double-click-tim= e=E2=80=99 is a > number. However, it may be also nil or t and we should fix those > instances eventually (see Bug#23419). In new or changed code, at least. Sure, here's a third patch to deal with that: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-lisp-xt-mouse.el-xterm-mouse-event-Handle-boolean-do.patch Content-Description: boolean >From efb7f09f585d6652221f5e58e9bc635e6100a588 Mon Sep 17 00:00:00 2001 From: Alexander Gramiak Date: Sun, 1 Oct 2017 12:21:19 -0600 Subject: [PATCH] * lisp/xt-mouse.el (xterm-mouse-event): Handle boolean double-click-time --- lisp/xt-mouse.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index cbbeec82fa..aa5aa0f7f5 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -291,7 +291,9 @@ xterm-mouse-event (equal name (replace-match "" t t last-name))) (xterm-mouse--set-click-count event click-count))) ((and last-time - (> double-click-time (* 1000 (- this-time last-time))) + double-click-time + (or (eq double-click-time t) + (> double-click-time (* 1000 (- this-time last-time)))) (eq x last-x) (eq y last-y) (equal last-name (replace-match "" t t name))) -- 2.14.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 05 06:36:24 2017 Received: (at 28658) by debbugs.gnu.org; 5 Oct 2017 10:36:24 +0000 Received: from localhost ([127.0.0.1]:49788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e03Vw-0001cy-I7 for submit@debbugs.gnu.org; Thu, 05 Oct 2017 06:36:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e03Vu-0001cl-FI for 28658@debbugs.gnu.org; Thu, 05 Oct 2017 06:36:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e03Vk-0005zt-76 for 28658@debbugs.gnu.org; Thu, 05 Oct 2017 06:36:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e03Vk-0005zS-3t; Thu, 05 Oct 2017 06:36:12 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2871 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e03Vj-00078W-GM; Thu, 05 Oct 2017 06:36:11 -0400 Date: Thu, 05 Oct 2017 13:36:00 +0300 Message-Id: <83zi95x4of.fsf@gnu.org> From: Eli Zaretskii To: Alex In-reply-to: <87r2unyh79.fsf@gmail.com> (message from Alex on Sat, 30 Sep 2017 16:06:34 -0600) Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28658 Cc: 28658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alex > Date: Sat, 30 Sep 2017 16:06:34 -0600 > > 1. emacs -Q -nw > 2. M-x xterm-mouse-mode RET > 3. Click once, then quickly move the cursor to a different word and click again. > 4. Notice that the 2nd click was registered as a double click even > though the cursor moved. > 5. Click once, and quickly perform step 3 again. Notice that the 3rd > click was registered as a triple click even though the cursor moved. > > I've attached a patch that fixes this behaviour. Thanks, I have a comment to this, but in general this is the right fix, IMO. > It would be nice if it worked with pixel positions rather than > character positions, but I'm not sure how to do that in a terminal > Emacs. You can't: TTY frames cannot discern screen positions with resolution of more than 1 character. > @@ -290,12 +292,14 @@ xterm-mouse-event > (xterm-mouse--set-click-count event click-count))) > ((not last-time) nil) > ((and (> double-click-time (* 1000 (- this-time last-time))) > + (eq x last-x) > + (eq y last-y) IMO, 'eq' is not right here: this test should obey the value of double-click-fuzz, whose units on TTY frames are 1/8 of a character. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 05 06:52:36 2017 Received: (at 28658) by debbugs.gnu.org; 5 Oct 2017 10:52:36 +0000 Received: from localhost ([127.0.0.1]:49794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e03lc-000219-16 for submit@debbugs.gnu.org; Thu, 05 Oct 2017 06:52:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e03la-00020x-JL for 28658@debbugs.gnu.org; Thu, 05 Oct 2017 06:52:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e03lR-000408-Bo for 28658@debbugs.gnu.org; Thu, 05 Oct 2017 06:52:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e03lR-0003zs-9Z; Thu, 05 Oct 2017 06:52:25 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2880 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e03lQ-00083v-Lg; Thu, 05 Oct 2017 06:52:25 -0400 Date: Thu, 05 Oct 2017 13:52:13 +0300 Message-Id: <83y3opx3xe.fsf@gnu.org> From: Eli Zaretskii To: Alex In-reply-to: <87zi9bwmet.fsf@gmail.com> (message from Alex on Sat, 30 Sep 2017 21:56:58 -0600) Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> <87zi9bwmet.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28658 Cc: 28658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alex > Date: Sat, 30 Sep 2017 21:56:58 -0600 > > I also found another issue, but it doesn't really warrant a new report. > If you double click right after entering xterm-mouse-mode, then you'll > see: > > xterm-mouse-translate-1: Wrong type argument: number-or-marker-p, nil > > This is because click-count isn't set to 1 when `xterm-mouse-last-click' > is first set in `xterm-mouse-event'. > > Here's a patch: Thanks, pushed to the release branch. > P.S. Why is the error prefixed by `xterm-mouse-translate-1' instead of > `xterm-mouse-event'? Can you show the full backtrace? From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 05 06:53:08 2017 Received: (at 28658) by debbugs.gnu.org; 5 Oct 2017 10:53:08 +0000 Received: from localhost ([127.0.0.1]:49798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e03m8-00022J-98 for submit@debbugs.gnu.org; Thu, 05 Oct 2017 06:53:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e03m7-00021n-1D for 28658@debbugs.gnu.org; Thu, 05 Oct 2017 06:53:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e03ly-0004h1-0E for 28658@debbugs.gnu.org; Thu, 05 Oct 2017 06:53:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e03lx-0004gv-TE; Thu, 05 Oct 2017 06:52:57 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2881 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e03lx-00086N-6b; Thu, 05 Oct 2017 06:52:57 -0400 Date: Thu, 05 Oct 2017 13:52:46 +0300 Message-Id: <83wp49x3wh.fsf@gnu.org> From: Eli Zaretskii To: Alex In-reply-to: <878tgura9s.fsf@gmail.com> (message from Alex on Sun, 01 Oct 2017 12:30:23 -0600) Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> <87zi9bwmet.fsf@gmail.com> <59D0A616.2000003@gmx.at> <878tgura9s.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28658 Cc: rudalics@gmx.at, 28658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alex > Date: Sun, 01 Oct 2017 12:30:23 -0600 > Cc: 28658@debbugs.gnu.org > > martin rudalics writes: > > > + ((and last-time > > + (> double-click-time (* 1000 (- this-time last-time))) > > > > Note that here and elsewhere coders assume that ‘double-click-time’ is a > > number. However, it may be also nil or t and we should fix those > > instances eventually (see Bug#23419). In new or changed code, at least. > > Sure, here's a third patch to deal with that: Pushed to emacs-26, thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 05 20:03:41 2017 Received: (at 28658) by debbugs.gnu.org; 6 Oct 2017 00:03:42 +0000 Received: from localhost ([127.0.0.1]:51952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0G7B-0005Wv-Lj for submit@debbugs.gnu.org; Thu, 05 Oct 2017 20:03:41 -0400 Received: from mail-it0-f52.google.com ([209.85.214.52]:51924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0G7A-0005Wj-Bi for 28658@debbugs.gnu.org; Thu, 05 Oct 2017 20:03:40 -0400 Received: by mail-it0-f52.google.com with SMTP id w1so3331498itd.0 for <28658@debbugs.gnu.org>; Thu, 05 Oct 2017 17:03:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=vZtMuhPmmj6Wo3iHlN6rHJ4euVmKhW0jdqx5TX1xWRc=; b=jBGX/PH9Vm/k4GMb4bt/hW0KL8GEHCT5+SS2pd63cCZYnLsD2g8pIMzDzXMhhyqNdb CVvcuERgMna64O9b2+ReQC7YlqJAxSxIgQrhmy+UfqOnHACAzEkfabNeI0tX3ngD6wmV B76luSVWpOtyhW0j8axvJfNGeWI5ftN3F78dOR+5Q+BZgsEVvlyvJb6AW46wJG8aK4xG BBQyEBp1duQdMXGn96tUSfXhUPAsl6g5uDuPp5FDFI52FbTvXJ9KPRg9ALh84NMJK1Ss B6oL3v31UPIeiTPLzlCZbXq/lRBoGufvYyW+qGQZeV1t3nyOHB+bdOsaqMFv3QCsxown ciPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=vZtMuhPmmj6Wo3iHlN6rHJ4euVmKhW0jdqx5TX1xWRc=; b=Rx8tFKea0EDGez/yT2WvhrNBMVEunOLsLcNdKFLfJXYiT0UM1M25lOWkddFd5kcgo1 pUrTVGTuR+qh+Cl+d15K/T7JAnQa9Mylkgkx6JQI4QaCbukg1cYn465MIGDx2WjBvn7r EqF+aK5pjcYa5aBQthY2TVpDbvYRuzs5grQT+hpH37BERLX6cmjssBlI8w0GNRBB+WAw crljKYgam7W+SScYBpY4yF/rZmU4+3eeSAK3gnx2uAeLnZ9x2uleiFk34QsfgnfptRVX 8OXKxa63b674JBuP9AqvcHFa0s4XNgrTAHmd7lYsnO7hJQaJ1Czf0YpsD7T4Dw4mke17 FQnQ== X-Gm-Message-State: AMCzsaXT1ZXb7v5yN8R+a43ExCXxf1gKb47Oinev5yrVFY1Zs83hiGa9 DW0May2DpJsoB6/zXHCzI3jEYw== X-Google-Smtp-Source: AOwi7QCXg4OejsIPNSNhZYN4fmwmmZ+uqKrudMLpKHHQxh3UCY5OJRz0sjhe4rNKRJp3ZfalfCBwUQ== X-Received: by 10.36.87.83 with SMTP id u80mr299953ita.41.1507248214516; Thu, 05 Oct 2017 17:03:34 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id o192sm247595itc.27.2017.10.05.17.03.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Oct 2017 17:03:33 -0700 (PDT) From: Alex To: Eli Zaretskii Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> <87zi9bwmet.fsf@gmail.com> <83y3opx3xe.fsf@gnu.org> Date: Thu, 05 Oct 2017 18:03:31 -0600 In-Reply-To: <83y3opx3xe.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Oct 2017 13:52:13 +0300") Message-ID: <877ew9xhv0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28658 Cc: 28658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Eli Zaretskii writes: >> P.S. Why is the error prefixed by `xterm-mouse-translate-1' instead of >> `xterm-mouse-event'? > > Can you show the full backtrace? Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) xterm-mouse-event(1006) xterm-mouse-translate-1(1006) xterm-mouse-translate-extended(nil) So the backtrace acknowledges xterm-mouse-event is the culprit, but without `debug-on-error' set the error message blames xterm-mouse-translate-1. If I don't use the bytecode versions of the procedures, though, then the error message becomes: setq: Wrong type argument: number-or-marker-p, nil which is better, but I believe it should message: 1+: Wrong type argument: number-or-marker-p, nil Which is what the debugger shows if I don't use the bytecode versions: Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) 1+(nil) (setq click-count (1+ click-count)) ... xterm-mouse-event(1006) (let* ((event (xterm-mouse-event extension)) (ev-command (nth 0 event)) (ev-data (nth 1 event)) (ev-where (nth 1 ev-$ (save-excursion (let* ((event (xterm-mouse-event extension)) (ev-command (nth 0 event)) (ev-data (nth 1 event)) (ev-$ xterm-mouse-translate-1(1006) xterm-mouse-translate-extended(nil) From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 05 20:14:50 2017 Received: (at 28658) by debbugs.gnu.org; 6 Oct 2017 00:14:50 +0000 Received: from localhost ([127.0.0.1]:51959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0GHx-0005o9-PJ for submit@debbugs.gnu.org; Thu, 05 Oct 2017 20:14:50 -0400 Received: from mail-it0-f53.google.com ([209.85.214.53]:44670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0GHw-0005nt-7s for 28658@debbugs.gnu.org; Thu, 05 Oct 2017 20:14:48 -0400 Received: by mail-it0-f53.google.com with SMTP id n195so839382itg.1 for <28658@debbugs.gnu.org>; Thu, 05 Oct 2017 17:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=IzyQztKL5NuzW7zsjYfVSS72gubL0zPqhD++rjqQmcA=; b=orBkw7HSXt9SjR/O4pTQwc1TwJZitGZXnnl0t928pf139XttpEuUGv9fm9Ub8GhFEo GIG+j6d5796POT5/yZOXj9vfrtdSsC+9Fv+WR5PjEJURmzGW+hf+5cUEhb6YzTOhbC9V lYf0eb/eJ/pw8OEz1Os+9YBFkBZCvnuf+IhqVZ9ymLvnMvv7lTzNOpfxZwOEooWNYwOh EACaznG+L2uZ/Ct2j95a9vYgRfl/MB/du3KGWlf7IbXB2TMBPrqnMlXrUuluNTL1aYdY vl4zq8QecCIMyazRXNxEW+U2BOZwZ0xhISNJcjB+CfPDLkKbT8t3wXl/LFcQy7ukUBv9 kAAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=IzyQztKL5NuzW7zsjYfVSS72gubL0zPqhD++rjqQmcA=; b=e9vdzbNPZPxohfkQFqbwgGmNLdwpQOYtrHXoNp4d+eXf+VOOaPcsfLt4bq7TtyxcQ1 yEurc3HnUQtUJRTFH53xjF09JaRmmuEwmp8nnXRv8SQVnozQd0W9BT79Zh2k2POsIjO3 l7QoiGcoGTZmejFtLbY+4/6x4C0pdBHnpzNvqu1JnvFlAsCfzR4yIarjHqElNzUI+oC/ VjedfGGVrWHytMTDUCjjDflApjHDcUBMcKLhrg+RzXm4DYdNBbacO5UDB93knfmV/9c5 yjKl73ZgEjxzLaMVc2z//DJtEoxxc4R5OIozlEl0BGYqukYVMzJpMYno8qPPrV5lS3uv bd3A== X-Gm-Message-State: AMCzsaWQwyjjFSmoNJTh20rMX5wYpS+TeNh86JFJYRTtg5mXG6zdOgPE 7GoFTVAzREOW/K9c1ofb5t853Q== X-Google-Smtp-Source: AOwi7QBgRnsZpzj5Sje+yIhM77KDFYScfhWKE+/Y9vibJeHKi5SBx1BvnYzzNyWOmDViJ5dT+Dv+Vw== X-Received: by 10.36.65.84 with SMTP id x81mr336369ita.61.1507248882236; Thu, 05 Oct 2017 17:14:42 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id 197sm117317ioo.68.2017.10.05.17.14.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Oct 2017 17:14:41 -0700 (PDT) From: Alex To: Eli Zaretskii Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> <83zi95x4of.fsf@gnu.org> Date: Thu, 05 Oct 2017 18:14:39 -0600 In-Reply-To: <83zi95x4of.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Oct 2017 13:36:00 +0300") Message-ID: <87376xxhcg.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 28658 Cc: 28658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) Eli Zaretskii writes: >> It would be nice if it worked with pixel positions rather than >> character positions, but I'm not sure how to do that in a terminal >> Emacs. > > You can't: TTY frames cannot discern screen positions with resolution > of more than 1 character. > >> @@ -290,12 +292,14 @@ xterm-mouse-event >> (xterm-mouse--set-click-count event click-count))) >> ((not last-time) nil) >> ((and (> double-click-time (* 1000 (- this-time last-time))) >> + (eq x last-x) >> + (eq y last-y) > > IMO, 'eq' is not right here: this test should obey the value of > double-click-fuzz, whose units on TTY frames are 1/8 of a character. I don't understand how to use double-click-fuzz in TTY frames. You said that TTY frames can't discern screen position differences of less than a character, so then why are the units 1/8th of a character? Is there a way to get the mouse coordinate position in 1/8ths of a character to use double-click-fuzz? From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 06 03:14:35 2017 Received: (at 28658) by debbugs.gnu.org; 6 Oct 2017 07:14:35 +0000 Received: from localhost ([127.0.0.1]:52077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0MqA-0003jL-RL for submit@debbugs.gnu.org; Fri, 06 Oct 2017 03:14:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0Mq9-0003j4-59 for 28658@debbugs.gnu.org; Fri, 06 Oct 2017 03:14:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0Mpz-0006Ym-0X for 28658@debbugs.gnu.org; Fri, 06 Oct 2017 03:14:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0Mpy-0006Ye-T8; Fri, 06 Oct 2017 03:14:22 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4099 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e0Mpy-00059Y-Bj; Fri, 06 Oct 2017 03:14:22 -0400 Date: Fri, 06 Oct 2017 10:14:13 +0300 Message-Id: <8360bswxx6.fsf@gnu.org> From: Eli Zaretskii To: Alex In-reply-to: <87376xxhcg.fsf@gmail.com> (message from Alex on Thu, 05 Oct 2017 18:14:39 -0600) Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> <83zi95x4of.fsf@gnu.org> <87376xxhcg.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28658 Cc: 28658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alex > Cc: 28658@debbugs.gnu.org > Date: Thu, 05 Oct 2017 18:14:39 -0600 > > Eli Zaretskii writes: > > > >> @@ -290,12 +292,14 @@ xterm-mouse-event > >> (xterm-mouse--set-click-count event click-count))) > >> ((not last-time) nil) > >> ((and (> double-click-time (* 1000 (- this-time last-time))) > >> + (eq x last-x) > >> + (eq y last-y) > > > > IMO, 'eq' is not right here: this test should obey the value of > > double-click-fuzz, whose units on TTY frames are 1/8 of a character. > > I don't understand how to use double-click-fuzz in TTY frames. You said > that TTY frames can't discern screen position differences of less than a > character, so then why are the units 1/8th of a character? I don't know why the units are 1/8th of a character, perhaps so that a user could set the same value for both GUI and TTY frames. In any case, dividing the value of double-click-fuzz by 8 before comparing with coordinate differences is easy enough, no? > Is there a way to get the mouse coordinate position in 1/8ths of a > character to use double-click-fuzz? I don't think you can get sub-character resolution, but that doesn't mean double-click-fuzz cannot be obeyed: a user could set the value to 16, in which case a 2-character distance should still be okay. With the default value of 3, the second click should indeed be on the same character, so it will be equivalent to your eq test, but that's only the default. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 06 03:44:43 2017 Received: (at 28658) by debbugs.gnu.org; 6 Oct 2017 07:44:43 +0000 Received: from localhost ([127.0.0.1]:52094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0NJL-0004Ve-6u for submit@debbugs.gnu.org; Fri, 06 Oct 2017 03:44:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0NJI-0004VO-W7 for 28658@debbugs.gnu.org; Fri, 06 Oct 2017 03:44:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0NJA-0008PK-KP for 28658@debbugs.gnu.org; Fri, 06 Oct 2017 03:44:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0NJA-0008PF-GO; Fri, 06 Oct 2017 03:44:32 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4466 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e0NJ9-0007bT-8e; Fri, 06 Oct 2017 03:44:31 -0400 Date: Fri, 06 Oct 2017 10:44:22 +0300 Message-Id: <831smgwwix.fsf@gnu.org> From: Eli Zaretskii To: Alex In-reply-to: <877ew9xhv0.fsf@gmail.com> (message from Alex on Thu, 05 Oct 2017 18:03:31 -0600) Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> <87zi9bwmet.fsf@gmail.com> <83y3opx3xe.fsf@gnu.org> <877ew9xhv0.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28658 Cc: 28658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alex > Cc: 28658@debbugs.gnu.org > Date: Thu, 05 Oct 2017 18:03:31 -0600 > > Eli Zaretskii writes: > > >> P.S. Why is the error prefixed by `xterm-mouse-translate-1' instead of > >> `xterm-mouse-event'? > > > > Can you show the full backtrace? > > Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) > xterm-mouse-event(1006) > xterm-mouse-translate-1(1006) > xterm-mouse-translate-extended(nil) > > So the backtrace acknowledges xterm-mouse-event is the culprit, but > without `debug-on-error' set the error message blames > xterm-mouse-translate-1. > > If I don't use the bytecode versions of the procedures, though, then the > error message becomes: > > setq: Wrong type argument: number-or-marker-p, nil So this is something related to the byte compiler, I presume. Did you look at the byte code? From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 07 17:57:17 2017 Received: (at 28658) by debbugs.gnu.org; 7 Oct 2017 21:57:17 +0000 Received: from localhost ([127.0.0.1]:55173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0x5x-00009L-Ay for submit@debbugs.gnu.org; Sat, 07 Oct 2017 17:57:17 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:45875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0x5u-000096-2P for 28658@debbugs.gnu.org; Sat, 07 Oct 2017 17:57:15 -0400 Received: by mail-io0-f178.google.com with SMTP id i38so6262965iod.2 for <28658@debbugs.gnu.org>; Sat, 07 Oct 2017 14:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=pVD3AuY1oW7v4naRyXTMO+wvTHVPAFQbotBAwoO56V0=; b=RR6F/F+bGjNYgvU4A6ah0FZfraubk7vb9Hf3eNFnbawXPrAsRvf8vPeUxvtmGUPhCx T0YeAZcDjYKxaNFJtNiaGE/hxOwtGhW/DCntItbutJrN9MntM8yLYdkI6KhuYdH2dtSi lqZ2X6kTEIgh6SUcGcCMw9AFTelvDy3imeCRW9R96QdujRY0Y1TvLAxzn2TmKxi0y/1k 3KBw1U7SQhivHhE1cUn124fYgv5kMgMCQg+4macfAua8GejlnNaEN5BYsCKv3AkBttD5 12DqDDVrcfcqrrPvBMEEoAvIp3x6XiW7kPHxpQ9+y1khTwrW5rHQT/Zumz3BawxdeusI DIbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=pVD3AuY1oW7v4naRyXTMO+wvTHVPAFQbotBAwoO56V0=; b=OVemui4un893xX0/1zE9U6zWeABLakdaR4lfXFw47f1GJZ4s6ew2THechb12B0YAeg anlgG5z34Msdn1kOX/cuFvWNV/s8QyLTZYh/U5p0/i3/LcSsPxhlHmLVltwgRlsk0vFM e9UbVHpAHkw3/WoK4/KdbeyDA2GdCiSl8/tKk5g3SgwLt4a+D13z2iRpBWMi5c5E1+M6 iJRXs860VXUNvOv0nK9fvGDy7ozQoGaP2/PzmGARssO6yFjgZ3i9xXFazvoG3ZsDvm8Q +5TA0w71z/3cLvN2os7ZAAJX82D/ulj2gfpEoYolNWsFzhA9YQ+9juruXUerEHDKOCjs MK0g== X-Gm-Message-State: AMCzsaVC9QQrCoFtvw8YZOA9xi/6tWu66SkHrmbIG0+tehmCm3RdPeTd aP9K55BMI11WZDuGZ7oNpHFc+g== X-Google-Smtp-Source: AOwi7QAB646I/Shq26XBhEohO/2HrruiyUaKMcYajuvYbdZww2mg0wgS5dM6MiLiMHeZCyBnewHtuQ== X-Received: by 10.107.153.81 with SMTP id b78mr7884448ioe.231.1507413427852; Sat, 07 Oct 2017 14:57:07 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id 199sm2433094itv.37.2017.10.07.14.57.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 07 Oct 2017 14:57:06 -0700 (PDT) From: Alex To: Eli Zaretskii Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> <83zi95x4of.fsf@gnu.org> <87376xxhcg.fsf@gmail.com> <8360bswxx6.fsf@gnu.org> Date: Sat, 07 Oct 2017 15:57:04 -0600 In-Reply-To: <8360bswxx6.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 06 Oct 2017 10:14:13 +0300") Message-ID: <87d15yd3kf.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28658 Cc: 28658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Alex >> Cc: 28658@debbugs.gnu.org >> Date: Thu, 05 Oct 2017 18:14:39 -0600 >> >> Eli Zaretskii writes: >> >> >> >> @@ -290,12 +292,14 @@ xterm-mouse-event >> >> (xterm-mouse--set-click-count event click-count))) >> >> ((not last-time) nil) >> >> ((and (> double-click-time (* 1000 (- this-time last-time))) >> >> + (eq x last-x) >> >> + (eq y last-y) >> > >> > IMO, 'eq' is not right here: this test should obey the value of >> > double-click-fuzz, whose units on TTY frames are 1/8 of a character. >> >> I don't understand how to use double-click-fuzz in TTY frames. You said >> that TTY frames can't discern screen position differences of less than a >> character, so then why are the units 1/8th of a character? > > I don't know why the units are 1/8th of a character, perhaps so that a > user could set the same value for both GUI and TTY frames. In any > case, dividing the value of double-click-fuzz by 8 before comparing > with coordinate differences is easy enough, no? Yes, I was just confused about the units, but that makes sense. Though in my GTK Emacs, (frame-char-width) returns 9 instead of 8 for me... Anyway, here's the patch: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Increase-xterm-click-count-only-within-double-click-.patch Content-Description: xterm >From e9c7aca2ade951e03f67db66bb8d2608d740936d Mon Sep 17 00:00:00 2001 From: Alexander Gramiak Date: Sat, 30 Sep 2017 15:47:56 -0600 Subject: [PATCH] Increase xterm click count only within double-click-fuzz * lisp/xt-mouse.el (xterm-mouse-event): Save the last click's position and check it against the current click's position. --- lisp/xt-mouse.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index d268e1a3fe..d704cfa4e8 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -278,6 +278,8 @@ xterm-mouse-event (last-name (symbol-name last-type)) (last-time (nth 1 last-click)) (click-count (nth 2 last-click)) + (last-x (nth 3 last-click)) + (last-y (nth 4 last-click)) (this-time (float-time)) (name (symbol-name type))) (cond @@ -292,12 +294,16 @@ xterm-mouse-event double-click-time (or (eq double-click-time t) (> double-click-time (* 1000 (- this-time last-time)))) + (<= (abs (- x last-x)) + (/ double-click-fuzz 8)) + (<= (abs (- y last-y)) + (/ double-click-fuzz 8)) (equal last-name (replace-match "" t t name))) (setq click-count (1+ click-count)) (xterm-mouse--set-click-count event click-count)) (t (setq click-count 1))) (set-terminal-parameter nil 'xterm-mouse-last-click - (list type this-time click-count))) + (list type this-time click-count x y))) (set-terminal-parameter nil 'xterm-mouse-x x) (set-terminal-parameter nil 'xterm-mouse-y y) -- 2.14.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 08 03:42:34 2017 Received: (at 28658) by debbugs.gnu.org; 8 Oct 2017 07:42:34 +0000 Received: from localhost ([127.0.0.1]:55448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e16EM-0008Ih-4U for submit@debbugs.gnu.org; Sun, 08 Oct 2017 03:42:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e16EK-0008IU-Hv for 28658@debbugs.gnu.org; Sun, 08 Oct 2017 03:42:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e16EC-0007Vb-AC for 28658@debbugs.gnu.org; Sun, 08 Oct 2017 03:42:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e16EC-0007VT-6b; Sun, 08 Oct 2017 03:42:24 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3523 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e16EB-0007re-Go; Sun, 08 Oct 2017 03:42:23 -0400 Date: Sun, 08 Oct 2017 10:42:20 +0300 Message-Id: <83a812t7ab.fsf@gnu.org> From: Eli Zaretskii To: Alex In-reply-to: <87d15yd3kf.fsf@gmail.com> (message from Alex on Sat, 07 Oct 2017 15:57:04 -0600) Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> <83zi95x4of.fsf@gnu.org> <87376xxhcg.fsf@gmail.com> <8360bswxx6.fsf@gnu.org> <87d15yd3kf.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28658 Cc: 28658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alex > Cc: 28658@debbugs.gnu.org > Date: Sat, 07 Oct 2017 15:57:04 -0600 > > > I don't know why the units are 1/8th of a character, perhaps so that a > > user could set the same value for both GUI and TTY frames. In any > > case, dividing the value of double-click-fuzz by 8 before comparing > > with coordinate differences is easy enough, no? > > Yes, I was just confused about the units, but that makes sense. Though > in my GTK Emacs, (frame-char-width) returns 9 instead of 8 for me... Yes, the 8 thing cannot be anything but an approximation. > Anyway, here's the patch: LGTM, thanks. Please mention the bug number in the log message when you push (to the emacs-26 branch). From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 08 19:45:07 2017 Received: (at 28658-done) by debbugs.gnu.org; 8 Oct 2017 23:45:07 +0000 Received: from localhost ([127.0.0.1]:56848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1LFq-0001yO-VH for submit@debbugs.gnu.org; Sun, 08 Oct 2017 19:45:07 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:43333) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1LFo-0001xA-KK for 28658-done@debbugs.gnu.org; Sun, 08 Oct 2017 19:45:04 -0400 Received: by mail-it0-f42.google.com with SMTP id k70so3871110itk.0 for <28658-done@debbugs.gnu.org>; Sun, 08 Oct 2017 16:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Ku0b50SVRGIY2gBE5M3IO4fULqlt/b5zOH+UPWlqBPI=; b=Wt9/TlZclLi+4HgxN9ddZLgtXoAqP29gPDbsemrZtIYIWvfGQuySlnz5B1nUTmwUHd oJHE5CiczQ20+BkVUMMt7orvLEl8KbGDTa4UxefFQ/10Gu0YVqEYjsDDzQbU1pS+Ntkm DLLrosqIP7evhUA6n53K6gTAVVMEBNZCE9traQGi9KmhCY5kAKDEy+acmeSH+zQ7gUBA lZPqLMOWx8qTOu/seC2OG+cpT327BkWVjzDaUy8vCiGi9MYNRWyBEggp6q2vW6tGYiRm jPJFGWe2pyPb2AadOA806SEeZwGj4nVuaeZxQe2M3L1VIFRT8n9vJvljndOkZuUY0dYA C+2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Ku0b50SVRGIY2gBE5M3IO4fULqlt/b5zOH+UPWlqBPI=; b=Xs2G2AAqDPHHVVkGsrkaqFm4foeSxcRjyixxrDi41MZxNpiAdYM6uwW/BiEaqT7veP rY7tpxzPCYSMUgiUzt/lxmKZ85KdShkzxUUBPTVrjN/lfs4WH06G/8k+dv2afEt6Y2rs YVhvzMEfrqMjqm+kiv1s+U0UPKghUoa47JMBUkz6ZMAiRIjF1FoEZ0iFsVOKCwxTgoBA Txx0WgFTBBZO4MBlc02752ei/PJGF/dmQXcuwK+ZNiY7ulsxMtnKX7XHzcgAyAdJ2tW+ z4hSFxTtiVa7L+vm9TOILAK86vWBkBT0ruEG8HQtHdPbME9pw5reXddK4JUQj6731Ub/ rCeg== X-Gm-Message-State: AMCzsaVmyiLYt0QEjeHQIHb3XIpDR2E7KcLE1xnJars66XQ6IkW1QTd+ 3CldU+9RVPf2SwynMO4vRSVHCw== X-Google-Smtp-Source: AOwi7QBJ8KQ/ljdAS5ZIj5LCH7uqhOIbpwDb5CyiUYIPpwCLtJ1YJ0YjJt+SShvgLtG/Mn00e+z9WA== X-Received: by 10.36.178.19 with SMTP id u19mr11229368ite.64.1507506298648; Sun, 08 Oct 2017 16:44:58 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id z84sm3401299itc.20.2017.10.08.16.44.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 08 Oct 2017 16:44:57 -0700 (PDT) From: Alex To: Eli Zaretskii Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> <83zi95x4of.fsf@gnu.org> <87376xxhcg.fsf@gmail.com> <8360bswxx6.fsf@gnu.org> <87d15yd3kf.fsf@gmail.com> <83a812t7ab.fsf@gnu.org> Date: Sun, 08 Oct 2017 17:44:52 -0600 In-Reply-To: <83a812t7ab.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 08 Oct 2017 10:42:20 +0300") Message-ID: <87shetyzkb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28658-done Cc: 28658-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Eli Zaretskii writes: > LGTM, thanks. Please mention the bug number in the log message when > you push (to the emacs-26 branch). Pushed. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 08 22:37:34 2017 Received: (at 28658) by debbugs.gnu.org; 9 Oct 2017 02:37:34 +0000 Received: from localhost ([127.0.0.1]:56930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1Nwk-0006Cp-7D for submit@debbugs.gnu.org; Sun, 08 Oct 2017 22:37:34 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:44359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1Nwi-0006Cd-LC for 28658@debbugs.gnu.org; Sun, 08 Oct 2017 22:37:32 -0400 Received: by mail-it0-f42.google.com with SMTP id n195so6849046itg.1 for <28658@debbugs.gnu.org>; Sun, 08 Oct 2017 19:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=IdQgdUgV+1dr8jGGghZe1vse4ztQjfcPfu6f4BWO8VI=; b=kdk8xhSBJ36Ok9NNDSKtuXlaTb9iEzQ9NVriFJemgLILpfamJj82qmGD2Mzgd7JXD/ nwUs8Aym/wly7oIrhl0qWqRowUtbpVuXunl+xILtth9Uo69zqNZYS0BBqucctHJx0bW2 oyPdeIyopvH+mTPoxwz9E7UK7Ppxvo6vU9Lx9I4PdrRYhYZOU5UTu8Z6S0UTPeFDHggI gP0VeRdW0VUwngMFJTVlw/E0CFO1HAmy1o66UQmnBUe5v2nsiiSYG53RVxmmr2guphOs cFtEP828aUgShr1f2+1iFG0e4gl/90tH9U6TZJDlgRYjd+/8ZVoU7bZvhhvu5zF6R6yw 5ygw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=IdQgdUgV+1dr8jGGghZe1vse4ztQjfcPfu6f4BWO8VI=; b=jiooX469oJi8vcYvlsmVvnshXqjsWALyFW5nAikABkw4utTS4uXb1OGC+lMPPYVM7Z EBgumKb2XvwJeYtG6W+t3sYiAh7eyjrvvib3mcONb2xebIR8Jsp9x4VlKtfbvqME4bF+ qyYoyguYhn6o74RwPO5Wv6d5Dp6k6BZsPWBv6e2jA1qmJDPh1I48i/NS8VlWXkpfEUxg 58HcYQSypYki2izXif0CpHXNOe79VZtc2Go5WtbmewwXad8aVbqQV3ozAVh3FSDEQrJh 7EJ+jMF6KY9q/N3IXekPQVZaafizLucXf88la7MTIWCE/5mxioYkoKnSQftHfBBHHGSb FLoA== X-Gm-Message-State: AMCzsaV3o6grF8ZQw0J29+5E3F1W1w0P697EseIfNdhQLmgyzUWrvh3q m0/bE8cEF/fJYameMfJvLudiLw== X-Google-Smtp-Source: AOwi7QCYevEiryGaYPur4S4jUrGaixcUTqhc71AUVtQ9CXrDswgLTlT+sxEY617ge0IeS/iAaTesNw== X-Received: by 10.36.203.129 with SMTP id u123mr12373805itg.107.1507516646650; Sun, 08 Oct 2017 19:37:26 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id o137sm3249139iod.59.2017.10.08.19.37.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 08 Oct 2017 19:37:25 -0700 (PDT) From: Alex To: Eli Zaretskii Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> <87zi9bwmet.fsf@gmail.com> <83y3opx3xe.fsf@gnu.org> <877ew9xhv0.fsf@gmail.com> <831smgwwix.fsf@gnu.org> Date: Sun, 08 Oct 2017 20:37:20 -0600 In-Reply-To: <831smgwwix.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 06 Oct 2017 10:44:22 +0300") Message-ID: <87k205yrkv.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28658 Cc: 28658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Eli Zaretskii writes: >> From: Alex >> Cc: 28658@debbugs.gnu.org >> Date: Thu, 05 Oct 2017 18:03:31 -0600 >> >> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) >> xterm-mouse-event(1006) >> xterm-mouse-translate-1(1006) >> xterm-mouse-translate-extended(nil) >> >> So the backtrace acknowledges xterm-mouse-event is the culprit, but >> without `debug-on-error' set the error message blames >> xterm-mouse-translate-1. >> >> If I don't use the bytecode versions of the procedures, though, then the >> error message becomes: >> >> setq: Wrong type argument: number-or-marker-p, nil > > So this is something related to the byte compiler, I presume. For the most part, yeah. Though without the byte compiler the error message is prefixed by `setq' instead of `1+' as it should be (and is when debugging). > Did you look at the byte code? No, I'm not sure what I should be looking for. I thought perhaps this was a known limitation; should I report this as a bug? From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 09 03:11:36 2017 Received: (at 28658) by debbugs.gnu.org; 9 Oct 2017 07:11:36 +0000 Received: from localhost ([127.0.0.1]:57028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1SDv-0004Hi-Q0 for submit@debbugs.gnu.org; Mon, 09 Oct 2017 03:11:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1SDu-0004HV-3q for 28658@debbugs.gnu.org; Mon, 09 Oct 2017 03:11:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1SDl-0006bK-LK for 28658@debbugs.gnu.org; Mon, 09 Oct 2017 03:11:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1SDl-0006bE-Hy; Mon, 09 Oct 2017 03:11:25 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4659 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e1SDk-0000Hs-QP; Mon, 09 Oct 2017 03:11:25 -0400 Date: Mon, 09 Oct 2017 10:11:18 +0300 Message-Id: <83fuasssmh.fsf@gnu.org> From: Eli Zaretskii To: Alex In-reply-to: <87k205yrkv.fsf@gmail.com> (message from Alex on Sun, 08 Oct 2017 20:37:20 -0600) Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position References: <87r2unyh79.fsf@gmail.com> <87zi9bwmet.fsf@gmail.com> <83y3opx3xe.fsf@gnu.org> <877ew9xhv0.fsf@gmail.com> <831smgwwix.fsf@gnu.org> <87k205yrkv.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28658 Cc: 28658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alex > Cc: 28658@debbugs.gnu.org > Date: Sun, 08 Oct 2017 20:37:20 -0600 > > No, I'm not sure what I should be looking for. I thought perhaps this > was a known limitation; should I report this as a bug? Maybe first mention this on emacs-devel, perhaps someone already knows about this. From unknown Fri Jun 13 10:17:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 06 Nov 2017 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator