From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David De La Harpe Golden Newsgroups: gmane.emacs.bugs Subject: bug#6774: Cut and paste with C-w/mouse-2 not working? Date: Mon, 02 Aug 2010 05:12:17 +0100 Message-ID: <4C5645A1.7000500@harpegolden.net> 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 1280723892 16838 80.91.229.12 (2 Aug 2010 04:38:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Aug 2010 04:38:12 +0000 (UTC) Cc: 6774@debbugs.gnu.org, Chong Yidong To: Angelo Graziosi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 02 06:38:09 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 1Ofmmu-00032G-73 for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 06:38:08 +0200 Original-Received: from localhost ([127.0.0.1]:51535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ofmmt-0007rr-BP for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 00:38:07 -0400 Original-Received: from [140.186.70.92] (port=49532 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ofmmm-0007rg-7M for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 00:38:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ofmmk-0002ei-Ku for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 00:38:00 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50952) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofmmk-0002ed-F3 for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 00:37:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OfmNe-0000Gn-1d; Mon, 02 Aug 2010 00:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David De La Harpe Golden 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 04:12: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 6774-submit@debbugs.gnu.org id=B6774.12807223191031 (code B ref 6774); Mon, 02 Aug 2010 04:12:02 +0000 Original-Received: (at 6774) by debbugs.gnu.org; 2 Aug 2010 04:11:59 +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 1OfmNb-0000Ga-DX for submit@debbugs.gnu.org; Mon, 02 Aug 2010 00:11:59 -0400 Original-Received: from harpegolden.net ([65.99.215.13]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfmNZ-0000GT-Le for 6774@debbugs.gnu.org; Mon, 02 Aug 2010 00:11:58 -0400 Original-Received: from [87.198.55.208] (87-198-55-208.ptr.magnet.ie [87.198.55.208]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "David De La Harpe Golden", Issuer "David De La Harpe Golden Personal CA rev 3" (verified OK)) by harpegolden.net (Postfix) with ESMTPSA id 5445868474; Mon, 2 Aug 2010 05:12:16 +0100 (IST) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100620 Icedove/3.0.5 In-Reply-To: <4C55EF50.3080100@alice.it> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 02 Aug 2010 00:12: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:39132 Archived-At: 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).