From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 29 14:29:22 2012 Received: (at submit) by debbugs.gnu.org; 29 Jan 2012 19:29:22 +0000 Received: from localhost ([127.0.0.1]:44083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RraRF-0007no-8U for submit@debbugs.gnu.org; Sun, 29 Jan 2012 14:29:22 -0500 Received: from eggs.gnu.org ([140.186.70.92]:44163) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RrXcP-0003Xh-KR for submit@debbugs.gnu.org; Sun, 29 Jan 2012 11:28:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrXcD-0004ZY-OF for submit@debbugs.gnu.org; Sun, 29 Jan 2012 11:28:31 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_LOW,T_DKIM_INVALID,URI_HEX autolearn=no version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:53493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrXcD-0004ZQ-LL for submit@debbugs.gnu.org; Sun, 29 Jan 2012 11:28:29 -0500 Received: from eggs.gnu.org ([140.186.70.92]:37579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrXcB-0001qC-EU for bug-gnu-emacs@gnu.org; Sun, 29 Jan 2012 11:28:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrXc9-0004Yw-NO for bug-gnu-emacs@gnu.org; Sun, 29 Jan 2012 11:28:27 -0500 Received: from mail-we0-f169.google.com ([74.125.82.169]:46056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrXc9-0004YQ-DU for bug-gnu-emacs@gnu.org; Sun, 29 Jan 2012 11:28:25 -0500 Received: by wera13 with SMTP id a13so3124093wer.0 for ; Sun, 29 Jan 2012 08:28:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=wJWKSku7EtoO7JZSs3+fOJ6GVhOrPq+SFKptqYd1n8k=; b=KhuBH/5VyhvxiN/7HVI53FYsBterdcPJGXgpgW+N7A3IOmjTAKnSiTjouPKBeuuiYt tCLRr+uchmnN7Eddnyo6iSTMAYRDyAKrjpHG3HWQzafsufgj5omqx1K+pBlyb2em2otT 1l0VN1cF1ODfQgMFrlp9HSQO8BkG6Gt3UUwSU= Received: by 10.216.131.21 with SMTP id l21mr5885743wei.39.1327854503397; Sun, 29 Jan 2012 08:28:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.10.146 with HTTP; Sun, 29 Jan 2012 08:27:43 -0800 (PST) From: Egmont Koblinger Date: Sun, 29 Jan 2012 17:27:43 +0100 Message-ID: Subject: xt-mouse: Support extended coordinates To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=0016e6d5669cfd093404b7ad379e 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-Received-From: 140.186.70.17 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 29 Jan 2012 14:29:20 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) --0016e6d5669cfd093404b7ad379e Content-Type: text/plain; charset=UTF-8 Hi, When running in terminal, Emacs only supports mouse clicks up to column or row 223, due to a limitation in the original mouse protocol. However, there is an extension (well, unfortunately, there are a couple of extensions) to overcome this limit. This request is hereby for emacs to implement one of them, so that mouse click works on arbitrary coordinates. The first of such extensions, implemented originally by xterm, is the "1005" mode. It is horribly broken, it breaks mouse handling of applications that implement this extension but run on a terminal that doesn't. So long story short: please don't even consider implementing this mode. The next such extension, to overcome some problems with this mode was implemented originall by rxvt-unicode, is the "1015" extension. Currently it is supported by quite a few terminal emulators, namely rxvt-unicode 9.10, iterm2 1.0 (added by mainstream author), xterm 277, gnome-terminal (vte 0.31) and konsole git HEAD (to become 4.9) -- for the last three the support was added by me. For technical details about these two extensions, see the first comment of http://www.midnight-commander.org/ticket/2662 . Since writing that ticket, another extension, the "1006" mode was invented by xterm's author, appeared in xterm-277, see the source of that for details. In spirit it's pretty much like 1015 (e.g. avoid binary and spells out coordinates in decimal) but addresses some issues with 1015. For some discussions about this 1006 extension versus 1015, see http://vim.1045645.n5.nabble.com/Fwd-Mouse-reporting-and-new-standards-td3378370.html(warning: multiple pages). I am new to emacs's source and new to lisp, so probably I won't come up with a patch myself. However, looking at the code, I have a feeling that adding support for 1006 might be easier than adding support for 1015. This is because 1006 begins with \e[< (and even though theoretically other non-mouse events might also start with this escape, it's unlikely that emacs will ever be interested in those), so in xt-mouse.el you can define-key for \e[< and do all the rest in this file. 1015, due to lack of a unique prefix, requires a quite different parsing flow, and the fix would probably involve touching the C code, too. That's my guess only. Due to much wider adoptation by current terminals, I recommend that you implement the 1015 extension if it's feasible. If not, then please implement the 1006 extension, and I'm happy to work in getting this extension into as many terminal emulators as possible. In either case, the good news is that no matter which of 1006 or 1015 you choose, it won't break the behavior on terminals that don't support them. Just ask the terminal to enable the extension by outputting "\e[?1000h\e[?1015h" or "\e[?1000h\e[?1006h", disable similarly when exiting (e.g. "\e[?1006l\e[?1000l"). If the underlying terminal supports the extension, it will report coordinates in the new format, but if doesn't then it will report coordinates in the old format. These two formats are distinguishable (except for the 1005 mode, that's why that extension is out of question). Just for the record: midnight commander >= 4.8.1 already supports the 1015 extension and autodetects it, no configuration is required from the user. Vim >= 7.3.353 (>= 7.3.405 if running in xterm) also supports this extension, but you need to have ":set ttymouse=urxvt" in your .vimrc, so it's not autodetected; the autodetect possibility was discussed in the thread linked above. Let me know if there's anything I can help with (apart from writing the actual patch :)). The overall goal is hopefully to make clicks on arbitrary positions just work out of the box, without the user having to do anything. thanks a lot, egmont --0016e6d5669cfd093404b7ad379e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi,

When running in terminal, Emacs only supports mouse clicks up to= column or row 223, due to a limitation in the original mouse protocol. How= ever, there is an extension (well, unfortunately, there are a couple of ext= ensions) to overcome this limit.

This request is hereby for emacs to implement one of them, so that mous= e click works on arbitrary coordinates.

The first of such extensions= , implemented originally by xterm, is the "1005" mode.=C2=A0 It i= s horribly broken, it breaks mouse handling of applications that implement = this extension but run on a terminal that doesn't.=C2=A0 So long story = short: please don't even consider implementing this mode.

The next such extension, to overcome some problems with this mode was i= mplemented originall by rxvt-unicode, is the "1015" extension.=C2= =A0 Currently it is supported by quite a few terminal emulators, namely rxv= t-unicode 9.10, iterm2 1.0 (added by mainstream author), xterm 277, gnome-t= erminal (vte 0.31) and konsole git HEAD (to become 4.9) -- for the last thr= ee the support was added by me.

For technical details about these two extensions, see the first comment= of http://www.mi= dnight-commander.org/ticket/2662 .

Since writing that ticket, an= other extension, the "1006" mode was invented by xterm's auth= or, appeared in xterm-277, see the source of that for details.=C2=A0 In spi= rit it's pretty much like 1015 (e.g. avoid binary and spells out coordi= nates in decimal) but addresses some issues with 1015.

For some discussions about this 1006 extension versus 1015, see http://vim.1045645.n5.nabble.com/Fwd-Mouse-reporting-and-ne= w-standards-td3378370.html (warning: multiple pages).

I am new to emacs's source and new to lisp, so probably I won't= come up with a patch myself.=C2=A0 However, looking at the code, I have a = feeling that adding support for 1006 might be easier than adding support fo= r 1015.=C2=A0 This is because 1006 begins with \e[< (and even though the= oretically other non-mouse events might also start with this escape, it'= ;s unlikely that emacs will ever be interested in those), so in xt-mouse.el= you can define-key for \e[< and do all the rest in this file.=C2=A0 101= 5, due to lack of a unique prefix, requires a quite different parsing flow,= and the fix would probably involve touching the C code, too.=C2=A0 That= 9;s my guess only.

Due to much wider adoptation by current terminals, I recommend that you= implement the 1015 extension if it's feasible.=C2=A0 If not, then plea= se implement the 1006 extension, and I'm happy to work in getting this = extension into as many terminal emulators as possible.

In either case, the good news is that no matter which of 1006 or 1015 y= ou choose, it won't break the behavior on terminals that don't supp= ort them.=C2=A0 Just ask the terminal to enable the extension by outputting= "\e[?1000h\e[?1015h" or "\e[?1000h\e[?1006h", disable = similarly when exiting (e.g. "\e[?1006l\e[?1000l").=C2=A0 If the = underlying terminal supports the extension, it will report coordinates in t= he new format, but if doesn't then it will report coordinates in the ol= d format.=C2=A0 These two formats are distinguishable (except for the 1005 = mode, that's why that extension is out of question).

Just for the record: midnight commander >=3D 4.8.1 already supports = the 1015 extension and autodetects it, no configuration is required from th= e user.=C2=A0 Vim >=3D 7.3.353 (>=3D 7.3.405 if running in xterm) als= o supports this extension, but you need to have ":set ttymouse=3Durxvt= " in your .vimrc, so it's not autodetected; the autodetect possibi= lity was discussed in the thread linked above.

Let me know if there's anything I can help with (apart from writing= the actual patch :)).=C2=A0 The overall goal is hopefully to make clicks o= n arbitrary positions just work out of the box, without the user having to = do anything.


thanks a lot,
egmont

--0016e6d5669cfd093404b7ad379e-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 14 11:52:29 2012 Received: (at 10642) by debbugs.gnu.org; 14 Jul 2012 15:52:29 +0000 Received: from localhost ([127.0.0.1]:41284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sq4dw-00033r-Iz for submit@debbugs.gnu.org; Sat, 14 Jul 2012 11:52:29 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:34635) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sq4dv-00033k-3I for 10642@debbugs.gnu.org; Sat, 14 Jul 2012 11:52:27 -0400 Received: from cm162.gamma80.maxonline.com.sg ([202.156.80.162]:33031 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Sq4YL-00063S-Sz; Sat, 14 Jul 2012 11:46:42 -0400 From: Chong Yidong To: Egmont Koblinger Subject: Re: bug#10642: xt-mouse: Support extended coordinates References: Date: Sat, 14 Jul 2012 23:46:35 +0800 In-Reply-To: (Egmont Koblinger's message of "Sun, 29 Jan 2012 17:27:43 +0100") Message-ID: <87obni8hwk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 10642 Cc: 10642@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Egmont Koblinger writes: > When running in terminal, Emacs only supports mouse clicks up to > column or row 223, due to a limitation in the original mouse protocol. > However, there is an extension (well, unfortunately, there are a > couple of extensions) to overcome this limit. > > This request is hereby for emacs to implement one of them, so that > mouse click works on arbitrary coordinates. Thanks; the detailed information in your report was very useful. I've implemented the 1006 protocol handling, and committed it to trunk. The code assumes that if the terminal does not support 1006 mode, sending the \e[?1006h sequence is a no-op, and mouse click events are received using the old protocol. We look for both \e[M and \e[< events and handle them. This seems to work on XTerms supporting 1006 mode (tested with xterm-281) as well as older ttys (tested with xterm-271 and xfce4-terminal 0.4.8). From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 14 11:52:46 2012 Received: (at control) by debbugs.gnu.org; 14 Jul 2012 15:52:46 +0000 Received: from localhost ([127.0.0.1]:41287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sq4eE-00034J-9J for submit@debbugs.gnu.org; Sat, 14 Jul 2012 11:52:46 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:34639) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sq4eC-00034D-U4 for control@debbugs.gnu.org; Sat, 14 Jul 2012 11:52:45 -0400 Received: from cm162.gamma80.maxonline.com.sg ([202.156.80.162]:33032 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Sq4Ye-00063h-Aa for control@debbugs.gnu.org; Sat, 14 Jul 2012 11:47:01 -0400 From: Chong Yidong To: control@debbugs.gnu.org Subject: close 10642 Date: Sat, 14 Jul 2012 23:46:55 +0800 Message-ID: <87a9z25or4.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) close 10642 thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 06 16:47:06 2012 Received: (at 10642) by debbugs.gnu.org; 6 Aug 2012 20:47:06 +0000 Received: from localhost ([127.0.0.1]:38102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SyUCf-00083v-LL for submit@debbugs.gnu.org; Mon, 06 Aug 2012 16:47:06 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:53431) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SyUCc-00083d-Rn for 10642@debbugs.gnu.org; Mon, 06 Aug 2012 16:47:03 -0400 Received: by lbbgg6 with SMTP id gg6so631641lbb.3 for <10642@debbugs.gnu.org>; Mon, 06 Aug 2012 13:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=8H1iO4Zq0MWI8TPZlRWh7jvCuAosxJs69B+Igt0Dd+o=; b=UgLW5gz6ngpAYfahmsLP09GRILfKzX93qSDai7eGcrbjiA3ElekLM9s+wC1axHdqz7 6xFhGuuytiCaUkaDcGt+tSIrGyLU4GZ3JY4P3dSxip/pui11DQ1YSEOvqpj/HU0euzoE Ey073YeNxp7lOE6otEz1PA7cYcaxYQoTcMg8ughkSC6/sgXLrhyAvdibkXHLlVxcWDCq 0JNf+RBBTAsWZMFKGIPRIkkwWbNCbOac6zqLF53+z5pniEqld8YoDPD2AFnCG9PL1TqC F7QWxaNifMCuQTSAtayNsuGPlOHCzivHWqrcpj5phWz3gkdLOGeXXS28IOYnF2xSSZ5e phpA== Received: by 10.152.132.233 with SMTP id ox9mr11924934lab.25.1344285547362; Mon, 06 Aug 2012 13:39:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.22.1 with HTTP; Mon, 6 Aug 2012 13:38:27 -0700 (PDT) In-Reply-To: <87obni8hwk.fsf@gnu.org> References: <87obni8hwk.fsf@gnu.org> From: Egmont Koblinger Date: Mon, 6 Aug 2012 22:38:27 +0200 Message-ID: Subject: Re: bug#10642: xt-mouse: Support extended coordinates To: Chong Yidong Content-Type: multipart/alternative; boundary=f46d042c6c4d86f88b04c69edeb7 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10642 Cc: 10642@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --f46d042c6c4d86f88b04c69edeb7 Content-Type: text/plain; charset=UTF-8 Thanks very much, Chong! Just for the record, I've implemented the 1006 support to Gnome-Terminal and Konsole; I hope they will accept my patches and this 1006 extension will become quite mainstream across terminal emulators. https://bugzilla.gnome.org/show_bug.cgi?id=681329 https://bugs.kde.org/show_bug.cgi?id=304686 thanks, egmont On Sat, Jul 14, 2012 at 5:46 PM, Chong Yidong wrote: > Egmont Koblinger writes: > > > When running in terminal, Emacs only supports mouse clicks up to > > column or row 223, due to a limitation in the original mouse protocol. > > However, there is an extension (well, unfortunately, there are a > > couple of extensions) to overcome this limit. > > > > This request is hereby for emacs to implement one of them, so that > > mouse click works on arbitrary coordinates. > > Thanks; the detailed information in your report was very useful. I've > implemented the 1006 protocol handling, and committed it to trunk. > > The code assumes that if the terminal does not support 1006 mode, > sending the \e[?1006h sequence is a no-op, and mouse click events are > received using the old protocol. We look for both \e[M and \e[< events > and handle them. This seems to work on XTerms supporting 1006 mode > (tested with xterm-281) as well as older ttys (tested with xterm-271 and > xfce4-terminal 0.4.8). > --f46d042c6c4d86f88b04c69edeb7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks very much, Chong!

Just for the record, I've implemented t= he 1006 support to Gnome-Terminal and Konsole; I hope they will accept my p= atches and this 1006 extension will become quite mainstream across terminal= emulators.

https:/= /bugzilla.gnome.org/show_bug.cgi?id=3D681329
https://bugs.kde.org/show_bug.cgi?id=3D3= 04686

thanks,
egmont


--f46d042c6c4d86f88b04c69edeb7-- From unknown Mon Aug 18 15:38:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 04 Sep 2012 11:24:03 +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