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: Mon, 02 Aug 2010 16:59:06 -0400 Message-ID: <87wrs8ohnp.fsf@stupidchicken.com> References: <4C55EF50.3080100@alice.it> <4C5645A1.7000500@harpegolden.net> <87y6coby49.fsf@stupidchicken.com> <4C572AE6.7070104@harpegolden.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280783302 7035 80.91.229.12 (2 Aug 2010 21:08:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Aug 2010 21:08:22 +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 Mon Aug 02 23:08:19 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 1Og2F8-0006Uk-KE for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 23:08:18 +0200 Original-Received: from localhost ([127.0.0.1]:43407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Og2F7-0003P9-Nz for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 17:08:17 -0400 Original-Received: from [140.186.70.92] (port=59772 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Og2Ev-0003Na-6e for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 17:08:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Og2Es-00084P-UV for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 17:08:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45438) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og2Es-00084K-Rw for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 17:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Og26A-0001qt-0t; Mon, 02 Aug 2010 16:59: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: Mon, 02 Aug 2010 20:59:01 +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.12807827267110 (code B ref 6774); Mon, 02 Aug 2010 20:59:01 +0000 Original-Received: (at 6774) by debbugs.gnu.org; 2 Aug 2010 20:58:46 +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 1Og25t-0001qd-Ua for submit@debbugs.gnu.org; Mon, 02 Aug 2010 16:58:46 -0400 Original-Received: from pantheon-po45.its.yale.edu ([130.132.50.79]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og25r-0001qW-Oh for 6774@debbugs.gnu.org; Mon, 02 Aug 2010 16:58:44 -0400 Original-Received: from furry (dhcp128036014221.central.yale.edu [128.36.14.221]) (authenticated bits=0) by pantheon-po45.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o72Kx6dk010095 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 2 Aug 2010 16:59:06 -0400 Original-Received: by furry (Postfix, from userid 1000) id 3CFE1C013; Mon, 2 Aug 2010 16:59:06 -0400 (EDT) In-Reply-To: <4C572AE6.7070104@harpegolden.net> (David De La Harpe Golden's message of "Mon, 02 Aug 2010 21:30:30 +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: Mon, 02 Aug 2010 16:59: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:39176 Archived-At: David De La Harpe Golden writes: > Does your way work properly in a multi-window context on its own, > though? I suspect not -that it will deactivate-mark on "boring" > restored active regions (see below) and set the selection to the > "boring" region, confounding user expectations, because the restored > region could be non-empty. > > The thing is, if you use focus-follows-mouse between frames, or mouse > autoselect-window between emacs windows, you select_window without > going through "normal channels", so trying to do _anything_ smart in > deactivate-mark tends to break - e.g. the mark is being deactivated in > a window different to the last window bound to the selection. The selx > branch just forces the selection to a string if it's lazy-bound to a > window and emacs still owns it on deactivate mark. You're right, the window-switching code needs to be able to change the X selection buffer if switching into a window where there is an active region. But with this change, is there any case that my proposal---i.e. saving a copy before before-change-functions, for deactivate-mark to refer to if the region ends up empty---would not handle? Assuming that the current buffer and the active region can only change as a result of a user command or window switching, those are the only cases that we have to cover.