GNU bug report logs - #68648
30.0.50; read-only-mode-hook's are not executed when buffer-read-only is t

Previous Next

Package: emacs;

Reported by: Björn Bidar <bjorn.bidar <at> thaodan.de>

Date: Sun, 21 Jan 2024 20:36:02 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: monnier <at> iro.umontreal.ca
Cc: bjorn.bidar <at> thaodan.de, 68648 <at> debbugs.gnu.org, stefankangas <at> gmail.com
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
> Cc: bjorn.bidar <at> thaodan.de, 68648 <at> debbugs.gnu.org, stefankangas <at> gmail.com
> Date: Thu, 01 Feb 2024 16:58:36 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> > Cc: Stefan Kangas <stefankangas <at> gmail.com>,  bjorn.bidar <at> thaodan.de,
> >   68648 <at> 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?




This bug report was last modified 1 year and 103 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.