Debian Bug report logs - #901249
xterm: translation overrides for copy/paste do not work as documented

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: Thorsten Glaser <[email protected]>

Date: Sun, 10 Jun 2018 15:21:01 UTC

Severity: normal

Tags: fixed-upstream

Found in version xterm/333-1

Fixed in version xterm/338-1

Done: Sven Joachim <[email protected]>

Bug is archived. No further changes may be made.

Full log


đź”— View this message in rfc822 format

X-Loop: [email protected]
Subject: Bug#901249: xterm: translation overrides for copy/paste do not work as documented
Reply-To: Thorsten Glaser <[email protected]>, [email protected]
Resent-From: Thorsten Glaser <[email protected]>
Resent-To: [email protected]
Resent-CC: Debian X Strike Force <[email protected]>
X-Loop: [email protected]
Resent-Date: Sun, 10 Jun 2018 15:21:01 +0000
Resent-Message-ID: <[email protected]>
Resent-Sender: [email protected]
X-Debian-PR-Message: report 901249
X-Debian-PR-Package: xterm
X-Debian-PR-Keywords: 
X-Debian-PR-Source: xfree86, xorg-x11, xterm
Received: via spool by [email protected] id=B.1528643980572
          (code B); Sun, 10 Jun 2018 15:21:01 +0000
Received: (at submit) by bugs.debian.org; 10 Jun 2018 15:19:40 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.1-bugs.debian.org_2005_01_02
	(2015-04-28) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-21.8 required=4.0 tests=BAYES_00,FOURLA,HAS_PACKAGE,
	RCVD_IN_DNSWL_NONE,TXREP,XMAILER_REPORTBUG autolearn=ham autolearn_force=no
	version=3.4.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 37; hammy, 150; neutral, 180; spammy,
	0. spammytokens: hammytokens:0.000-+--H*M:reportbug, 0.000-+--H*MI:reportbug,
	0.000-+--H*x:reportbug, 0.000-+--H*UA:reportbug, 0.000-+--cutf8
Received: from lixid.tarent.de ([193.107.123.118] helo=mail.lixid.net)
	by buxtehude.debian.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.89)
	(envelope-from <[email protected]>)
	id 1fS284-00008Y-Gb
	for [email protected]; Sun, 10 Jun 2018 15:19:40 +0000
Received: from localhost (localhost [127.0.0.1])
	by mail.lixid.net (MTA) with ESMTP id 3253C14814B;
	Sun, 10 Jun 2018 17:19:36 +0200 (CEST)
Received: from mail.lixid.net ([127.0.0.1])
	by localhost (mail.lixid.net [127.0.0.1]) (MFA, port 10024) with LMTP
	id Yo1mfeoEgn7q; Sun, 10 Jun 2018 17:19:36 +0200 (CEST)
Received: from tglase-nb.lan.tarent.de (vpn-172-28-0-27.dynamic.tarent.de [172.28.0.27])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mail.lixid.net (MTA) with ESMTPS id E18D6147C17;
	Sun, 10 Jun 2018 17:19:35 +0200 (CEST)
Received: by tglase-nb.lan.tarent.de (Postfix, from userid 1000)
	id 75EE5520AD4; Sun, 10 Jun 2018 17:19:34 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
From: Thorsten Glaser <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Message-ID: <152864397442.30678.7096771931932412237.reportbug@tglase-nb.lan.tarent.de>
X-Mailer: reportbug 7.1.10
Date: Sun, 10 Jun 2018 17:19:34 +0200
Delivered-To: [email protected]
X-CrossAssassin-Score: 2
Package: xterm
Version: 333-1
Severity: normal

I was working on my .Xresources and found this quite crazy.
I could not select PRIMARY and CLIPBOARD independent of each
other. To reproduce, I chose to have *only* the lines from
the manual page…

           *VT100*translations:    #override \n\
              ~Shift~Ctrl<Btn2Up>: insert-selection(PRIMARY, CUT_BUFFER0) \n\
               Shift~Ctrl<Btn2Up>: insert-selection(CLIPBOARD, CUT_BUFFER1) \n\
              ~Shift     <BtnUp> : select-end(PRIMARY, CUT_BUFFER0) \n\
               Shift     <BtnUp> : select-end(CLIPBOARD, CUT_BUFFER1)

