> 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?
I don't see a problem with it. I pointed out that it's unlikely that
there will be any confusion, but also pointed out that sometime in the
future the repertoire could be extended.
> 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.
Well that (a special magic prefix) is the X10 scheme, which
in turn is part of the problem we're discussing:
a) it doesn't follow the same rules as other escape sequences
b) there's no clear way to extend it.
The reader is still going to do a check at the end, and discard unexpected
input as an error. If the inputs follow the same syntax rules, then it's
less problem to implement and maintain.
I'm not expecting someone to just match "\e[<" and blindly sscanf looking
for a given number of integer parameters and then skip the next character
without examining it. 1006 uses the final character to distinguish
button press/release.
(Correctly parsing 1015 also would involve checking the final character,
of course).
> 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"?
"private" in this regard means that it's not part of ECMA-48.
Take a look at the various "CSI ?" and "CSI >" listed in ctlseqs to see
how xterm (and DEC) use private modes. The existing mouse controls are
for instance private modes.
CSI ? 1 0 0 1 h
Ps = 1 0 0 1 -> Use Hilite Mouse Tracking.
> > 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
> > > >
> >
> > --
> > Thomas E. Dickey <dickey@invisible-island.net>
> > http://invisible-island.net
> > ftp://invisible-island.net
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.9 (GNU/Linux)
> >
> > iEYEARECAAYFAk8cG2IACgkQcCNT4PfkjtucogCfdZesPECwenLZNHe6xx/oc5s7
> > tiMAn2n1zVIgYEMMoZyl/RUwWkVJ1gtZ
> > =DJIQ
> > -----END PGP SIGNATURE-----
> >
> >
--
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
No comments:
Post a Comment