Subject: Re: bug#13839: xterm/mintty control sequences support when formatOtherKeys = 1

From: Ren Victor <[email-masked]>
Date: Tue, 12 Mar 2013 09:04:48 +0100

On Mon, Mar 11, 2013 at 7:25 PM, Stefan Monnier
<[email-masked]> wrote:
>
> >> Can you confirm that the patch below works for your formatOtherKeys=1 case?
> > There is no problem in the patch itself.
>
> Thanks, installed.
>
> > But the xterm extra capability support
> > does not work automatically due to another bug in lisp/term/xterm.el -
> > the regexp in line 532 ">0;\\([0-9]+\\);0".  It should be
> > ">[0-9]+;\\([0-9]+\\);0".
>
> Hmm...
>
> > The default value is 41 (in xterm latest version manual).
>
> It seems that indeed the regexp could need revision, but I'd first like
> to understand what's going on.  The test we want to make is "make sure
> this terminal understands this and that feature".  So the "P v" field
> (the version number) only makes sense if the terminal is actually an
> xterm (or uses a version numbering that implies the same featureset).
> In my xterms the "P p" value is always 0 and not 41 as you seem to suggest.

I checked the  changelog of xterm. There is one item in Patch #280:

    change default emulation level to VT420 (discussion with Ailin Nemui).

http://invisible-island.net/xterm/xterm.log.html#xterm_280

Anyway, "Pp" value can be configured to several values.
Emacs get the terminal type from environment variable "TERM"  I don't
think "Pp" value is relevant.

BR
Victor Ren
>
> More specifically, I'm concerned that by accepting any "P p" number, we
> might end up trying to use a feature that's not supported by the
> underlying terminal emulator because it happens to have version numbers
> that are higher than those of "the usual xterm".
>
>
>         Stefan