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: Sat, 17 Jul 2010 17:55:11 +0100 Message-ID: <4C41E06F.1060101@harpegolden.net> References: <87ocea2ax1.fsf@stupidchicken.com> <4C40FCEC.9030404@harpegolden.net> <87pqym2a4r.fsf@catnip.gol.com> <4C411552.40003@harpegolden.net> <87eif2n7d7.fsf@stupidchicken.com> <4C412888.9080805@harpegolden.net> <8739vivk2y.fsf@stupidchicken.com> <87iq4eoido.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 1279385730 26910 80.91.229.12 (17 Jul 2010 16:55:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 17 Jul 2010 16:55:30 +0000 (UTC) Cc: Miles Bader , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 17 18:55:28 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 1OaAfg-0004mS-CG for ged-emacs-devel@m.gmane.org; Sat, 17 Jul 2010 18:55:28 +0200 Original-Received: from localhost ([127.0.0.1]:35101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OaAff-00040a-Ct for ged-emacs-devel@m.gmane.org; Sat, 17 Jul 2010 12:55:27 -0400 Original-Received: from [140.186.70.92] (port=33706 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OaAfU-0003yd-OY for emacs-devel@gnu.org; Sat, 17 Jul 2010 12:55:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OaAfT-0005wi-0Q for emacs-devel@gnu.org; Sat, 17 Jul 2010 12:55:16 -0400 Original-Received: from harpegolden.net ([65.99.215.13]:35338) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OaAfS-0005wB-Rh; Sat, 17 Jul 2010 12:55:14 -0400 Original-Received: from [87.198.55.208] (87-198-55-208.ptr.magnet.ie [87.198.55.208]) (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 2616F683FF; Sat, 17 Jul 2010 17:55:11 +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: <87iq4eoido.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:127524 Archived-At: On 17/07/10 05:13, Chong Yidong wrote: > Chong Yidong writes: > >> David De La Harpe Golden writes: >> >>> The bad "(not (eq (region-beginning) (region-end)))" check is still >>> present in deactivate-mark (~simple.el line 3690) and should just be >>> removed, I did [try to] explain the problem with it in a previous >>> mail, that's a further source of some poor behaviour (perhaps >>> counterintuitively, but that's lazy stuff for you) that might be >>> related to some of your points below. >> >> Let's come up with a proper fix, first. Indeed, that would be best. I do still intend to try something there over the next day. In the meantime, here's another stab at showing one of the problems with the check, in the form of another example. > To be precise, the check is necessary because otherwise mouse-1 (which > deactivates the mark) destroys the primary selection. > Note that the check is only run if emacs has already owned the selection (x-selection-owner-p ...) above it! So the damage is already done, mostly. Even if we were to fallback to just disowning the selection instead of freezing off the string as the selection /we'd still be wanting to remove the check/. I'm vaguely hopeful the below will help make clear why. Try this: ^ => point location @ => mouse pointer location, when relevant/known A B etc => other location refs for instructions. emacs -Q | type hello world. hello world A B C ^ | Now simulate a "clumsy click" | (this might take a few attempts to trigger the issue): | mouse-1-down at A. | move mouse a little bit, but not enough to | create a non-zero-length visible region. | mouse-1-up +++ message shown "Mark set" [Aside: recently every click, clumsy or not, is setting the mark and putting it on the mark ring. That sure is cluttering the mark ring] hello world A B C ^ @ | move point with cursor key to B. hello world A B C @ ^ | move mouse to C. hello world A B C ^ @ | mouse-2-click at C. hello worllo world A @ ^ | mouse-2-click again hello worllo worllo world A @ ^ X | move mouse to X hello worllo worllo world A ^ X @ | mouse-2-click hello worllo worllo wollo worllo worllo world Y A @ ^ | move mouse to Y hello worllo worllo wollo worllo worllo world Y A ^ @ | mouse-2-click hehello worllo worllo wollo worllo worllo world @ ^ | Blargh. And note how similar the early parts of that sequence are to someone with a slight age-related tremor or similar using the mouse-1 to grossly reposition the point, then the keyboard for some fine adjustment. (and the later parts to someone clicking randomly in confusion :-) ) N.B. There's a similar sequence with C-SPC C-SPC if you think just catching more "clumsy clicks" is addressing the underlying issue - it isn't (though might be independently good).