GNU logs - #24420, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#24420: 25.1.50; Work around terminal differences for bracketed-paste/mouse-2
Resent-From: Philipp Stephani <p.stephani2@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 12 Sep 2016 13:41:02 +0000
Resent-Message-ID: <handler.24420.B.14736876537889 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 24420
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 24420 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.14736876537889
          (code B ref -1); Mon, 12 Sep 2016 13:41:02 +0000
Received: (at submit) by debbugs.gnu.org; 12 Sep 2016 13:40:53 +0000
Received: from localhost ([127.0.0.1]:57148 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bjRTg-00023B-Re
	for submit <at> debbugs.gnu.org; Mon, 12 Sep 2016 09:40:53 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50657)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <p.stephani2@HIDDEN>) id 1bjRTc-00022t-Ft
 for submit <at> debbugs.gnu.org; Mon, 12 Sep 2016 09:40:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <p.stephani2@HIDDEN>) id 1bjRTT-0006Mk-7j
 for submit <at> debbugs.gnu.org; Mon, 12 Sep 2016 09:40:43 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_50,
 FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:40652)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <p.stephani2@HIDDEN>) id 1bjRTT-0006Ma-21
 for submit <at> debbugs.gnu.org; Mon, 12 Sep 2016 09:40:39 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41576)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <p.stephani2@HIDDEN>) id 1bjRTR-0008Kx-3v
 for bug-gnu-emacs@HIDDEN; Mon, 12 Sep 2016 09:40:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <p.stephani2@HIDDEN>) id 1bjRTM-0006H7-6x
 for bug-gnu-emacs@HIDDEN; Mon, 12 Sep 2016 09:40:36 -0400
Received: from mail-wm0-f49.google.com ([74.125.82.49]:36817)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <p.stephani2@HIDDEN>) id 1bjRTL-0006Gf-PE
 for bug-gnu-emacs@HIDDEN; Mon, 12 Sep 2016 09:40:32 -0400
Received: by mail-wm0-f49.google.com with SMTP id b187so136537997wme.1
 for <bug-gnu-emacs@HIDDEN>; Mon, 12 Sep 2016 06:40:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:subject:date:message-id:mime-version
 :content-transfer-encoding;
 bh=Fa6vRCa97FKAVrNRWyvgHGwKKPVCi0qi9OIQLPEQ2K4=;
 b=avV5nDrzXvV+ctgW542dTNCsIPmEvsdSDbPpv42JHyCTOAQz2xxfMaFy2EtKuu4JBs
 hLj2wLkLjbbjs/x18VLfunSIJWSk8olcsb2j3ph00nVbnY7VmEoTIwWKEIroY/RLTZlw
 NTvzSFvtMMvBMmE7QSPIeknBpSphCz+QkDYAQsnsDMKxaf5qPAIjzwzwE+Zim6/G2DT9
 lCwjCZhyfKsw2+E3u/Gpd/sk9eNA5qciEsh1C5Qs48CqbkNi9jRdPSVBWkElE0JA0F+p
 VXx0qF8CxmaytNeUmX0S0IwnkRfply/QjL6MB45XAaYoSaqejcJhO6f7kbKJfSerALXy
 JcKA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version
 :content-transfer-encoding;
 bh=Fa6vRCa97FKAVrNRWyvgHGwKKPVCi0qi9OIQLPEQ2K4=;
 b=deB8pge3bQaJBoH3Kw7x7xz8eQEiriNiTzRS4B6EgYeji+LTAyQoks5xa3H5SeidW4
 AalQrH83urDs5T+vOOpXwkRGWhlCsK/Og0vNcdK/jXTcaixW1iTWpD5PCFhDh6iU9m38
 Z866mxvEyNGVBbnuCE+OS4JZxeL8V+P5TOlA3IQf37+f1WdK7C4iUuYksPgd/2Uk3Hj5
 eXqIobkOI76qEJlxFCtYjmA2o+2UAtQPO9yPPDzGh/5fhi7lXs0FSqurJUSQ9ACNGq4g
 gDaDimSkzx/gTxeoShwl7c0QlqUkLnsNE2FJ3dzbAG5IE4fNOIHrD0s6NcQQobVi7ssr
 XUJg==
X-Gm-Message-State: AE9vXwME50+fi6rfpNabaNJEpQ2ad3mR7I+0EKB/lnT/1ai8faJjYfabyD9bN5UaGMhr4Q==
X-Received: by 10.28.180.86 with SMTP id d83mr11602777wmf.114.1473687570663;
 Mon, 12 Sep 2016 06:39:30 -0700 (PDT)
