Sunday, January 22, 2012

Re: Fwd: Mouse reporting and new standards

On Sun, Jan 22, 2012 at 15:21, Thomas Dickey <dickey@his.com> wrote:

Actually it's the combination of \e[< and the final character that makes
the string unique.   There are four characters which can be used to denote
a private mode: "?", "=", ">" and "<" (see ECMA-48 section 5.4).

I'm sad to hear this.  Could we please then change the 1006 mode now, before it's widely deployed?

The problem, as I said, is that if there might be other escapes starting with \e[< then patching support into existing applications (most notably Emacs) becomes a nightmare (but see my patch for mc and joe, they're ugly too).  The way currently most applicatoins parse is that there's a point during sequentially reading the bytes when they say "haha, I recognize this unique prefix, it means mouse", and then the mouse handling code processes the subsequent bytes as arguments.  If the new escapes don't fit this scheme then application codes need to be modified heavily, in non-trivial ways, e.g. it's almost impossible for Emacs.

I think anything as simple as a fixed letter following the '<' sign, if it's not used anywhere else right now, would do it.  Or alternatively \e[M followed by a single fixed letter that is currently out of use would also do it.

Also, I'm not sure about the purpose of "private" mode, but shouldn't we aim to provide something that will quickly become a new standard, not something "private"?
 
The first three are used in various ways in different terminals.  The last
seems to be rarely used, so I chose to use that.

Conceivably some other escape sequence could be implemented (I don't have
any plans for that).  I'm assuming that vim will check the final character.


Thanks a lot,
egmont



 

> Once this is done, it'll be okay to add 1006 support to Vim.  (In the mean
> time I guess 1015 support could be dropped; this would make extended mouse
> coords stop working in some versions of some terminals, but would probably
> also simplify Vim's code.  But it's okay to keep 1015 too.)
>
> thanks,
> egmont
>
>
>
> >
> > Note that in ctlseqs.html in the DECSET list 1006 and 1015 are not
> > documented.
> >
> > --
> > CRONE:  Who sent you?
> > ARTHUR: The Knights Who Say GNU!
> > CRONE:  Aaaagh!  (she looks around in rear) No!  We have no licenses here.
> >           "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE
> > LTD
> >
> >  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net
> > \\\
> > ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/\\\
> > \\\  an exciting new programming language -- http://www.Zimbu.org
> >  ///
> >  \\\            help me help AIDS victims -- http://ICCF-Holland.org
> >  ///
> >
> > --
> > You received this message from the "vim_use" maillist.
> > Do not top-post! Type your reply below the text you are replying to.
> > For more information, visit http://www.vim.org/maillist.php
> >


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAk8cG2IACgkQcCNT4PfkjtucogCfdZesPECwenLZNHe6xx/oc5s7
tiMAn2n1zVIgYEMMoZyl/RUwWkVJ1gtZ
=DJIQ
-----END PGP SIGNATURE-----


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: