From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#41002: Undo breaks inhibit-read-only text property Date: Sat, 09 May 2020 10:37:52 +0300 Message-ID: <83blmxh833.fsf@gnu.org> References: <76e70d06-5dd7-700e-2d05-e3f1ec282a7c@gmail.com> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="100472"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41002@debbugs.gnu.org, egnartsms@gmail.com, larsi@gnus.org To: Filipp Gunbin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 09 09:39:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jXK4l-000Q3x-OM for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 May 2020 09:39:11 +0200 Original-Received: from localhost ([::1]:41606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXK4k-0003Mp-8t for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 May 2020 03:39:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXK4c-0003Ks-GA for bug-gnu-emacs@gnu.org; Sat, 09 May 2020 03:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35200) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXK4c-0000Ih-76 for bug-gnu-emacs@gnu.org; Sat, 09 May 2020 03:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jXK4c-0000LZ-4u for bug-gnu-emacs@gnu.org; Sat, 09 May 2020 03:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 May 2020 07:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41002 X-GNU-PR-Package: emacs Original-Received: via spool by 41002-submit@debbugs.gnu.org id=B41002.15890098931270 (code B ref 41002); Sat, 09 May 2020 07:39:02 +0000 Original-Received: (at 41002) by debbugs.gnu.org; 9 May 2020 07:38:13 +0000 Original-Received: from localhost ([127.0.0.1]:46746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXK3o-0000KQ-Of for submit@debbugs.gnu.org; Sat, 09 May 2020 03:38:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXK3k-0000K8-GW for 41002@debbugs.gnu.org; Sat, 09 May 2020 03:38:11 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46610) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXK3f-0007tW-4W; Sat, 09 May 2020 03:38:03 -0400 Original-Received: from [176.228.60.248] (port=4683 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jXK3e-00022D-EQ; Sat, 09 May 2020 03:38:02 -0400 In-Reply-To: (message from Filipp Gunbin on Sun, 03 May 2020 06:22:20 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179956 Archived-At: > From: Filipp Gunbin > Date: Sun, 03 May 2020 06:22:20 +0300 > Cc: 41002@debbugs.gnu.org, larsi@gnus.org > > --- 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. I think you are right: we need to augment this with something that pays attention to the inhibit-read-only property. Would you like to suggest a patch? Btw, how is this related to undo? Thanks.