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: Fri, 06 Aug 2010 21:17:53 +0100 Message-ID: <4C5C6DF1.1030903@harpegolden.net> 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=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1281127113 24864 80.91.229.12 (6 Aug 2010 20:38:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 Aug 2010 20:38:33 +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 22:38:31 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 1OhTgU-0004zr-Cv for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Aug 2010 22:38:30 +0200 Original-Received: from localhost ([127.0.0.1]:34084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OhTgT-0008Vy-Mr for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Aug 2010 16:38:29 -0400 Original-Received: from [140.186.70.92] (port=47226 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OhTgH-0008Tc-9g for bug-gnu-emacs@gnu.org; Fri, 06 Aug 2010 16:38:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OhTgF-0000Ev-Qv for bug-gnu-emacs@gnu.org; Fri, 06 Aug 2010 16:38:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42072) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhTgF-0000Er-PT for bug-gnu-emacs@gnu.org; Fri, 06 Aug 2010 16:38:15 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OhTMg-0008MJ-LQ; Fri, 06 Aug 2010 16:18: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: Fri, 06 Aug 2010 20:18: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.128112584432106 (code B ref 6774); Fri, 06 Aug 2010 20:18:02 +0000 Original-Received: (at 6774) by debbugs.gnu.org; 6 Aug 2010 20:17:24 +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 1OhTM4-0008Ln-AN for submit@debbugs.gnu.org; Fri, 06 Aug 2010 16:17:24 -0400 Original-Received: from harpegolden.net ([65.99.215.13]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhTM2-0008Li-3y for 6774@debbugs.gnu.org; Fri, 06 Aug 2010 16:17:22 -0400 Original-Received: from [87.198.55.108] (87-198-55-108.ptr.magnet.ie [87.198.55.108]) (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 74E8A683A2; Fri, 6 Aug 2010 21:17:52 +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: <83iq3ovwv0.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 06 Aug 2010 16:18: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:39292 Archived-At: On 06/08/10 11:50, Eli Zaretskii wrote: >> From: Stefan Monnier >> Cc: David De La Harpe Golden, cyd@stupidchicken.com, 6774@debbugs.gnu.org, angelo.graziosi@alice.it >> Date: Fri, 06 Aug 2010 11:13:50 +0200 >> >>> 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. I was talking about a second level of intra-emacs laziness that exists in the present select-active-regions implementation, not inter-application stuff. See, on X11 you can x-set-selection the _emacs-level_ selection (stored internally on selection_alist) to a non-string value that merely references a buffer, so that when/if another application requests the selection, it is looked up all the way back to a buffer (or cons of markers). The current select-active-regions implementation works that way, and thereby avoids an emacs-internal string copy sometimes (in cases like C-w/M-w that internal copy happens anyway). My proposal was to consider that a premature optimization, go back to basics, then re-optimise by reintroducing some emacs-internal laziness in a more controlled fashion.