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: Thu, 01 Feb 2024 16:58:36 +0200 Message-ID: <86le84z0wz.fsf@gnu.org> References: <86a5ov6h9n.fsf@gnu.org> <868r441pn4.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25589"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bjorn.bidar@thaodan.de, 68648@debbugs.gnu.org, stefankangas@gmail.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 01 16:00:10 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 1rVYXx-0006Ny-TL for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Feb 2024 16:00:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVYXi-00035a-GG; Thu, 01 Feb 2024 09:59:54 -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 1rVYXg-00033S-Oj for bug-gnu-emacs@gnu.org; Thu, 01 Feb 2024 09:59:52 -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 1rVYXg-0001lw-Gk for bug-gnu-emacs@gnu.org; Thu, 01 Feb 2024 09:59:52 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rVYXq-0006QB-A0 for bug-gnu-emacs@gnu.org; Thu, 01 Feb 2024 10:00: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: Thu, 01 Feb 2024 15:00: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.170679956724592 (code B ref 68648); Thu, 01 Feb 2024 15:00:02 +0000 Original-Received: (at 68648) by debbugs.gnu.org; 1 Feb 2024 14:59:27 +0000 Original-Received: from localhost ([127.0.0.1]:42990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVYXG-0006Oa-A6 for submit@debbugs.gnu.org; Thu, 01 Feb 2024 09:59:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVYXC-0006OD-3E for 68648@debbugs.gnu.org; Thu, 01 Feb 2024 09:59:25 -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 1rVYWv-0001cq-8m; Thu, 01 Feb 2024 09:59:06 -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=s2dDwuXY0P803jH1fhAnRI2h9tXqfLxcCUrHDUqvNgc=; b=m1DwEu7YqfPj KVKnqrYz9uOEAK0xBGfpj7Di7VsN1HNtDIv/Ki0GCvZiLRMsh1SmEIrxoYqQm7/w09o9r1eHtknNC Zd/wxEKoQyH2OiRA0llRGNFHNyiTqF7eNN7zaQ8oqp0QNk+vfC/FfO32p66PDmMXuRsgisx/F8nly VtBhsnSn8VzsmkkzZxZ1g+wY9MemVm/DaaE81P6gPY7MjLHodw781ZqwmmwPAnfs6fzOUWC6Zzmay q/Z15B1hwvEMvIuHHSkTtbSwrohXo9wXVy8udups4Q24gUCldw+4dvOCwc2mAQaF7ouxoWoKJD9du ZpAcMd1xzQcKzBv7OM0s9g==; In-Reply-To: (message from Stefan Monnier on Thu, 01 Feb 2024 09:17:13 -0500) 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:279293 Archived-At: > 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.