GNU bug report logs - #6774
Cut and paste with C-w/mouse-2 not working?

Previous Next

Package: emacs;

Reported by: Angelo Graziosi <angelo.graziosi <at> alice.it>

Date: Sun, 1 Aug 2010 22:04:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: David De La Harpe Golden <david <at> harpegolden.net>
To: Angelo Graziosi <angelo.graziosi <at> alice.it>
Cc: 6774 <at> debbugs.gnu.org, Chong Yidong <cyd <at> stupidchicken.com>
Subject: bug#6774: Cut and paste with C-w/mouse-2 not working?
Date: Mon, 02 Aug 2010 05:12:17 +0100
On 01/08/10 23:04, Angelo Graziosi wrote:
> It seems that with recent trunk sources (also with the last,
> rev.100958), cutting with C-w and then pasting with mouse-2 does not
> work. To reproduce:
>
> 1. emacs -Q &
>
> 2. In the 'scratch' buffer double click on some text, 'buffer', for
> example.
>
> 3. Now cut it: C-w
>
> 4. Go to the bottom of the buffer and paste with mouse-2: empty!
>
> I can paste only with C-y. If at step 3. I use M-w (Copy), then pasting
> with mouse-2 works.
>

Yes, there's a problem here - I guess emacs is keeping primary bound to 
a span that's become zero-length. Again.

N.B. your case ideally would work in emacs much like in KDE - but emacs 
still has teething problems and sometimes manages to make primary a 
zero-length string.[this is already "fixed" in the horrible selx branch]

> For example, on Kubuntu, one can cut with C-x and the paste with mouse-2
> (Konqueror, Kate,...)

Not exactly - not quite what's really going on. There's a spec for how 
this is supposed to work, and KDE follows it.*

When you have _selected_ the text in KDE before hitting C-x, it is made 
available as the  "primary" x11 selection (referred to as "the 
selection" in klipper*)

C-x makes the text available as the CLIPBOARD x11 selection while 
removing it from the body of the document. (and it's still available on 
PRIMARY too, where emacs fails).

mouse-2 inserts what's in PRIMARY in KDE.

So in KDE, try selecting more/different text, _without_ hitting C-x or 
C-c.  This will change only PRIMARY.

Hitting mouse-2 again will insert the _new_ PRIMARY.

Then hitting C-v will insert the old CLIPBOARD.  To update the clipboard 
you always have to C-x or C-c.

(* though the situation is further complicated by klipper, the KDE 
clipboard daemon, which can be configured to do various strange things 
in this area, I mean KDE's out-of-box defaults).







This bug report was last modified 14 years and 342 days ago.

Previous Next


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