From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Angelo Graziosi Newsgroups: gmane.emacs.bugs Subject: bug#6774: Cut and paste with C-w/mouse-2 not working? Date: Mon, 02 Aug 2010 15:33:46 +0200 Message-ID: <4C56C93A.8010608@alice.it> References: <4C55EF50.3080100@alice.it> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1280756289 21960 80.91.229.12 (2 Aug 2010 13:38:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Aug 2010 13:38:09 +0000 (UTC) To: bug-gnu-emacs Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 02 15:38:08 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OfvDT-0004QE-O6 for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 15:38:08 +0200 Original-Received: from localhost ([127.0.0.1]:56409 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfvDT-0007gY-3b for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 09:38:07 -0400 Original-Received: from [140.186.70.92] (port=55210 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfvDM-0007fQ-Vs for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 09:38:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OfvDL-00063a-Nx for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 09:38:00 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39902) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfvDL-00063W-Kw for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 09:37:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Ofv9W-0005Ab-CO; Mon, 02 Aug 2010 09:34:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <4C55EF50.3080100@alice.it> Resent-From: Angelo Graziosi Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Aug 2010 13:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.128075602119867 (code B ref -1); Mon, 02 Aug 2010 13:34:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Aug 2010 13:33:41 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofv9A-0005AO-OC for submit@debbugs.gnu.org; Mon, 02 Aug 2010 09:33:41 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofv98-0005AJ-Ed for submit@debbugs.gnu.org; Mon, 02 Aug 2010 09:33:39 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:48949) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ofv9V-0000FH-SM for submit@debbugs.gnu.org; Mon, 02 Aug 2010 09:34:01 -0400 Original-Received: from [140.186.70.92] (port=55323 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ofv9U-0006tu-9r for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 09:34:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ofv9T-0005NO-45 for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 09:34:00 -0400 Original-Received: from smtp205.alice.it ([82.57.200.101]:38416) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofv9S-0005NB-R7 for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 09:33:59 -0400 Original-Received: from [82.57.152.29] (82.57.152.29) by smtp205.alice.it (8.5.124.08) id 4C1A264502E31D76 for bug-gnu-emacs@gnu.org; Mon, 2 Aug 2010 15:33:56 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 X-detected-operating-system: by eggs.gnu.org: Windows 98 (1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 02 Aug 2010 09:34:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39147 Archived-At: 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.