… loaded with “xrdb -merge filename”, with no .Xresources
at all, then I started two xterms, in one I selected, in
another, I ran xsel commands to discern what is the content
of PRIMARY and CLIPBOARD, respectively.

tglase@tglase-nb:~ $ echo "P<$(xsel -p -o)> C<$(xsel -b -o)>"
P<> C<>
tglase@tglase-nb:~ $ echo "P<$(xsel -p -o)> C<$(xsel -b -o)>"
P<foo> C<>
tglase@tglase-nb:~ $ echo "P<$(xsel -p -o)> C<$(xsel -b -o)>"
P<bar> C<bar>
tglase@tglase-nb:~ $ echo "P<$(xsel -p -o)> C<$(xsel -b -o)>"
P<foo> C<foo>

After the first command I selected “foo” without Shift.
⇒ as expected, PRIMARY gets assigned “foo”, CLIPBOARD is left alone
After the second command I selected “bar” with Shift.
⇒ unexpectedly, PRIMARY *also* gets “bar” in addition to CLIPBOARD
After the third line, I selected “foo” without Shift again.
⇒ unexpectedly, CLIPBOARD *also* gets “foo” in addition to PRIMARY


For comparison, here’s the same sequence of things on MirBSD,
with xterm 200 on XFree86:

tg@blau:~ $ echo "P<$(xsel -p -o)> C<$(xsel -b -o)>"
P<> C<>
tg@blau:~ $ echo "P<$(xsel -p -o)> C<$(xsel -b -o)>"
P<foo> C<>
tg@blau:~ $ echo "P<$(xsel -p -o)> C<$(xsel -b -o)>"
P<bar> C<bar>
tg@blau:~ $ echo "P<$(xsel -p -o)> C<$(xsel -b -o)>"
P<foo> C<>

For that, I used this in .Xresources though:

*VT100*translations: #override \n\
	 Shift~Ctrl<KeyPress>Insert:insert-selection(PRIMARY, CUT_BUFFER0) \n\
	 Shift Ctrl<KeyPress>Insert:insert-selection(CLIPBOARD, CUT_BUFFER1) \n\
	~Shift~Ctrl<Btn2Up>:insert-selection(PRIMARY, CUT_BUFFER0) \n\
	 Shift~Ctrl<Btn2Up>:insert-selection(CLIPBOARD, CUT_BUFFER1) \n\
	~Shift<BtnUp>:select-end(PRIMARY, CUT_BUFFER0) \n\
	 Shift<BtnUp>:select-end(CLIPBOARD, CUT_BUFFER1)

(Actually, do I need a trailing \n or \n\ after the last line?)

Here, selecting “foo” without Shift again *clears* CLIPBOARD
instead of assigning to it. Still buggy.


I was considering not using cut buffers in xterm 333 on X.org:

*VT100*translations: #override \n\
	 Shift~Ctrl<KeyPress>Insert:insert-selection(PRIMARY) \n\
	 Shift Ctrl<KeyPress>Insert:insert-selection(CLIPBOARD) \n\
	~Shift~Ctrl<Btn2Up>:insert-selection(PRIMARY) \n\
	 Shift~Ctrl<Btn2Up>:insert-selection(CLIPBOARD) \n\
	~Shift<BtnUp>:select-end(PRIMARY) \n\
	 Shift<BtnUp>:select-end(CLIPBOARD) \n\

Anyway, from the above tests I concur that this never worked
as documented and still does not work as documented.


-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.16.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/lksh
Init: sysvinit (via /sbin/init)

Versions of packages xterm depends on:
ii  libc6           2.27-3
ii  libfontconfig1  2.13.0-5
ii  libfreetype6    2.8.1-2
ii  libice6         2:1.0.9-2
ii  libtinfo6       6.1+20180210-3
ii  libutempter0    1.1.6-3
ii  libx11-6        2:1.6.5-1
ii  libxaw7         2:1.0.13-1+b2
ii  libxft2         2.3.2-2
ii  libxinerama1    2:1.1.3-1+b3
ii  libxmu6         2:1.1.2-2
ii  libxpm4         1:3.5.12-1
ii  libxt6          1:1.1.5-1
ii  xbitmaps        1.1.1-2

Versions of packages xterm recommends:
ii  x11-utils  7.7+4

Versions of packages xterm suggests:
pn  xfonts-cyrillic  <none>

-- no debconf information

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Thu Nov 14 19:05:59 2024; Machine Name: bembo

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.