Subject: 24.4.50; mouse-yank-primary can insert read-only attributes
From: Jorgen Schaefer <[email-masked]>
To: [email-masked]
Date: Tue, 15 Apr 2014 20:33:25 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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'.