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 16:49:28 +0300 Message-ID: <838si1fcbb.fsf@gnu.org> References: <76e70d06-5dd7-700e-2d05-e3f1ec282a7c@gmail.com> <83blmxh833.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="71217"; 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 15:50:19 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 1jXPru-000IRE-GG for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 May 2020 15:50:18 +0200 Original-Received: from localhost ([::1]:33020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXPrt-0001dJ-14 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 May 2020 09:50:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXPre-0001cB-L9 for bug-gnu-emacs@gnu.org; Sat, 09 May 2020 09:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXPre-0005u4-Be for bug-gnu-emacs@gnu.org; Sat, 09 May 2020 09:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jXPre-0008Da-82 for bug-gnu-emacs@gnu.org; Sat, 09 May 2020 09:50: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 13:50: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.158903218631562 (code B ref 41002); Sat, 09 May 2020 13:50:02 +0000 Original-Received: (at 41002) by debbugs.gnu.org; 9 May 2020 13:49:46 +0000 Original-Received: from localhost ([127.0.0.1]:46976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXPrN-0008D0-T9 for submit@debbugs.gnu.org; Sat, 09 May 2020 09:49:46 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXPrM-0008Cg-7h for 41002@debbugs.gnu.org; Sat, 09 May 2020 09:49:44 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52285) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXPrG-0005XA-TG; Sat, 09 May 2020 09:49:38 -0400 Original-Received: from [176.228.60.248] (port=3911 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jXPrG-00012d-Bq; Sat, 09 May 2020 09:49:38 -0400 In-Reply-To: (message from Filipp Gunbin on Sat, 09 May 2020 16:34:43 +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:179970 Archived-At: > From: Filipp Gunbin > Cc: egnartsms@gmail.com, 41002@debbugs.gnu.org, larsi@gnus.org > Date: Sat, 09 May 2020 16:34:43 +0300 > > > 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? > > That property is checked in INTERVAL_WRITABLE_P just above, it looks > fine. That tests if the interval is _not_ writable. But the problem is not triggered by the interval, it is triggered by characters after the interval, is it not? > The problem is I don't know what the "if" I cited is for. Hopefully, Lars will answer that. > > Btw, how is this related to undo? > > Before undo, we seem to have one interval spanning all the text. After > undo, there appears a short interval on which "i->position + LENGTH (i) > < end" triggers. Right, thanks. So this situation could be recreated without any undo in the recipe, right?