Subject: RE: [External] : bug#17211: Empty items show up in kill-ring if mouse-drag-copy-region is used

From: Drew Adams <[email-masked]>
Date: Wed, 11 May 2022 14:35:00 +0000

> I can reproduce the behaviour you're seeing in Emacs 29, but I'm not
> sure what else Emacs could do here.  With `mouse-drag-copy-region' set,
> and in 4) you drag the mouse, so it copies that new region (even if
> that
> region is so short that you end up with "").
> 
> Hm...  well, I guess we could change mouse-drag-copy-region so that if
> the region is very short (i.e., less than a character), then we don't
> put that onto the kill ring?
> 
> Does anybody here object to making such a change?  I guess it's
> possible
> that somebody is using a sub-character drag to set the mark, but it
> does
> seem unlikely.

Please don't "fix" this.  This is pilot error.
Users can usually configure their mouse to
compensate for any unsteady hand etc.  Or if
necessary and this is considered an Emacs-only
problem, then Emacs could add a user option to
adjust the behavior.

But there should be no one-size-fits-all change.
It's perfectly fine to _be able_ to drag to
select whitespace, and it's perfectly fine to
have whitespace on the kill-ring and to yank it.

If the problem is (1) some users not wanting a
tiny movement to select whitespace, or (2) users
not wanting whitespace on the kill-ring, then
find another solution for such users, by way of
one or more user options.

Note that the way this bug report and its title
are worded suggest #2 - the reporting user seems
to think that whitespace is inappropriate for
the kill-ring.  A user option could easily take
care of that preference.