GNU bug report logs - #10006
24.0.91; set-text-properties fails with "Text is read-only", but didn't in Emacs 23

Previous Next

Package: emacs;

Reported by: Eric Hanchrow <eric.hanchrow <at> gmail.com>

Date: Wed, 9 Nov 2011 23:21:02 UTC

Severity: minor

Found in version 24.0.91

Fixed in version 24.0.92

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Glenn Morris <rgm <at> gnu.org>
To: Eric Hanchrow <eric.hanchrow <at> gmail.com>
Cc: 10006 <at> debbugs.gnu.org
Subject: bug#10006: 24.0.91; set-text-properties fails with "Text is read-only", but didn't in Emacs 23
Date: Wed, 09 Nov 2011 18:38:36 -0500
Eric Hanchrow wrote:

> (insert "frotz")
> (occur "f")
> (set-buffer (get-buffer "*Occur*"))
> (fundamental-mode)
> (toggle-read-only 0)
> (set-text-properties (point-min) (point-max) nil)
> ===>8===>8===>8===>8===>8===>8===>8===>8===>8===>8===>8===>8===
>
> Invoke emacs like this:
>
>     $ emacs -Q --batch --load /tmp/fail.el  ; echo $?
>
> You'll see
>
>     Searched 1 buffer; 1 match
>     Text is read-only
>     255


There are read-only text properties in the Occur buffer now.
If you let-bind inhibit-read-only around your code rather than
using toggle-read-only, it should all work fine.
I don't think there is a bug here.




This bug report was last modified 13 years and 256 days ago.

Previous Next


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