From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#50431: revert-buffer doesn't preserve read-onlyness Date: Fri, 26 Aug 2022 10:17:24 +0300 Organization: LINKOV.NET Message-ID: <86o7w7mooj.fsf@mail.linkov.net> References: <87mtopkj2a.fsf@mail.linkov.net> <87h721oowl.fsf@gnus.org> <86edx5o99p.fsf@mail.linkov.net> <874jy0ju7p.fsf@gnus.org> <86r114qk13.fsf@mail.linkov.net> <83k06w2lwe.fsf@gnu.org> <86edx4qfp8.fsf@mail.linkov.net> <83czcn36we.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35483"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: larsi@gnus.org, 50431@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 26 09:50:18 2022 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 1oRU6c-00093y-3R for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Aug 2022 09:50:18 +0200 Original-Received: from localhost ([::1]:45238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRU6a-0004uv-JT for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Aug 2022 03:50:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRU6M-0004tp-UX for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2022 03:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33971) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRU6M-0003dS-LP for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2022 03:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRU6M-0005x5-Hh for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2022 03:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Aug 2022 07:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50431 X-GNU-PR-Package: emacs Original-Received: via spool by 50431-submit@debbugs.gnu.org id=B50431.166150018022839 (code B ref 50431); Fri, 26 Aug 2022 07:50:02 +0000 Original-Received: (at 50431) by debbugs.gnu.org; 26 Aug 2022 07:49:40 +0000 Original-Received: from localhost ([127.0.0.1]:51953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRU5z-0005wJ-Uz for submit@debbugs.gnu.org; Fri, 26 Aug 2022 03:49:40 -0400 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:51851) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRU5z-0005w5-0Q for 50431@debbugs.gnu.org; Fri, 26 Aug 2022 03:49:39 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id EA5E01BF207; Fri, 26 Aug 2022 07:49:29 +0000 (UTC) In-Reply-To: <83czcn36we.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 Aug 2022 08:34:09 +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:240787 Archived-At: >> >> Maybe minor modes should be restored after reverting? >> > >> > Only the minor modes that are automatically turned on when visiting >> > the file. Reverting should produce the same effect as killing the >> > buffer and then visiting the file anew, nothing more, nothing less. >> >> In the above example, `C-h C-t' `C-x x g' doesn't preserve the same state >> as visiting the file anew with `C-h C-t'. >> >> > For that reason, I'm not sure the change that preserves the read-only >> > status across reverts is correct. At the very least, it should be an >> > opt-in feature, IMO. >> >> It was a regression when reverting stopped to preserve the read-only status >> that worked in older versions. > > IMO, that was a mistake. It violates the notion of "reverting", at > least in my book. Maybe a new user option could define how to revert, with possible values: 1. keep the initial read-only status and minor modes; 2. keep the current read-only status and minor modes.