From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#68648: 30.0.50; read-only-mode-hook's are not executed when buffer-read-only is t Date: Sat, 03 Feb 2024 11:32:28 +0200 Message-ID: <868r4151w3.fsf@gnu.org> References: <86a5ov6h9n.fsf@gnu.org> <868r441pn4.fsf@gnu.org> <86le84z0wz.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27429"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bjorn.bidar@thaodan.de, 68648@debbugs.gnu.org, stefankangas@gmail.com To: monnier@iro.umontreal.ca Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 03 10:33:54 2024 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 1rWCPJ-0006vT-Vf for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Feb 2024 10:33:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rWCOO-0004P9-Sp; Sat, 03 Feb 2024 04:32:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rWCON-0004MY-C6 for bug-gnu-emacs@gnu.org; Sat, 03 Feb 2024 04:32:55 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rWCOJ-0005lc-EQ for bug-gnu-emacs@gnu.org; Sat, 03 Feb 2024 04:32:54 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rWCOU-0002Ig-Gi for bug-gnu-emacs@gnu.org; Sat, 03 Feb 2024 04:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Feb 2024 09:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68648 X-GNU-PR-Package: emacs Original-Received: via spool by 68648-submit@debbugs.gnu.org id=B68648.17069527738827 (code B ref 68648); Sat, 03 Feb 2024 09:33:02 +0000 Original-Received: (at 68648) by debbugs.gnu.org; 3 Feb 2024 09:32:53 +0000 Original-Received: from localhost ([127.0.0.1]:45868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWCOK-0002II-Fl for submit@debbugs.gnu.org; Sat, 03 Feb 2024 04:32:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWCOH-0002I4-Ng for 68648@debbugs.gnu.org; Sat, 03 Feb 2024 04:32:51 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rWCO0-0005jE-8X; Sat, 03 Feb 2024 04:32:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=h21DlU4h1PokVHSFvHgikk+IJqrbmqwzcY+sKjtOoOQ=; b=kQ5upoN31njA cLU8TW6lHv81I0qqJ/MmbThTkYWmdgmytmW504YT6aadJnc+wCu4dKq2VYIKacjI0JKN5RTtWgrOE q0+licesJqcJ+qcQYqG0+eSiKH3n6odpJK/98aJ8oFJi5dtz6KL/OsOtXSKbzRSHVEraoYYAVSD+8 kTiwpP3nMO382EXVTXD4BnCtJaVecKV1RFlpCaipRYBt/D6M5vWEyRLBkfmyoFEkBvJLytKT44uGW sAhDCgwXPvmlWIKvl4R52Z1K5m36EI5dC7SQ+IVC3n5p83C+BMRMf/9Q7+g4IczBIvpBSXZaFhRNG QJl1UfA7y4Pb8/q8aLiyUA==; In-Reply-To: <86le84z0wz.fsf@gnu.org> (message from Eli Zaretskii on Thu, 01 Feb 2024 16:58:36 +0200) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279365 Archived-At: > Cc: bjorn.bidar@thaodan.de, 68648@debbugs.gnu.org, stefankangas@gmail.com > Date: Thu, 01 Feb 2024 16:58:36 +0200 > From: Eli Zaretskii > > > From: Stefan Monnier > > Cc: Stefan Kangas , bjorn.bidar@thaodan.de, > > 68648@debbugs.gnu.org > > Date: Thu, 01 Feb 2024 09:17:13 -0500 > > > > > Stefan & Stefan, any comments or opinions on this issue? I' debating > > > whether to do anything (and if so, what) about this, or close this bug > > > as wontfix. > > > > [ This a bug of my own making, when I decided to replace > > `toggle-read-only` with`read-only-mode`. ] > > > > I'd be in favor of replacing the `(setq buffer-read-only t)` with > > `(read-only-mode 1)`, but it will require other changes: since calling > > `read-only-mode` will handle `view-read-only`, it might make for a nice > > simplification, but since the code is fairly complex over there, it > > might also make things worse. > > I agree that it would be nice to clean this up, but since it isn't > easy (which I, of course, noticed as well), I'm not sure it is worth > our while, given that the problem is really minor. Thus my doubts and > my question. On second thought, would it be okay to just call the mode hook where we set buffer-read-only in after-find-file?