* bug#45708: 27.1; (setq inhibit-default-init t) not working
@ 2021-01-07 5:34 Leo Liu
2021-01-07 14:00 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Leo Liu @ 2021-01-07 5:34 UTC (permalink / raw
To: 45708
I tried to move to 27.1 in Oct 2020 but my setup was badly broken.
So I tried again today and I discovered the culprit seemed to be that
default.el is loaded regardless of (setq inhibit-default-init t) in my
emacs init file.
My emacs setup has been working flawlessly since at least Emacs 24.
This incompatibility seems unintentional because the elisp documentation
specifically allows setting inhibit-default-init in user init file.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#45708: 27.1; (setq inhibit-default-init t) not working
2021-01-07 5:34 bug#45708: 27.1; (setq inhibit-default-init t) not working Leo Liu
@ 2021-01-07 14:00 ` Eli Zaretskii
2021-01-08 4:22 ` Leo Liu
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-01-07 14:00 UTC (permalink / raw
To: Leo Liu; +Cc: 45708
> From: Leo Liu <sdl.web@gmail.com>
> Date: Thu, 07 Jan 2021 13:34:22 +0800
>
> I tried to move to 27.1 in Oct 2020 but my setup was badly broken.
>
> So I tried again today and I discovered the culprit seemed to be that
> default.el is loaded regardless of (setq inhibit-default-init t) in my
> emacs init file.
>
> My emacs setup has been working flawlessly since at least Emacs 24.
>
> This incompatibility seems unintentional because the elisp documentation
> specifically allows setting inhibit-default-init in user init file.
Yes, this is an unintended consequence of refactoring some of the
startup code to support the early-init file.
Does the patch below fix the problem?
diff --git a/lisp/startup.el b/lisp/startup.el
index cdf4eea..b60c13e 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -927,7 +927,8 @@ startup--load-user-init-file
loaded, and ALTERNATE-FILENAME-FUNCTION is non-nil, then it is
called with no arguments and should return the name of an
alternate init-file to load. If LOAD-DEFAULTS is non-nil, then
-load default.el after the init-file.
+load default.el after the init-file, unless `inhibit-default-init'
+is non-nil.
This function sets `user-init-file' to the name of the loaded
init-file, or to a default value if loading is not possible."
@@ -983,8 +984,8 @@ startup--load-user-init-file
(sit-for 1))
(setq user-init-file source))))
- (when load-defaults
-
+ (when (and load-defaults
+ (not inhibit-default-init))
;; Prevent default.el from changing the value of
;; `inhibit-startup-screen'.
(let ((inhibit-startup-screen nil))
@@ -1390,7 +1391,7 @@ command-line
(expand-file-name
"init"
startup-init-directory))
- (not inhibit-default-init))
+ t)
(when (and deactivate-mark transient-mark-mode)
(with-current-buffer (window-buffer)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#45708: 27.1; (setq inhibit-default-init t) not working
2021-01-07 14:00 ` Eli Zaretskii
@ 2021-01-08 4:22 ` Leo Liu
2021-01-08 7:36 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Leo Liu @ 2021-01-08 4:22 UTC (permalink / raw
To: Eli Zaretskii; +Cc: 45708
On 2021-01-07 16:00 +0200, Eli Zaretskii wrote:
> Yes, this is an unintended consequence of refactoring some of the
> startup code to support the early-init file.
I see.
> Does the patch below fix the problem?
I load the patched startup.el in early-init and the problem goes away.
So yes it seems to work. Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#45708: 27.1; (setq inhibit-default-init t) not working
2021-01-08 4:22 ` Leo Liu
@ 2021-01-08 7:36 ` Eli Zaretskii
2021-01-08 11:56 ` Leo Liu
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-01-08 7:36 UTC (permalink / raw
To: Leo Liu; +Cc: 45708-done
> From: Leo Liu <sdl.web@gmail.com>
> Cc: 45708@debbugs.gnu.org
> Date: Fri, 08 Jan 2021 12:22:10 +0800
>
> On 2021-01-07 16:00 +0200, Eli Zaretskii wrote:
> > Yes, this is an unintended consequence of refactoring some of the
> > startup code to support the early-init file.
>
> I see.
>
> > Does the patch below fix the problem?
>
> I load the patched startup.el in early-init and the problem goes away.
> So yes it seems to work. Thanks.
Thanks for testing. I've now installed the change on the emacs-27
branch, and I'm marking this bug done.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#45708: 27.1; (setq inhibit-default-init t) not working
2021-01-08 7:36 ` Eli Zaretskii
@ 2021-01-08 11:56 ` Leo Liu
2021-01-08 12:35 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Leo Liu @ 2021-01-08 11:56 UTC (permalink / raw
To: 45708
On 2021-01-08 09:36 +0200, Eli Zaretskii wrote:
> Thanks for testing. I've now installed the change on the emacs-27
> branch, and I'm marking this bug done.
Having worked around this and http://debbugs.gnu.org/45610 I am running
Emacs 27.1 as my daily driver. So far so good.
Thanks for the hard work ;)
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#45708: 27.1; (setq inhibit-default-init t) not working
2021-01-08 11:56 ` Leo Liu
@ 2021-01-08 12:35 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2021-01-08 12:35 UTC (permalink / raw
To: Leo Liu; +Cc: 45708
> From: Leo Liu <sdl.web@gmail.com>
> Cc: eliz@gnu.org
> Date: Fri, 08 Jan 2021 19:56:46 +0800
>
> Having worked around this and http://debbugs.gnu.org/45610 I am running
> Emacs 27.1 as my daily driver. So far so good.
>
> Thanks for the hard work ;)
Great, thanks for telling us.
I hope we will release Emacs 27.2 soon, which will include all those
fixes OOTB.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-01-08 12:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-07 5:34 bug#45708: 27.1; (setq inhibit-default-init t) not working Leo Liu
2021-01-07 14:00 ` Eli Zaretskii
2021-01-08 4:22 ` Leo Liu
2021-01-08 7:36 ` Eli Zaretskii
2021-01-08 11:56 ` Leo Liu
2021-01-08 12:35 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.