GNU bug report logs -
#6774
Cut and paste with C-w/mouse-2 not working?
Previous Next
Full log
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
Il 02/08/2010 6.12, David De La Harpe Golden ha scritto:
> 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).
I do not doubt that, internally, things are different. Anyway, from the
'End User' point of view,
C-w/mouse-2 (in Emacs)
should behave in the same way of
C-X/mouse-2 (in other X applications like Konqueror, Kate etc.)
BTW, if I add the step:
1.1 I choose: Options | C-x/.../C-v Cut and Paste (CUA)
then C-x/mouse-2, in Emacs still does not work!
So, at the moment, Emacs, in this regard (Copy/Paste), from the 'End
User' point of view, behaves differently from other X applications.
Ciao,
Angelo.
This bug report was last modified 14 years and 344 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.