From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
Philipp Stephani <p.stephani2@g= mail.com> writes:
> There are several terminals that announce themselves as XTerm and
> partially implement the XTerm control sequences
> (http://invisible-isl= and.net/xterm/ctlseqs/ctlseqs.html), but have some
> slightly different behavior.
That sounds like breakage waiting to happen. Maybe I'm not entirely
familiar with how things are done in terminal-emulator-land, but why
would you declare yourself as an XTerm if you only partially implement
or differ from the real thing?
how do you communicate the= advanced features (like mouse support)? Is it<= div>
simply that it's there if a terminal claims to be an xterm? Or is there=
a real query method for those things?
> I've tried out XTerm, HTerm, and gnome-terminal, and found the
> following behavior differences:
>
> - XTerm sends xterm-paste (ESC [ 200~ ... ESC [ 201~) if
>=C2=A0 =C2=A0xterm-mouse-mode is disabled.=C2=A0 If xterm-mouse-mode is= enabled, it
>=C2=A0 =C2=A0sends down-mouse-2 + up-mouse-2 using SGR coordinates (ESC= [<1;x;yM
>=C2=A0 =C2=A0ESC [<1;x;ym), which gets translated to mouse-yank-prim= ary.
>
> - Gnome Terminal sends xterm-paste if xterm-mouse-mode is disabled.=C2= =A0 If
>=C2=A0 =C2=A0xterm-mouse-mode is enabled, it only sends down-mouse-2 us= ing SGR
>=C2=A0 =C2=A0coordinates, which is ignored by Emacs.
>
> - HTerm doesn't use bracketed paste mode if xterm-mouse-mode is di= sabled
>=C2=A0 =C2=A0(i.e. pasted text gets inserted using individual
>=C2=A0 =C2=A0self-insert-commands).=C2=A0 If xterm-mouse-mode is enable= d, it uses both
>=C2=A0 =C2=A0(!) down-mouse-2 + down-mouse-up (using basic coordinates)= and then a
>=C2=A0 =C2=A0bracketed paste.
>
> The HTerm and Gnome-Terminal behaviors are probably bugs, and I'll= try
> to get them fixed.=C2=A0 However, maybe we want to work around these i= ssues
> on the Emacs side, e.g. by not requiring an up-mouse-2 if
> xterm-mouse-mode is enabled.
I could go either way on this one... Emacs maybe ought not to be so
choosy about what it gets from a control character standpoint, but how
relatively difficuly would it be to fix the emulators to do both up and
down? That way both flavors of program are satisfied: the ones looking
for down-only get their event, and those looking for both get both.