> 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"?
Thomas may say this better, but I know the idea is that the escape
sequence consists of:
A leader, usually CSI and another character. There is list of
known leaders.
A middle part, not containing a terminating character
A terminating character, identifying the meaning.
This allows for skipping codes that are not recognized. Thus the mouse
code *must* be recognized by the leader *and* the terminating character.
The old CSI M code for mouse was a weird exception and we should not go
that way.
Vim doesn't really do this parsing fully, also because there are
exceptions and the user can manually set escape sequences that must be
matched.
--
If you had to identify, in one word, the reason why the
human race has not achieved, and never will achieve, its
full potential, that word would be "meetings."
/// 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
No comments:
Post a Comment