GNU bug report logs -
#41002
Undo breaks inhibit-read-only text property
Previous Next
Full log
Message #14 received at 41002 <at> debbugs.gnu.org (full text, mbox):
> On 5/2/20 8:33 PM, Filipp Gunbin wrote:
[...]
>> Cannot reproduce on current master. Can you reproduce it with emacs -Q?
>> Do you have any custom undo functionality? (like a package)
I see I wasn't trying right, it's actually reproducible on master too.
I think this comes from verify_interval_modification (textprop.c). For
each interval, we check INTERVAL_WRITABLE_P, and then:
commit d1b04a9e7ada7070dbd84bb450411c1f169b3739
Author: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Date: Sun Nov 16 23:36:58 2014 +0100
[...]
diff --git a/src/textprop.c b/src/textprop.c
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -2301,0 +2301,4 @@
+ if (i->position + LENGTH (i) < end
+ && (!NILP (BVAR (current_buffer, read_only))
+ && NILP (Vinhibit_read_only)))
+ xsignal1 (Qbuffer_read_only, Fcurrent_buffer ());
So if there happens to be an (writeable) interval ending before "end"
(the end of the region we're killing with C-w), we will signal that the
buffer is read-only. This may be read as "if we're going over the
boundary of an interval, then check the _buffer_ read-onliness". Maybe
Lars, as the author of this code, could comment on this.
Filipp
This bug report was last modified 5 years and 33 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.