From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#41002: Undo breaks inhibit-read-only text property Date: Tue, 19 May 2020 14:12:13 +0200 Message-ID: <87sgfwrun6.fsf@gnus.org> References: <76e70d06-5dd7-700e-2d05-e3f1ec282a7c@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="119289"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 41002@debbugs.gnu.org, Serhii Mozghovyi To: Filipp Gunbin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 19 14:13:12 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 1jb17P-000UtF-9Z for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 May 2020 14:13:11 +0200 Original-Received: from localhost ([::1]:47336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jb17O-00067U-Bg for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 May 2020 08:13:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jb17G-000659-Eg for bug-gnu-emacs@gnu.org; Tue, 19 May 2020 08:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jb17G-0000Ao-5J for bug-gnu-emacs@gnu.org; Tue, 19 May 2020 08:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jb17G-00074d-17 for bug-gnu-emacs@gnu.org; Tue, 19 May 2020 08:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 May 2020 12:13:01 +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.158989034827145 (code B ref 41002); Tue, 19 May 2020 12:13:01 +0000 Original-Received: (at 41002) by debbugs.gnu.org; 19 May 2020 12:12:28 +0000 Original-Received: from localhost ([127.0.0.1]:49467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jb16i-00073l-35 for submit@debbugs.gnu.org; Tue, 19 May 2020 08:12:28 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:54070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jb16g-00073W-FL for 41002@debbugs.gnu.org; Tue, 19 May 2020 08:12:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Dj/Rc8XTHkk52Yt38a0htt8VwgJAIP8R6rgsGupKBPM=; b=LWxRDr5n88SD7RI8codUcfjgZC OIHyH3V3qibJIVU5WGMmGUl1EKN7dTKrYkn2SlRyVqTclDi7yFzf8YM1X4WIm6Jaz1APDvizWz4Nl Wl6Ny0qfu9ve2DtKOX6KQrO8NegOCDakN58X6qduFJ7STXiOjz+gP8hzRGBygiOKrVao=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jb16U-0000N3-MZ; Tue, 19 May 2020 14:12:19 +0200 In-Reply-To: (Filipp Gunbin's message of "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:180583 Archived-At: Filipp Gunbin writes: > @@ -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. Hm... I've re-read the original patch, and I don't really have any recollection of what my original thought here was, I'm afraid. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no