From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#29357: Cut and paste problems on Linux on a text virtual console no longer works Date: Fri, 14 Aug 2020 16:16:57 -0700 Message-ID: References: <20171119160935.GA4532@moocow> <20200814195252.GA2819@moocow> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36996"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 29357@debbugs.gnu.org To: "Dr. Michael L. Dowling" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 15 01:18:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6ixe-0009Vf-J1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Aug 2020 01:18:10 +0200 Original-Received: from localhost ([::1]:59900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6ixd-0003Vq-7V for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Aug 2020 19:18:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6ixW-0003VV-4y for bug-gnu-emacs@gnu.org; Fri, 14 Aug 2020 19:18:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k6ixV-0002j1-Rp for bug-gnu-emacs@gnu.org; Fri, 14 Aug 2020 19:18:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k6ixV-0006Ld-NA for bug-gnu-emacs@gnu.org; Fri, 14 Aug 2020 19:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Aug 2020 23:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29357 X-GNU-PR-Package: emacs Original-Received: via spool by 29357-submit@debbugs.gnu.org id=B29357.159744702624338 (code B ref 29357); Fri, 14 Aug 2020 23:18:01 +0000 Original-Received: (at 29357) by debbugs.gnu.org; 14 Aug 2020 23:17:06 +0000 Original-Received: from localhost ([127.0.0.1]:54068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6iwb-0006KU-Ls for submit@debbugs.gnu.org; Fri, 14 Aug 2020 19:17:05 -0400 Original-Received: from mail-yb1-f180.google.com ([209.85.219.180]:39900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6iwZ-0006Jw-Be for 29357@debbugs.gnu.org; Fri, 14 Aug 2020 19:17:04 -0400 Original-Received: by mail-yb1-f180.google.com with SMTP id q16so6039901ybk.6 for <29357@debbugs.gnu.org>; Fri, 14 Aug 2020 16:17:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=nk212Qi7UcvMWa7ZK+Bq+dLw8paSR10a2V1IlzYpFPE=; b=U62U8suTEE7oKYUjBRuDMBlSyH0x7nQNtz0oTRXxWkpbtMcsLpfOlRZ4JpGx+LpusC mGEENSeGa94QlLzjAru/h7sgtKSenqawD6s3inrgRDmglVaAX3iBwJJoKzwX9D7rzZYu lFp29Y6Q7D65Bl/te45XdnEuvrnwAnRDrFy0n4F2vlKGkXCDK+NOi5fm2QrT10hGtJ1l 9TUufLwH38QF8CjOj7TCp8UUkowwx6zm+7TVVc8m0ZGrDPe6H0HdAGmFkDNS2w1IV+4J v0rg3xwH83RwKPRnnX0alzwyZrPtM6jTzvCuLYqak+3+46FvYMBb71z5oMbaHLZcxxBK 57PA== X-Gm-Message-State: AOAM530JsbGxhv6n8Ty/qrLecVXgloQu2B0o3tux+bmAE8/27qxmTUvn HuO0uavA6q8vBGHwjmHchEL9qF3tlOwE4LooK5o= X-Google-Smtp-Source: ABdhPJxBvisQRBrrmiwMsyJaBvsVr0zWteXNayrzYm3afqWISpyb6HT/KZgMBOXnQPFGuLmtKd63EqboDsYdfD0/ejA= X-Received: by 2002:a25:4609:: with SMTP id t9mr6774254yba.231.1597447017877; Fri, 14 Aug 2020 16:16:57 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 14 Aug 2020 16:16:57 -0700 In-Reply-To: <20200814195252.GA2819@moocow> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:185182 Archived-At: [Please use "Reply to all" so the discussion is in the bug tracker.] Hi Michael, Thanks for replying back with details. I'm hoping that the information you have provided will help someone who knows more about this stuff investigate this. Best regards, Stefan Kangas "Dr. Michael L. Dowling" writes: > Hello Stefan! > > Thanks for replying. This is an old bug report but is nevertheless > still valid. > > On Mon, Aug 10, 2020 at 09:14:36AM -0700, Stefan Kangas wrote: >> "Dr. Michael L. Dowling" writes: > >> > The Report: >> > >> > If I use X-windows, there is no problem with cutting and pasting from >> > outside an emacs buffer into an emacs buffer and vice versa. But this >> > no longer works when in a text console. When on a Linux virtual >> > console, pasting into an emacs buffer results in the message: >> > >> > "No selection available" > > This continues to be the case to this day. > >> > Conversely, marking text in an emacs buffer and pasting into a virtual >> > console yields no error, but it does not paste. > > This has apparently been fixed. It now works. > > Of course, cut-and-paste never worked when it's from an xterm to a > virtual console, and vice versa, and I have never expected it to. > >> How do you cut and paste in the Linux virtual console? Are you using >> gpm? > > Yes, I use gpm. > >> Could you please provide a recipe for reproducing this? > > Simple! > > /usr/lib/systemd/system$grep gpm * > gpm.service:ExecStart=/usr/bin/gpm -m /dev/input/mice -t imps2 > > However I mark that text, for example, with a depressed left mouse > button on the '/' of '/usr', and dragging the mouse to '2' of 'imps2', > and then releasing the left button, with a right button click in this > text as I write, I get that error. The same goes for any other means of > cutting and pasting, for example, simply double clicking on a word, and > pasting with a single right button click, the same error. > > (I copied this text using emacs; start a shell process in emacs, and cut > and paste using emacs, works. This doesn't use the mouse, though, > namely with the set-mark-command (C-SPC) and append-next-kill (M-C-w).) > >> > >> > My tests were as follows: >> > >> > 1. Try emacs -q -- still does not work. >> > 2. Set up a new user with no special environment, just out of the box. No .emacs file, and >> > no bash init files. Same behaviour. >> > 3. Now the strange bit: login using my normal userid "mike" and change user to the newly >> > created user "joe", and cut and paste works for joe. ("su - joe" was used for that.) >> > 4. Logout, and log back in again as joe (no su -; joe logs in from the >> > text terminal), cut and paste no longer works for joe, But change user user >> > using "su - mike", and it works for mike! > > I had forgotten about this. So I made some more tests. > > Login from a virtual console as "joe", and cut-and-paste does not work. > (Joe has a completely empty home directory; no .bash* except a > .bash_logout that deletes everything except .bash_logout) > > Login as "mike" and "su - joe" and it does work. > > Login as "mike" and "su - mike" and it doesn't work. > > Login as "joe" and "su - mike", and cut-and-paste works!!! > > Give "joe" with ksh as login shell and login as "joe", cut-and-paste > doesn't work. > > It doesn't work for root either when root logs in as root on a virtual > console. > > Weird! > > BTW, this computer is not one year old and has a completely new ARCH > installation. > >> > 5. Is it a shell problem? Change shell to zsh, same behaviour. >> > 6. Login as mike or joe, and call the bash again. Now I'm not in a login shell, but same >> > behaviour, no cut and paste. >> > >> > I cannot say for sure that this is an emacs problem. It could be a Linux problem, or an Arch >> > Linux problem. It might even be a shell problem, although with the above tests that seem >> > unlikely. >> >> Are you seeing this outside of Emacs? > > No! Cut-and-paste works fine everywhere else, within and between > virtual consoles, from virtual consoles to postgresql (psql), to python, > etc, etc. The (frustrating) odd man out is emacs. > > As I recall, at the time cut-and-paste ceased to work for emacs, there > had been a major upgrade of emacs. > > There is something about that initial login that affects that > cut-and-paste. > > My Linux boots to text-mode virtual consoles. I manually start X using > startx. This might be one reason why cut-and-paste works in X, just as > it works when first logging in as another and changing user works. > > Cheers, > > Mike