From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#6774: Cut and paste with C-w/mouse-2 not working? Date: Wed, 04 Aug 2010 22:20:39 -0400 Message-ID: <8762zphkaw.fsf@stupidchicken.com> 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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280975924 3262 80.91.229.12 (5 Aug 2010 02:38:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 Aug 2010 02:38:44 +0000 (UTC) Cc: 6774@debbugs.gnu.org, Angelo Graziosi To: David De La Harpe Golden Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 05 04:38:40 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 1OgqLg-0004dd-UE for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Aug 2010 04:38:34 +0200 Original-Received: from localhost ([127.0.0.1]:37273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgqLZ-0006so-Ff for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Aug 2010 22:38:17 -0400 Original-Received: from [140.186.70.92] (port=45489 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgqLT-0006sg-C5 for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2010 22:38:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OgqLR-0002lw-09 for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2010 22:38:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43035) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgqLQ-0002ls-TR for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2010 22:38:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Ogq4s-0005Vd-2I; Wed, 04 Aug 2010 22:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Aug 2010 02:21: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.128097481321165 (code B ref 6774); Thu, 05 Aug 2010 02:21:02 +0000 Original-Received: (at 6774) by debbugs.gnu.org; 5 Aug 2010 02:20:13 +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 1Ogq45-0005VK-D8 for submit@debbugs.gnu.org; Wed, 04 Aug 2010 22:20:13 -0400 Original-Received: from pantheon-po41.its.yale.edu ([130.132.50.98]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ogq43-0005VF-I0 for 6774@debbugs.gnu.org; Wed, 04 Aug 2010 22:20:11 -0400 Original-Received: from furry (dhcp128036014221.central.yale.edu [128.36.14.221]) (authenticated bits=0) by pantheon-po41.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o752KdwB006226 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 4 Aug 2010 22:20:39 -0400 Original-Received: by furry (Postfix, from userid 1000) id CA82CC013; Wed, 4 Aug 2010 22:20:39 -0400 (EDT) In-Reply-To: <4C573A2A.3030007@harpegolden.net> (David De La Harpe Golden's message of "Mon, 02 Aug 2010 22:35:38 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 04 Aug 2010 22:21: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:39257 Archived-At: David De La Harpe Golden writes: > The problem is that we may really want the selection bound to > something _non-current_, if we don't want it to instantly reflect a > restored boring active region as per above. And there's the > two-windows-onto-the-same buffer case to consider It would be nice to leave boring selections alone, but it doesn't seem worth it if a lot of new infrastructure has to be added to handle this. If this problem can't be solved simply, I would prefer to tweak the behavior of select-active-regions instead. Here's an idea: When the mark is set for a temporarily active region---a region created by mouse dragging or shift selection---we keep the current behavior; i.e. (x-set-selection 'PRIMARY (current-buffer)). Otherwise, do *not* call x-set-selection when setting the mark. Before any change to the buffer, save a copy of the region if the mark is active, whether or not the region is temporary. In deactivate-mark, whether or not the region is temporary, set the primary selection to the region that we just deactivated, or to the saved copy if that region is empty. The main difference, as you see, is that non-temporary regions made with C-SPC would not affect the primary selection until deactivation (either via buffer change, or commands such as M-w).