From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Selection changes in revno 100822 Date: Sat, 14 Aug 2010 17:52:22 -0400 Message-ID: <87wrrs276x.fsf@stupidchicken.com> References: <834oeyv3ww.fsf@gnu.org> <87mxsqyp98.fsf@stupidchicken.com> <83zkwptyij.fsf@gnu.org> <4C66660D.3090603@swipnet.se> <83sk2htp82.fsf@gnu.org> <4C66A8C5.4040203@harpegolden.net> <83hbixte8c.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 1281822758 5751 80.91.229.12 (14 Aug 2010 21:52:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 14 Aug 2010 21:52:38 +0000 (UTC) Cc: jan.h.d@swipnet.se, emacs-devel@gnu.org, David De La Harpe Golden To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 14 23:52:35 2010 Return-path: Envelope-to: ged-emacs-devel@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 1OkOeW-00031Y-Qf for ged-emacs-devel@m.gmane.org; Sat, 14 Aug 2010 23:52:33 +0200 Original-Received: from localhost ([127.0.0.1]:57653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OkOeW-0005xz-7M for ged-emacs-devel@m.gmane.org; Sat, 14 Aug 2010 17:52:32 -0400 Original-Received: from [140.186.70.92] (port=39954 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OkOeQ-0005xJ-3I for emacs-devel@gnu.org; Sat, 14 Aug 2010 17:52:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OkOeO-0001IG-QE for emacs-devel@gnu.org; Sat, 14 Aug 2010 17:52:25 -0400 Original-Received: from pantheon-po14.its.yale.edu ([130.132.50.23]:44364) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OkOeO-0001I4-Nj; Sat, 14 Aug 2010 17:52:24 -0400 Original-Received: from furry (173-14-147-246-NewEngland.hfc.comcastbusiness.net [173.14.147.246]) (authenticated bits=0) by pantheon-po14.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o7ELqNfa025204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 14 Aug 2010 17:52:23 -0400 Original-Received: by furry (Postfix, from userid 1000) id EB36116D402; Sat, 14 Aug 2010 17:52:22 -0400 (EDT) In-Reply-To: <83hbixte8c.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 14 Aug 2010 18:18:11 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:128705 Archived-At: Eli Zaretskii writes: > May I suggest to step back and post a clear set of requirements for > when Emacs should and shouldn't put selected text into the primary > selection and into the clipboard? Forget the w32 case for now; let's > just spell out the requirements for X. Here is a summary of the current scheme: 1. Each time the mark is deactivated, the selected text is added to the primary selection. If deactivation occurs as a result of a buffer modification, the text that is added is the text in the region prior to the modification. 2. If the region is temporarily active after a command (e.g. after a mouse drag or shift selection), the selected text is added to the primary selection, even if the mark is not deactivated. 3. If you deactivate the mark with C-g, the selected text is not added to the primary selection. 4. Any kill command sets clipboard in addition to the kill-ring; any yank command inserts the clipboard contents, if possible (x-select-enable-clipboard). 5. mouse-2 yanks primary. The result of this is that shift-selection and mouse drags set primary, similar to other X applications. Also, if you use C-SPC and cursor motion to select region and then type C-w, that also sets primary, similar to earlier versions of Emacs. The latter property is the "laziness" setting for select-active-regions. A simpler alternative would be to replace 1-3 with: If the region is temporarily active after a command (e.g. after a mouse drag or shift selection), the selected text is added to the primary selection. This is much simpler than the first scheme. However, it does not make any attempt to treat normal active regions and temporarily active regions the same; normal active regions (made with C-SPC) never have anything to do with the primary selection. This means that if you mark a region with C-SPC and do C-w, you won't be able to paste the text in with mouse-2, unlike earlier Emacs versions.