* bug#43460: 26.3; Package install fails if read-only-mode hooked to find-file
@ 2020-09-16 21:57 Pablo Aguado
2020-09-17 16:03 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Pablo Aguado @ 2020-09-16 21:57 UTC (permalink / raw)
To: 43460
I have set the following to always open files in read-only-mode:
(add-hook 'find-file-hook 'read-only-mode)
When I tried to install a new package through package-install, I got
(buffer-read-only #<buffer adaptive-wrap-autoloads.el>)
In https://emacs.stackexchange.com/a/46655 I found a working solution
for someone else having the same problem,
that seems to be telling package-install to inhibit read-only-mode:
(advice-add
'package-install-from-archive
:around (lambda (orig-fun &rest args)
(let ((inhibit-read-only t))
(apply orig-fun args))))
This worked but I think the behavior I expected should be a default.
Thanks!
--------
In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)
of 2020-05-19 built on felixonmars2
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Manjaro Linux
Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-wide-int
--with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt'
CPPFLAGS=-D_FORTIFY_SOURCE=2
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2
Important settings:
value of $LC_MONETARY: es_AR.UTF-8
value of $LC_NUMERIC: es_AR.UTF-8
value of $LC_TIME: es_AR.UTF-8
value of $LANG: es_AR.utf8
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
Minor modes in effect:
shell-dirtrack-mode: t
winner-mode: t
show-paren-mode: t
on-screen-global-mode: t
global-undo-tree-mode: t
undo-tree-mode: t
global-superword-mode: t
superword-mode: t
electric-pair-mode: t
display-battery-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-quote-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
global-visual-line-mode: t
visual-line-mode: t
transient-mark-mode: t
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#43460: 26.3; Package install fails if read-only-mode hooked to find-file
2020-09-16 21:57 bug#43460: 26.3; Package install fails if read-only-mode hooked to find-file Pablo Aguado
@ 2020-09-17 16:03 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-17 16:03 UTC (permalink / raw)
To: Pablo Aguado; +Cc: 43460
Pablo Aguado <aguadopd@hotmail.com> writes:
> I have set the following to always open files in read-only-mode:
> (add-hook 'find-file-hook 'read-only-mode)
>
> When I tried to install a new package through package-install, I got
> (buffer-read-only #<buffer adaptive-wrap-autoloads.el>)
I've now made package install autoload generation ignore find-file-hook
in Emacs 28, which seems to fix the problem there.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-17 16:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-16 21:57 bug#43460: 26.3; Package install fails if read-only-mode hooked to find-file Pablo Aguado
2020-09-17 16:03 ` Lars Ingebrigtsen
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).