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.devel Subject: Re: Selection changes Date: Thu, 15 Jul 2010 00:51:58 +0100 Message-ID: <4C3E4D9E.6000403@harpegolden.net> References: <87ocea2ax1.fsf@stupidchicken.com> 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 1279151536 7154 80.91.229.12 (14 Jul 2010 23:52:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 14 Jul 2010 23:52:16 +0000 (UTC) Cc: Emacs developers To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 15 01:52:15 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 1OZBkH-00038j-C2 for ged-emacs-devel@m.gmane.org; Thu, 15 Jul 2010 01:52:09 +0200 Original-Received: from localhost ([127.0.0.1]:42546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZBkG-0004fD-UE for ged-emacs-devel@m.gmane.org; Wed, 14 Jul 2010 19:52:08 -0400 Original-Received: from [140.186.70.92] (port=50818 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZBkB-0004f8-JU for emacs-devel@gnu.org; Wed, 14 Jul 2010 19:52:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OZBkA-0002kI-AI for emacs-devel@gnu.org; Wed, 14 Jul 2010 19:52:03 -0400 Original-Received: from harpegolden.net ([65.99.215.13]:39445) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZBkA-0002jz-31 for emacs-devel@gnu.org; Wed, 14 Jul 2010 19:52:02 -0400 Original-Received: from [87.198.54.10] (87-198-54-10.ptr.magnet.ie [87.198.54.10]) (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 0838168422; Thu, 15 Jul 2010 00:51:57 +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: <87ocea2ax1.fsf@stupidchicken.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:127322 Archived-At: On 14/07/10 19:08, Chong Yidong wrote: > I believe that this change should be pretty much seamless, but let me > know if there is any problems. > 'fraid the no-zero-length-region change to deactivate-mark, while well-intentioned, is wrong - by that stage emacs may have already taken ownership of the selection, and pointed it at the buffer. e.g. try C-SPC C-SPC, move point a few chars, middle click, middle click, middle click, Yeuch! Or try making the region nonzero sized then zero sized again. So please remove from deactivate-mark the (not (eq (region-beginning) (region-end))) for now - not having it is IMO the lesser of two evils, it's _way_ too easy to apparently randomize (well, it's not actually random, but users aren't going to appreciate rhat) primary with it there. At least IMO. Really, emacs needs to take ownership of the primary selection and set it to the buffer /the first time in each region activation that the active region becomes nonzero sized/. Remember when the emacs-level selection val is set to a buffer object, the buffer is _lazily_ queried for its point-mark span if/when other X clients ask for the selection, so if it manages to stay set to the buffer past deactivation of the region you'll have a selection depending on where the mark and point are at that time. Hence freezing off the string as the selection in deactivate-mark. I'm out of "emacs time" for today for actual implementation of a proposal for a fix - I'll have time at the weekend if you haven't got to it by then...