From: "Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: =?UTF-8?Q?Bj=C3=B6rn@debbugs.gnu.org
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 [thread overview]
Message-ID: <32274.6311243222$1706017724@news.gmane.org> (raw)
In-Reply-To: <B1622989-BA4F-44C6-88FB-30A2D2320A3F@gnu.org> (Eli Zaretskii's message of "Mon, 22 Jan 2024 11:00:47 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
> On January 21, 2024 10:35:26 PM GMT+02:00, "Björn Bidar via Bug
> reports for GNU Emacs, the Swiss army knife of text editors"
> <bug-gnu-emacs@gnu.org> wrote:
>> I noticed when opening a file which isn't readable that
>> read-only-mode-hooks are not executed.
>>
>> 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.
next prev parent reply other threads:[~2024-01-23 13:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <875xzma0hd.fsf@>
2024-01-22 9:00 ` bug#68648: 30.0.50; read-only-mode-hook's are not executed when buffer-read-only is t Eli Zaretskii
2024-01-23 13:47 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-23 13:47 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
[not found] ` <874jf4nove.fsf@>
2024-01-23 18:23 ` Eli Zaretskii
2024-02-01 9:48 ` Eli Zaretskii
2024-02-01 14:17 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-01 14:58 ` Eli Zaretskii
2024-02-01 17:58 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-03 9:32 ` Eli Zaretskii
2024-02-03 16:28 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-03 22:09 ` Stefan Kangas
2024-02-10 8:37 ` Eli Zaretskii
2024-01-21 20:35 Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='32274.6311243222$1706017724@news.gmane.org' \
--to=bug-gnu-emacs@gnu.org \
--cc==?UTF-8?Q?Bj=C3=B6rn@debbugs.gnu.org \
--cc=bjorn.bidar@thaodan.de \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).