GNU bug report logs - #6956
24.0.50; pasting mouse selection in other session pastes only first word

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Tue, 31 Aug 2010 16:48:02 UTC

Severity: normal

Found in version 24.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Chong Yidong <cyd <at> stupidchicken.com>
To: David De La Harpe Golden <david <at> harpegolden.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Dj, 6956 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>, ärv <jan.h.d <at> swipnet.se>
Subject: bug#6956: 24.0.50; pasting mouse selection in other session pastes only first word
Date: Sat, 04 Sep 2010 21:53:46 -0400
Thanks, the patch looks generally OK, except for the following:

>  (defcustom mouse-drag-copy-region nil
> -  "If non-nil, mouse drag copies region to kill-ring."
> +  "If non-nil, copy to kill-ring upon mouse adjustments of the region.
> +
> +For consistency this affects both actual mouse drag operations and
> +`mouse-save-then-kill' (\\[mouse-save-then-kill]) operations that
> +change the region."

It is sufficient to say "This affects `mouse-save-then-kill'
(\\[mouse-save-then-kill]) in addition to mouse drags."

>  If the region is inactive, activate it temporarily.  Set mark at
>  the original point, and move point to the position of CLICK.
> +If `mouse-drag-copy-region' is non-nil, also save the region
> +to the kill ring.
>
>  If the region is already active, adjust it.  Normally, do this by
>  moving point or mark, whichever is closer, to CLICK.  But if you
>  have selected whole words or lines, move point or mark to the
>  word or line boundary closest to CLICK instead.
> +If `mouse-drag-copy-region' is non-nil, also save the region
> +to the kill ring, replacing the previous kill corresponding
> +to the already active region.

We don't need to explain what mouse-drag-copy-region does twice.
Just add a separate paragraph saying

  If `mouse-drag-copy-region' is non-nil, this command also saves the
  region to the kill ring, replacing the previous kill if it was also
  made with `mouse-save-then-kill'.

>  If this command is called a second consecutive time with the same
> -CLICK position, kill the region."
> +CLICK position, kill the region (or delete it
> +if `mouse-drag-copy-region' is non-nil - it will already
> +have been saved to the kill ring by the previous click.)"

Omit the part after the "-", it's not necessary.

> -      (kill-region (mark t) (point))
> +      (if mouse-drag-copy-region
> +          ;; region already saved the previous click,
> +          ;; don't make a duplicate entry, just delete
> +          (delete-region (mark t) (point))
> +        (kill-region (mark t) (point)))
> +      (setq deactivate-mark t)

What's the additional deactivate-mark for?




This bug report was last modified 14 years and 329 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.