all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David De La Harpe Golden <david@harpegolden.net>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: Miles Bader <miles@gnu.org>, emacs-devel@gnu.org
Subject: Re: Selection changes
Date: Sat, 17 Jul 2010 17:55:11 +0100	[thread overview]
Message-ID: <4C41E06F.1060101@harpegolden.net> (raw)
In-Reply-To: <87iq4eoido.fsf@stupidchicken.com>

On 17/07/10 05:13, Chong Yidong wrote:
> Chong Yidong<cyd@stupidchicken.com>  writes:
>
>> David De La Harpe Golden<david@harpegolden.net>  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).



  reply	other threads:[~2010-07-17 16:55 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-14 18:08 Selection changes Chong Yidong
2010-07-14 18:39 ` Jeff Clough
2010-07-14 18:53   ` Chong Yidong
2010-07-14 19:02     ` Jeff Clough
2010-07-14 19:25 ` Yann Hodique
2010-07-14 20:28   ` Chong Yidong
2010-07-14 23:51 ` David De La Harpe Golden
2010-07-16  1:31 ` Richard Stallman
2010-07-16  2:49   ` Miles Bader
2010-07-17  0:44 ` David De La Harpe Golden
2010-07-17  1:02   ` Miles Bader
2010-07-17  2:28     ` David De La Harpe Golden
2010-07-17  2:56       ` Chong Yidong
2010-07-17  3:30         ` Miles Bader
2010-07-17  3:49           ` Chong Yidong
2010-07-22 21:21           ` Drew Adams
2010-07-22 22:05             ` Chong Yidong
2010-07-23 10:32               ` Eli Zaretskii
2010-07-24 18:44                 ` David De La Harpe Golden
2010-07-24 20:28                   ` Eli Zaretskii
2010-07-24 21:48                     ` David De La Harpe Golden
2010-07-25 16:32                   ` David De La Harpe Golden
2010-07-17  3:50         ` David De La Harpe Golden
2010-07-17  3:55           ` Chong Yidong
2010-07-17  4:13             ` Chong Yidong
2010-07-17 16:55               ` David De La Harpe Golden [this message]
2010-07-18 16:24               ` David De La Harpe Golden
2010-07-17 10:50         ` Wojciech Meyer
2010-07-17 11:01           ` Miles Bader
  -- strict thread matches above, loose matches on Subject: below --
2010-07-16  1:00 Angelo Graziosi
2010-07-16  9:33 ` David De La Harpe Golden
2010-07-17 23:49   ` Angelo Graziosi
2010-07-18 19:28     ` David De La Harpe Golden
2010-07-18 22:39       ` Angelo Graziosi
2010-07-16 12:14 ` Angelo Graziosi
2011-05-27 16:25 Chong Yidong
2011-05-28  4:13 ` David De La Harpe Golden
2011-05-31  0:59   ` Taylor Venable
2011-05-28 11:16 ` Andreas Röhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C41E06F.1060101@harpegolden.net \
    --to=david@harpegolden.net \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.