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: Thu, 25 Aug 2022 22:35:31 +0300 Organization: LINKOV.NET Message-ID: <86edx4qfp8.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35658"; 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 Thu Aug 25 21:39:59 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 1oRIhr-00095c-2r for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 21:39:59 +0200 Original-Received: from localhost ([::1]:33578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRIhp-0000pR-8Q for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 15:39:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRIgw-0000pB-JH for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 15:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33384) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRIgw-0003Yh-2t for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 15:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRIgv-0001lf-Qo for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 15:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Aug 2022 19:39:01 +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.16614563316769 (code B ref 50431); Thu, 25 Aug 2022 19:39:01 +0000 Original-Received: (at 50431) by debbugs.gnu.org; 25 Aug 2022 19:38:51 +0000 Original-Received: from localhost ([127.0.0.1]:51361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRIgk-0001l7-Rp for submit@debbugs.gnu.org; Thu, 25 Aug 2022 15:38:51 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:54177) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRIgi-0001kt-PA for 50431@debbugs.gnu.org; Thu, 25 Aug 2022 15:38:49 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id ACEA2FF803; Thu, 25 Aug 2022 19:38:41 +0000 (UTC) In-Reply-To: <83k06w2lwe.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 25 Aug 2022 21:55:29 +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:240747 Archived-At: >> >> but reverting loses view-mode: >> >> >> >> C-h C-t -- note "View" on the mode-line; >> >> C-x x g -- "View" is lost. >> > >> > Hm, yes. Reverting a buffer disables all the minor modes? >> >> 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. OTOH, in older versions reverting didn't preserve the minor modes.