GNU bug report logs - #7683
24.0.50;` Edit' > `Copy' does not copy to kill ring

Previous Next

Package: emacs;

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

Date: Sun, 19 Dec 2010 21:35:02 UTC

Severity: normal

Found in version 24.0.50

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7683 in the body.
You can then email your comments to 7683 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7683; Package emacs. (Sun, 19 Dec 2010 21:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 19 Dec 2010 21:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50;` Edit' > `Copy' does not copy to kill ring
Date: Sun, 19 Dec 2010 13:40:28 -0800
emacs -Q

(So the value of `mouse-drag-copy-region' is nil.)
 
In buffer *scratch* select some words by double-clicking mouse-1 on one
word and then clicking mouse-3 on another word.  Then choose Edit > Copy
from the menu-bar menu.
 
You see this silly (and incorrect) message (look in *Messages* if it
gets overwritten):
 
 "Selecting a region with the mouse does `copy' automatically"
 
The selected text is _not_ copied to the kill ring as it should be (use
`C-h v kill-ring' to see).  The Edit > Copy menu item shows a shortcut
of `M-w', which is `kill-ring-save', but that is not what happens in
this case.
 
The bugged code is this:
 
(defun menu-bar-kill-ring-save (beg end) ; in menu-bar.el
  (interactive "r")
  (if (mouse-region-match)
      (message "Selecting a region with the mouse does `copy' automatically")
    (kill-ring-save beg end)))
 
(defun mouse-region-match () ; in mouse.el
  "Return non-nil if there's an active region that was set with the mouse."
  (and (mark t) mark-active
       (eq mouse-last-region-beg (region-beginning))
       (eq mouse-last-region-end (region-end))
       (eq mouse-last-region-tick (buffer-modified-tick))))
 
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-12-13 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
 





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7683; Package emacs. (Mon, 20 Dec 2010 14:49:01 GMT) Full text and rfc822 format available.

Message #8 received at 7683 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 7683 <at> debbugs.gnu.org
Subject: Re: bug#7683: 24.0.50;` Edit' > `Copy' does not copy to kill ring
Date: Mon, 20 Dec 2010 22:54:54 +0800
"Drew Adams" <drew.adams <at> oracle.com> writes:

> emacs -Q
>
> In buffer *scratch* select some words by double-clicking mouse-1 on one
> word and then clicking mouse-3 on another word.  Then choose Edit > Copy
> from the menu-bar menu.
>
> You see this silly (and incorrect) message (look in *Messages* if it
> gets overwritten):
>
>  "Selecting a region with the mouse does `copy' automatically"

Thanks, I've committed a fix.




bug closed, send any further explanations to "Drew Adams" <drew.adams <at> oracle.com> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Mon, 20 Dec 2010 14:49:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 18 Jan 2011 12:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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