From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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: Tue, 23 Jan 2024 15:47:01 +0200 Message-ID: <46843.8047262438$1706017721@news.gmane.org> References: Reply-To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12015"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: =?UTF-8?Q?Bj=C3=B6rn@debbugs.gnu.org, ?= Bidar, via@debbugs.gnu.org, Bug@debbugs.gnu.org, reports@debbugs.gnu.org, for@debbugs.gnu.org, GNU@debbugs.gnu.org, Emacs@debbugs.gnu.org, 68648@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 23 14:48:33 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 1rSH8i-0002ro-5J for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Jan 2024 14:48:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSH8M-0007KX-R5; Tue, 23 Jan 2024 08:48:10 -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 1rSH8H-0007HM-DC for bug-gnu-emacs@gnu.org; Tue, 23 Jan 2024 08:48:08 -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 1rSH89-0001Gw-Si for bug-gnu-emacs@gnu.org; Tue, 23 Jan 2024 08:48:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rSH8E-0006yW-9b for bug-gnu-emacs@gnu.org; Tue, 23 Jan 2024 08:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jan 2024 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68648 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: =?UTF-8?Q?Bj=C3=B6rn?= Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors , 68648@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170601764426634 (code B ref -1); Tue, 23 Jan 2024 13:48:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jan 2024 13:47:24 +0000 Original-Received: from localhost ([127.0.0.1]:42454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSH7c-0006vV-Bi for submit@debbugs.gnu.org; Tue, 23 Jan 2024 08:47:24 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:39090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSH7Y-0006v2-PZ for submit@debbugs.gnu.org; Tue, 23 Jan 2024 08:47:21 -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 1rSH7O-0006f9-Hp for bug-gnu-emacs@gnu.org; Tue, 23 Jan 2024 08:47:10 -0500 Original-Received: from thaodan.de ([185.216.177.71]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSH7M-0000ww-0i; Tue, 23 Jan 2024 08:47:10 -0500 Original-Received: from odin (dsl-trebng12-50dc77-87.dhcp.inet.fi [80.220.119.87]) by thaodan.de (Postfix) with ESMTPSA id 8632CD03997; Tue, 23 Jan 2024 15:47:03 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1706017623; bh=JA4DEMev1V0T5l5dOsKMklZitlKBs+ydYVQ0YmAkvVQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=DcZcWh6TBincWGIWhZwGPoU1l1gTL3ZDPCr9U/rNwNM4vNWKutt8Fz6NxGVZv2vLf ki6GJMOYgfaEKkp5Kud3o77CFh89T87vrplu8MX5GWicW1rOtndwB5obtqkL6aToGp RFJiARXoo6Lity23tNfLlesoMPMDYd8jQaiGEDe3sR0oGBqP/cHgHm6Wz0wXWUw6/e g5gVScPAuCHYgU3NAnTiUbTVHswrw9neMDoqEeeTwEQ36UXe8F6N4uAXiLInU3wjPL siB4VeVRXl3wg1EqfLjhkIypqArpROlB2FcESKSDsHpBuhycfaQC5y8/v5qWU2taYV qYHI/3rq03t44DNp8GoBNslceImAEtfInQ/2VDLIe6pcvrRiPeAxJFF+zBmolQ4xrY bD//ADJut6qNwCUyItJ2cKtbcPA+ScU/7hwQx1+QTewEkKxVuSc+ZarVHuQsS6Qh3v CfBJA/PaNYOM9mDTugdi0knofvLyMDJ27g73YL2VvXGfOfked4vCBDno2sBUYk8Zdy n4wCd/Rytt62nmxGpAKpb/o3Cankuy657bfL8aTQw4opWvdG0SdsZVzX9zkhtS/NYG OmZ0wSQJo1GFPEsG5kaMG1e7frOorTrz8Rq1cxUjNx0kPia+OUZ9wYyDvVNDfFsqLO gHy0WWaKs4QYwjpDB/DUzAlM= In-Reply-To: (Eli Zaretskii's message of "Mon, 22 Jan 2024 11:00:47 +0200") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH Received-SPF: pass client-ip=185.216.177.71; envelope-from=bjorn.bidar@thaodan.de; helo=thaodan.de X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, INVALID_MSGID=0.568, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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:278735 Archived-At: Eli Zaretskii writes: > On January 21, 2024 10:35:26 PM GMT+02:00, "Bj=C3=B6rn Bidar via Bug > reports for GNU Emacs, the Swiss army knife of text editors" > wrote: >> I noticed when opening a file which isn't readable that >> read-only-mode-hooks are not executed. >>=20 >> 1. (add-hook 'read-only-mode-hook (lambda () (print "foobar"))) >> 2. open file that is read-only >> 3. foobar should be print but isn't. > > That's because read-only-mode is not entered when you visit a > write-protected file. It does look like the mode is entered because when calling read-only-mode it is disabled.