Received: from a.muc.corp.google.com ([2a00:79e0:15:4:2cd8:65c6:9966:82f5])
 by smtp.gmail.com with ESMTPSA id w71sm17867602wmw.17.2016.09.12.06.39.29
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=AES128-SHA bits=128/128);
 Mon, 12 Sep 2016 06:39:29 -0700 (PDT)
From: Philipp Stephani <p.stephani2@HIDDEN>
Date: Mon, 12 Sep 2016 15:39:25 +0200
Message-ID: <wvr4lgyxxmnm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.3 (---)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


There are several terminals that announce themselves as XTerm and
partially implement the XTerm control sequences
(http://invisible-island.net/xterm/ctlseqs/ctlseqs.html), but have some
slightly different behavior.  I've tried out XTerm, HTerm, and
gnome-terminal, and found the following behavior differences:

- XTerm sends xterm-paste (ESC [ 200~ ... ESC [ 201~) if
  xterm-mouse-mode is disabled.  If xterm-mouse-mode is enabled, it
  sends down-mouse-2 + up-mouse-2 using SGR coordinates (ESC [<1;x;yM
  ESC [<1;x;ym), which gets translated to mouse-yank-primary.

- Gnome Terminal sends xterm-paste if xterm-mouse-mode is disabled.  If
  xterm-mouse-mode is enabled, it only sends down-mouse-2 using SGR
  coordinates, which is ignored by Emacs.

- HTerm doesn't use bracketed paste mode if xterm-mouse-mode is disabled
  (i.e. pasted text gets inserted using individual
  self-insert-commands).  If xterm-mouse-mode is enabled, it uses both
  (!) down-mouse-2 + down-mouse-up (using basic coordinates) and then a
  bracketed paste.

The HTerm and Gnome-Terminal behaviors are probably bugs, and I'll try
to get them fixed.  However, maybe we want to work around these issues
on the Emacs side, e.g. by not requiring an up-mouse-2 if
xterm-mouse-mode is enabled.


In GNU Emacs 25.1.50.4 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2016-09-05 built on unknown
Repository revision: 6acff25280dbb97b5e9ddfd872b33ceb36b0470a
Windowing system distributor 'The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 14.04 LTS

Configured using:
 'configure --with-modules'

Configured features:
XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY GNUTLS FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv
bytecomp byte-compile cl-extra help-mode cconv cl-loaddefs pcase cl-lib
dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec
password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 97721 6855)
 (symbols 48 20654 0)
 (miscs 40 325 144)
 (strings 32 17939 4381)
 (string-bytes 1 588434)
 (vectors 16 13774)
 (vector-slots 8 451984 3705)
 (floats 8 183 31)
 (intervals 56 199 0)
 (buffers 976 12)
 (heap 1024 32176 1173))

--=20
Google Germany GmbH
Erika-Mann-Stra=C3=9Fe 33
80636 M=C3=BCnchen

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Gesch=C3=A4ftsf=C3=BChrer: Matthew Scott Sucherman, Paul Terence Manicle

Diese E-Mail ist vertraulich.  Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den Absender und l=C3=
=B6schen
Sie die E-Mail und alle Anh=C3=A4nge.  Vielen Dank.

This e-mail is confidential.  If you are not the right addressee please do =
not
forward it, please inform the sender, and please erase this e-mail including
any attachments.  Thanks.




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Philipp Stephani <p.stephani2@HIDDEN>
Subject: bug#24420: Acknowledgement (25.1.50; Work around terminal
 differences for bracketed-paste/mouse-2)
Message-ID: <handler.24420.B.14736876537889.ack <at> debbugs.gnu.org>
References: <wvr4lgyxxmnm.fsf@HIDDEN>
X-Gnu-PR-Message: ack 24420
X-Gnu-PR-Package: emacs
Reply-To: 24420 <at> debbugs.gnu.org
Date: Mon, 12 Sep 2016 13:41:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 24420 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
24420: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D24420
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#24420: 25.1.50; Work around terminal differences for bracketed-paste/mouse-2
Resent-From: Robert Cochran <robert-emacs@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 14 Sep 2016 18:38:01 +0000
Resent-Message-ID: <handler.24420.B24420.147387822520858 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 24420
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Philipp Stephani <p.stephani2@HIDDEN>
Cc: 24420 <at> debbugs.gnu.org
Received: via spool by 24420-submit <at> debbugs.gnu.org id=B24420.147387822520858
          (code B ref 24420); Wed, 14 Sep 2016 18:38:01 +0000
Received: (at 24420) by debbugs.gnu.org; 14 Sep 2016 18:37:05 +0000
Received: from localhost ([127.0.0.1]:59778 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bkF3Q-0005QM-N4
	for submit <at> debbugs.gnu.org; Wed, 14 Sep 2016 14:37:04 -0400
Received: from mail.workgrouplinux.net ([207.195.177.82]:54326)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <robert-emacs@HIDDEN>) id 1bkF3P-0005Q3-88
 for 24420 <at> debbugs.gnu.org; Wed, 14 Sep 2016 14:37:04 -0400
DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=cochranmail.com; h=from:to
 :cc:subject:references:date:in-reply-to:message-id:mime-version
 :content-type; s=dkim1; bh=b8nJZXIqplH+jZcZwGre744NoGU=; b=i0ki9
 fndu9+nt7tHsDz45tmeD/0bBqBxwUaurUldUBo3BHXP1mQhOc8GwZhr8RmZQ7ydt
 HbefwJhcrnh0zRYw5h7M44mgWwD26PMVBKNRjzr7fbRUlar/lqUKPyCdjTSK/gCH
 r4QXy6VcBhJHYAh7PAl7QJbJVafZAJCmuxRJgGvMDktrx3WrHYduYcEb/uHo3rOs
 pk9tzWWjDiv6vBwmsWuQiTbu/BryDfUy18U7dujsdbatYdQ47DanqbIAPnwfsSe3
 7i4bVZxXE3zVQGu6WPghowcYum1w8uiZQ5AZNw6cDFTrfYGJLx8nHFn1vbyoZKE5
 je1oSuJlwtv+QcArg==
Received: (qmail 30101 invoked by uid 0); 14 Sep 2016 18:37:00 -0000
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=private; d=cochranmail.com;
 b=MDJC6o9VhHU7yrQiJochHEtJI+HORFHcclECtvtqPW+iWFx0CHY0gbPsdkH+kNGOE2//SJSrIFEhuDsQUSjKAw==;
Received: from 131-191-86-130.as.clicknet.org (HELO SoraLaptop)
 (robert@HIDDEN@131.191.86.130)
 by mail.cochrantribe.org with ESMTPA; 14 Sep 2016 18:37:00 -0000
From: Robert Cochran <robert-emacs@HIDDEN>
References: <wvr4lgyxxmnm.fsf@HIDDEN>
Date: Wed, 14 Sep 2016 11:36:57 -0700
In-Reply-To: <wvr4lgyxxmnm.fsf@HIDDEN> (Philipp Stephani's
 message of "Mon, 12 Sep 2016 15:39:25 +0200")
Message-ID: <8737l2pbue.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Philipp Stephani <p.stephani2@HIDDEN> writes:

> There are several terminals that announce themselves as XTerm and
> partially implement the XTerm control sequences
> (http://invisible-island.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? _That_ sounds like the bug to me. Don't
claim to be something you're not. When a program *still* has to account
for differences in terminals after getting a terminal descriptor, then
IMO you've lost the whole point of term{cap,info}.

How does one get new entries into the database (and curses) nowadays
anyhow? Maybe part of the problem here is that people piggy-back off of
xterm's descriptor because they don't have their own entry... Also, how
do you communicate the advanced features (like mouse support)? Is it
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
>   xterm-mouse-mode is disabled.  If xterm-mouse-mode is enabled, it
>   sends down-mouse-2 + up-mouse-2 using SGR coordinates (ESC [<1;x;yM
>   ESC [<1;x;ym), which gets translated to mouse-yank-primary.
>
> - Gnome Terminal sends xterm-paste if xterm-mouse-mode is disabled.  If
>   xterm-mouse-mode is enabled, it only sends down-mouse-2 using SGR
>   coordinates, which is ignored by Emacs.
>
> - HTerm doesn't use bracketed paste mode if xterm-mouse-mode is disabled
>   (i.e. pasted text gets inserted using individual
>   self-insert-commands).  If xterm-mouse-mode is enabled, it uses both
>   (!) down-mouse-2 + down-mouse-up (using basic coordinates) and then a
>   bracketed paste.
>
> The HTerm and Gnome-Terminal behaviors are probably bugs, and I'll try
> to get them fixed.  However, maybe we want to work around these issues
> 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.

-- 
~Robert Cochran

GPG Fingerprint - E778 2DD4 FEA6 6A68 6F26  AD2D E5C3 EB36 4886 8871




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#24420: 25.1.50; Work around terminal differences for bracketed-paste/mouse-2
Resent-From: Philipp Stephani <p.stephani2@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 14 Sep 2016 20:06:02 +0000
Resent-Message-ID: <handler.24420.B24420.147388354129084 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 24420
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Robert Cochran <robert-emacs@HIDDEN>
Cc: 24420 <at> debbugs.gnu.org
Received: via spool by 24420-submit <at> debbugs.gnu.org id=B24420.147388354129084
          (code B ref 24420); Wed, 14 Sep 2016 20:06:02 +0000
Received: (at 24420) by debbugs.gnu.org; 14 Sep 2016 20:05:41 +0000
Received: from localhost ([127.0.0.1]:59850 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bkGRA-0007Z2-TP
	for submit <at> debbugs.gnu.org; Wed, 14 Sep 2016 16:05:41 -0400
Received: from mail-wm0-f51.google.com ([74.125.82.51]:35289)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <p.stephani2@HIDDEN>) id 1bkGR8-0007Ym-3X
 for 24420 <at> debbugs.gnu.org; Wed, 14 Sep 2016 16:05:38 -0400
Received: by mail-wm0-f51.google.com with SMTP id i130so66485236wmf.0
 for <24420 <at> debbugs.gnu.org>; Wed, 14 Sep 2016 13:05:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=vmzECie9PMb9KnKbQUnLCWvb105BczHXGCbzxS3HIcE=;
 b=Lh2iNrnF2NxFCaemKQbuE0dcSLrG6yNwMorDbzG0wanp21Xf6DV+FiDKrXZ13N2bvu
 GQZPEk/cnqPFfdVplNCAXPoefSNKr15QChfBGbNHswXHB+Pf76osk8MqCDZLGV4jXU6o
 Vt0lVBjP3bSeXljDIbPxHvkOJdkt7AilZQ3ppgQ9CiqCLW/mYsnzh52qGGnzTTAOXLWi
 A3t5Yr7oKI3nBzlW3hAeEkHfU+uqx9/vafgquIhRJHG8Xh1iRVOvZPMh/l1VK938Za8g
 W38wvTg5zzYySBpaAQeN+8Nqakj+1u1vreRoufisgeRFKgZWxZfIXJROgM/8X0iZ5O/n
 wu4w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=vmzECie9PMb9KnKbQUnLCWvb105BczHXGCbzxS3HIcE=;
 b=jh04OReiMC283HBxBXnobGfJqAAlY4p4dDdMvfUv6FmIOjEHjyGJEVuimWEOX1CQQ7
 CtFt+YvtCHO7JiViOuKBfer0l5WDw9VtC5evcN9UpPdm+tBrH7D1TN25xMxJiBcdBlco
 st2uYtERUJ/ddJyu4bRqSqKHw1foeGRuIoI39v/mOeTaQNJ8M1ocf2s1f97eVi3iAv9E
 ldXSQuVUcWprFidWKV3dAso6N65RlVcTADKYBZwOJt8C/3DXy69g7dNL4skoM2r+rS8q
 D0T2IrXNeNnN7M3CivWtIwU7bKlJ5QIbiBYiRn/U7TFMGIVJzj/El/FRA6lK5JDEBMiX
 +RVQ==
X-Gm-Message-State: AE9vXwNiAq99oWpv3PfmFygmHGDCSfwxZE6i3K3dKxvQjTAk3/wtJyLu+x+6n7btGYKNYHBK9PCVurp9Q9Rxng==
X-Received: by 10.194.184.39 with SMTP id er7mr4381476wjc.159.1473883532407;
 Wed, 14 Sep 2016 13:05:32 -0700 (PDT)
MIME-Version: 1.0
References: <wvr4lgyxxmnm.fsf@HIDDEN>
 <8737l2pbue.fsf@HIDDEN>
In-Reply-To: <8737l2pbue.fsf@HIDDEN>
From: Philipp Stephani <p.stephani2@HIDDEN>
Date: Wed, 14 Sep 2016 20:05:21 +0000
Message-ID: <CAArVCkTbTheXE5bD9RBRXb_ECcpXSwd87bqLtq7wc-cjj2x4aQ@HIDDEN>
Content-Type: multipart/alternative; boundary=047d7ba97a1063bfeb053c7d40b2
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

--047d7ba97a1063bfeb053c7d40b2
Content-Type: text/plain; charset=UTF-8

Robert Cochran <robert-emacs@HIDDEN> schrieb am Mi., 14. Sep. 2016
um 20:37 Uhr:

> Philipp Stephani <p.stephani2@HIDDEN> writes:
>
> > There are several terminals that announce themselves as XTerm and
> > partially implement the XTerm control sequences
> > (http://invisible-island.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?


For the same reason that every web browser on the planet declares itself as
"Mozilla". Identification strings simply don't work.


how do you communicate the advanced features (like mouse support)? Is it
> simply that it's there if a terminal claims to be an xterm? Or is there
> a real query method for those things?
>

That's not really possible. Basically Emacs tries to enable all features
and assumes the terminal emulator simply ignores escape sequences it
doesn't understand.


>
> > I've tried out XTerm, HTerm, and gnome-terminal, and found the
> > following behavior differences:
> >
> > - XTerm sends xterm-paste (ESC [ 200~ ... ESC [ 201~) if
> >   xterm-mouse-mode is disabled.  If xterm-mouse-mode is enabled, it
> >   sends down-mouse-2 + up-mouse-2 using SGR coordinates (ESC [<1;x;yM
> >   ESC [<1;x;ym), which gets translated to mouse-yank-primary.
> >
> > - Gnome Terminal sends xterm-paste if xterm-mouse-mode is disabled.  If
> >   xterm-mouse-mode is enabled, it only sends down-mouse-2 using SGR
> >   coordinates, which is ignored by Emacs.
> >
> > - HTerm doesn't use bracketed paste mode if xterm-mouse-mode is disabled
> >   (i.e. pasted text gets inserted using individual
> >   self-insert-commands).  If xterm-mouse-mode is enabled, it uses both
> >   (!) down-mouse-2 + down-mouse-up (using basic coordinates) and then a
> >   bracketed paste.
> >
> > The HTerm and Gnome-Terminal behaviors are probably bugs, and I'll try
> > to get them fixed.  However, maybe we want to work around these issues
> > 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.
>
>
Fixing gnome-terminal would be preferred, yes, but old (unfixed) versions
tend to stick around for years.
With HTerm it's a bit different: arguably HTerm's behavior is better than
XTerm's, because with XTerm you can't paste any more once you enable
extended mouse mode.

--047d7ba97a1063bfeb053c7d40b2
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">Robert=
 Cochran &lt;<a href=3D"mailto:robert-emacs@HIDDEN">robert-emacs@c=
ochranmail.com</a>&gt; schrieb am Mi., 14. Sep. 2016 um 20:37=C2=A0Uhr:<br>=
</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex">Philipp Stephani &lt;<a href=3D"mailto=
:p.stephani2@HIDDEN" class=3D"gmail_msg" target=3D"_blank">p.stephani2@g=
mail.com</a>&gt; writes:<br class=3D"gmail_msg">
<br class=3D"gmail_msg">
&gt; There are several terminals that announce themselves as XTerm and<br c=
lass=3D"gmail_msg">
&gt; partially implement the XTerm control sequences<br class=3D"gmail_msg"=
>
&gt; (<a href=3D"http://invisible-island.net/xterm/ctlseqs/ctlseqs.html" re=
l=3D"noreferrer" class=3D"gmail_msg" target=3D"_blank">http://invisible-isl=
and.net/xterm/ctlseqs/ctlseqs.html</a>), but have some<br class=3D"gmail_ms=
g">
&gt; slightly different behavior.<br class=3D"gmail_msg">
<br class=3D"gmail_msg">
That sounds like breakage waiting to happen. Maybe I&#39;m not entirely<br =
class=3D"gmail_msg">
familiar with how things are done in terminal-emulator-land, but why<br cla=
ss=3D"gmail_msg">
would you declare yourself as an XTerm if you only partially implement<br c=
lass=3D"gmail_msg">
or differ from the real thing?</blockquote><div><br></div><div>For the same=
 reason that every web browser on the planet declares itself as &quot;Mozil=
la&quot;. Identification strings simply don&#39;t work.</div><div>=C2=A0</d=
iv><div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .=
8ex;border-left:1px #ccc solid;padding-left:1ex">how do you communicate the=
 advanced features (like mouse support)? Is it<br class=3D"gmail_msg">
simply that it&#39;s there if a terminal claims to be an xterm? Or is there=
<br class=3D"gmail_msg">
a real query method for those things?<br class=3D"gmail_msg"></blockquote><=
div><br></div><div>That&#39;s not really possible. Basically Emacs tries to=
 enable all features and assumes the terminal emulator simply ignores escap=
e sequences it doesn&#39;t understand.</div><div>=C2=A0</div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
adding-left:1ex">
<br class=3D"gmail_msg">
&gt; I&#39;ve tried out XTerm, HTerm, and gnome-terminal, and found the<br =
class=3D"gmail_msg">
&gt; following behavior differences:<br class=3D"gmail_msg">
&gt;<br class=3D"gmail_msg">
&gt; - XTerm sends xterm-paste (ESC [ 200~ ... ESC [ 201~) if<br class=3D"g=
mail_msg">
&gt;=C2=A0 =C2=A0xterm-mouse-mode is disabled.=C2=A0 If xterm-mouse-mode is=
 enabled, it<br class=3D"gmail_msg">
&gt;=C2=A0 =C2=A0sends down-mouse-2 + up-mouse-2 using SGR coordinates (ESC=
 [&lt;1;x;yM<br class=3D"gmail_msg">
&gt;=C2=A0 =C2=A0ESC [&lt;1;x;ym), which gets translated to mouse-yank-prim=
ary.<br class=3D"gmail_msg">
&gt;<br class=3D"gmail_msg">
&gt; - Gnome Terminal sends xterm-paste if xterm-mouse-mode is disabled.=C2=
=A0 If<br class=3D"gmail_msg">
&gt;=C2=A0 =C2=A0xterm-mouse-mode is enabled, it only sends down-mouse-2 us=
ing SGR<br class=3D"gmail_msg">
&gt;=C2=A0 =C2=A0coordinates, which is ignored by Emacs.<br class=3D"gmail_=
msg">
&gt;<br class=3D"gmail_msg">
&gt; - HTerm doesn&#39;t use bracketed paste mode if xterm-mouse-mode is di=
sabled<br class=3D"gmail_msg">
&gt;=C2=A0 =C2=A0(i.e. pasted text gets inserted using individual<br class=
=3D"gmail_msg">
&gt;=C2=A0 =C2=A0self-insert-commands).=C2=A0 If xterm-mouse-mode is enable=
d, it uses both<br class=3D"gmail_msg">
&gt;=C2=A0 =C2=A0(!) down-mouse-2 + down-mouse-up (using basic coordinates)=
 and then a<br class=3D"gmail_msg">
&gt;=C2=A0 =C2=A0bracketed paste.<br class=3D"gmail_msg">
&gt;<br class=3D"gmail_msg">
&gt; The HTerm and Gnome-Terminal behaviors are probably bugs, and I&#39;ll=
 try<br class=3D"gmail_msg">
&gt; to get them fixed.=C2=A0 However, maybe we want to work around these i=
ssues<br class=3D"gmail_msg">
&gt; on the Emacs side, e.g. by not requiring an up-mouse-2 if<br class=3D"=
gmail_msg">
&gt; xterm-mouse-mode is enabled.<br class=3D"gmail_msg">
<br class=3D"gmail_msg">
I could go either way on this one... Emacs maybe ought not to be so<br clas=
s=3D"gmail_msg">
choosy about what it gets from a control character standpoint, but how<br c=
lass=3D"gmail_msg">
relatively difficuly would it be to fix the emulators to do both up and<br =
class=3D"gmail_msg">
down? That way both flavors of program are satisfied: the ones looking<br c=
lass=3D"gmail_msg">
for down-only get their event, and those looking for both get both.<br clas=
s=3D"gmail_msg">
<br class=3D"gmail_msg"></blockquote><div><br></div><div>Fixing gnome-termi=
nal would be preferred, yes, but old (unfixed) versions tend to stick aroun=
d for years.</div><div>With HTerm it&#39;s a bit different: arguably HTerm&=
#39;s behavior is better than XTerm&#39;s, because with XTerm you can&#39;t=
 paste any more once you enable extended mouse mode.=C2=A0</div></div></div=
>

--047d7ba97a1063bfeb053c7d40b2--





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.