GNU bug report logs -
#17271
24.4.50; mouse-yank-primary can insert read-only attributes
Previous Next
Reported by: Jorgen Schaefer <forcer <at> forcix.cx>
Date: Tue, 15 Apr 2014 18:35:02 UTC
Severity: normal
Found in version 24.4.50
Fixed in version 24.4
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
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 17271 in the body.
You can then email your comments to 17271 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17271
; Package
emacs
.
(Tue, 15 Apr 2014 18:35:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jorgen Schaefer <forcer <at> forcix.cx>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 15 Apr 2014 18:35:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi!
We have witnessed some strange behavior when users of the IRC client
Circe copied text from a channel buffer elsewhere. The copied text
remained read-only, as the channel buffer is, but only when copied using
the mouse, not when copied using the keyboard.
Reproduction:
(setq select-active-regions t)
(insert (propertize "foo" 'read-only t))
Then select the "foo" and immediately yank it somewhere using the middle
mouse button. The inserted text retains the read-only property.
It probably would be a good idea for `mouse-yank-primary' to use
`insert-for-yank' instead of `insert'.
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Wed, 02 Jul 2014 14:45:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jorgen Schaefer <forcer <at> forcix.cx>
:
bug acknowledged by developer.
(Wed, 02 Jul 2014 14:45:04 GMT)
Full text and
rfc822 format available.
Message #10 received at 17271-done <at> debbugs.gnu.org (full text, mbox):
Version:24.4
> Then select the "foo" and immediately yank it somewhere using the middle
> mouse button. The inserted text retains the read-only property.
>
> It probably would be a good idea for `mouse-yank-primary' to use
> `insert-for-yank' instead of `insert'.
Indeed, thanks. I installed the patch below into the `emacs-24' branch.
Stefan
=== modified file 'lisp/mouse.el'
--- lisp/mouse.el 2014-06-20 18:35:04 +0000
+++ lisp/mouse.el 2014-07-02 14:37:36 +0000
@@ -1101,7 +1101,7 @@
(unless primary
(error "No selection is available"))
(push-mark (point))
- (insert primary)))
+ (insert-for-yank primary)))
(defun mouse-kill-ring-save (click)
"Copy the region between point and the mouse click in the kill ring.
@@ -1383,7 +1383,7 @@
(or mouse-yank-at-point (mouse-set-point click))
(let ((secondary (x-get-selection 'SECONDARY)))
(if secondary
- (insert secondary)
+ (insert-for-yank secondary)
(error "No secondary selection"))))
(defun mouse-kill-secondary ()
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 31 Jul 2014 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.