From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#6774: Cut and paste with C-w/mouse-2 not working? Date: Fri, 06 Aug 2010 21:21:31 +0900 Message-ID: References: <4C55EF50.3080100@alice.it> <4C5645A1.7000500@harpegolden.net> <87y6coby49.fsf@stupidchicken.com> <4C572AE6.7070104@harpegolden.net> <87wrs8ohnp.fsf@stupidchicken.com> <4C573A2A.3030007@harpegolden.net> <8762zphkaw.fsf@stupidchicken.com> <4C5B4E28.4090808@harpegolden.net> <83pqxww5ho.fsf@gnu.org> <83iq3ovwv0.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1281098316 17688 80.91.229.12 (6 Aug 2010 12:38:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 Aug 2010 12:38:36 +0000 (UTC) Cc: cyd@stupidchicken.com, 6774@debbugs.gnu.org, angelo.graziosi@alice.it To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 06 14:38:30 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 1OhMBs-0001tY-EB for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Aug 2010 14:38:24 +0200 Original-Received: from localhost ([127.0.0.1]:48486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OhMBr-0002SQ-Ue for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Aug 2010 08:38:23 -0400 Original-Received: from [140.186.70.92] (port=40817 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OhMBm-0002SL-Jr for bug-gnu-emacs@gnu.org; Fri, 06 Aug 2010 08:38:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OhMBh-0001OI-RR for bug-gnu-emacs@gnu.org; Fri, 06 Aug 2010 08:38:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60240) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhMBh-0001OA-Nb for bug-gnu-emacs@gnu.org; Fri, 06 Aug 2010 08:38:13 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OhLw2-0004qJ-7j; Fri, 06 Aug 2010 08:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kenichi Handa Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Aug 2010 12:22: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.128109727218604 (code B ref 6774); Fri, 06 Aug 2010 12:22:02 +0000 Original-Received: (at 6774) by debbugs.gnu.org; 6 Aug 2010 12:21:12 +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 1OhLvE-0004q1-CZ for submit@debbugs.gnu.org; Fri, 06 Aug 2010 08:21:12 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhLvA-0004pm-Lt for 6774@debbugs.gnu.org; Fri, 06 Aug 2010 08:21:10 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id o76CLX2F017806; Fri, 6 Aug 2010 21:21:34 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id o76CLXqc025048; Fri, 6 Aug 2010 21:21:33 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp2.aist.go.jp with ESMTP id o76CLVvK011631; Fri, 6 Aug 2010 21:21:31 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.71) (envelope-from ) id 1OhLvX-0004Oe-RB; Fri, 06 Aug 2010 21:21:31 +0900 In-Reply-To: <83iq3ovwv0.fsf@gnu.org> (message from Eli Zaretskii on Fri, 06 Aug 2010 13:50:11 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 06 Aug 2010 08:22: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:39281 Archived-At: In article <83iq3ovwv0.fsf@gnu.org>, Eli Zaretskii writes: > > > But that would mean setting the selection each time the user does a > > > C-w or M-w or any other action that pushes text on the kill ring, > > > won't it? > > > > Isn't that what Emacs has been doing for the last 10 years? > Not as far as I know. Maybe I was living in some pipe dream, but I > always thought the actual copying happened only when some other > application actually requests the selection. The following is my current understanding about Emacs 23 and the earlier. C-w or M-w leads to call of interprogram-cut-function which is usually bound to x-select-text. On X, it does rather complicated things. At first, it copies the data string to CUT_BUFFER0. Each window of X can have properties and CUT_BUFFER0 is one of them. So, the data is transferred from Emacs to X server, but it's not the inter-client copying. This is a semi-heavy process. Next, if x-select-enable-primary is non-nil (the default is t), Emacs declares to own PRIMARY selection. In this case, the data string is not copied but just saved in the internal list Vselection_alist. This is a light process. The saved data is transferred to another client later when requested. At last, if x-select-enable-clipboard is non-nil (the default is nil), Emacs declares to own CLIPBOARD selection. The treatment of the data string is the same as above, i.e. not copied. But!, if a clipboard client is also running (it seems that is the default on Ubuntu), as soon as Emacs owns CLIPBOARD selection, it requests to get CLIPBOARD selection data from Emacs, and the data is transferred from Emacs to the clipboard client. This is the inter-client copying, and a heavy process. So, Emacs had been doing some kind of copying on each C-w and M-w, but the default setting avoided the heaviest process. --- Kenichi Handa handa@m17n.org