Debian Bug report logs - #913237
xterm: exec-formatted sends an ending bracketed-paste sequence to the application (when enabled)

version graph

Package: xterm; Maintainer for xterm is Debian X Strike Force <[email protected]>; Source for xterm is src:xterm (PTS, buildd, popcon).

Reported by: Vincent Lefevre <[email protected]>

Date: Thu, 8 Nov 2018 15:54:01 UTC

Severity: normal

Tags: patch, upstream

Found in version xterm/337-1

Fixed in version xterm/338-1

Done: Sven Joachim <[email protected]>

Bug is archived. No further changes may be made.

Full log


Message #83 received at [email protected] (full text, mbox, reply):

Received: (at 913237) by bugs.debian.org; 5 Dec 2018 12:33:46 +0000
From [email protected] Wed Dec 05 12:33:46 2018
X-Spam-Checker-Version: SpamAssassin 3.4.2-bugs.debian.org_2005_01_02
	(2018-09-13) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-15.5 required=4.0 tests=BAYES_00,FOURLA,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_NONE,TXREP autolearn=ham
	autolearn_force=no version=3.4.2-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 21; hammy, 150; neutral, 112; spammy,
	0. spammytokens: hammytokens:0.000-+--H*F:D*vinc17.net,
	0.000-+--H*rp:D*vinc17.net, 0.000-+--HX-Mailer-Info:mutt,
	0.000-+--HX-Mailer-Info:www.vinc17.net, 0.000-+--D*vinc17.net
Return-path: <[email protected]>
Received: from cventin.lip.ens-lyon.fr ([140.77.13.17])
	by buxtehude.debian.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.89)
	(envelope-from <[email protected]>)
	id 1gUWN7-0001xr-R5
	for [email protected]; Wed, 05 Dec 2018 12:33:46 +0000
Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.91)
	(envelope-from <[email protected]>)
	id 1gUWN3-00071P-DM; Wed, 05 Dec 2018 13:33:41 +0100
Date: Wed, 5 Dec 2018 13:33:41 +0100
From: Vincent Lefevre <[email protected]>
To: [email protected], [email protected]
Subject: Re: Bug#913237: xterm: exec-formatted yields a tilde character in
 zsh and emacs
Message-ID: <[email protected]>
References: <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <[email protected]>
X-Mailer-Info: https://www.vinc17.net/mutt/
User-Agent: Mutt/1.11.1+18 (c775d044) vl-112917 (2018-12-03)
On 2018-12-05 11:30:03 +0100, Vincent Lefevre wrote:
> On 2018-12-05 05:03:46 -0500, Thomas Dickey wrote:
> > On Wed, Dec 05, 2018 at 10:13:35AM +0100, Vincent Lefevre wrote:
> > > According to strace, it is xterm:
> > 
> > sure: xterm replies to the application for bracketed paste.
> 
> You mean that it is zsh that does the paste?
> 
> Why isn't there any system call from zsh in the strace output
> (between the Ctrl-Meta-Click and the exec-formatted), then?

[Another test on a different machine...]

If I type 'b' in xterm, the strace shows:

26473 13:22:10.942153 write(4, "b", 1)  = 1
[...]
26473 13:22:10.961746 read(4, "b", 4096) = 1

So, it seems that the "write(4, ...)" corresponds to what xterm sends
to the application (here, zsh), and the "read(4, ...)" corresponds to
what zsh outputs (which is received by xterm): Since I've typed "b" in
xterm, xterm sends "b" to zsh, which handles it by inserting it in its
command line buffer and displaying it.

So, concerning the

26473 13:22:16.545126 write(4, "\33[201~", 6 <unfinished ...>

generated by Meta-Click with

  Meta<Btn1Down>: exec-formatted("/bin/true", PRIMARY)

in the VT100 translations, this is what xterm sends to zsh. So, it is
xterm that is the cause, not zsh.

Note also that for a bracketed paste,

  https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Bracketed-Paste-Mode

says:

  When bracketed paste mode is set, the program will receive:
     ESC [ 2 0 0 ~ ,
  followed by the pasted text, followed by
     ESC [ 2 0 1 ~ .

but here, only "\33[201~" is present in the strace output:

cventin:~> grep '\\33\[20' str.out
26473 13:22:16.545126 write(4, "\33[201~", 6 <unfinished ...>

Thus is cannot correspond to a bracketed paste.

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Fri Nov 15 00:15:42 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.