Subject: bug#45197: Saving customizations makes ~/.config/emacs/init (no .el extension)

From: Robert Pluim <[email-masked]>
Date: Mon, 14 Dec 2020 18:23:39 +0100

Lars Ingebrigtsen <[email-masked]> writes:

> tsuucat <[email-masked]> writes:

> I did not read those 150 messages, and this code is uncommented in
> startup.el:
>
>      (lambda ()
>        (expand-file-name
>         "init"
>         startup-init-directory))
>
> Does anybody know whether this is just a typo?

Iʼm not sure it is. startup--load-user-init-file does this:

              (when (and (eq user-init-file t) alternate-filename-function)
                (let ((alt-file (funcall alternate-filename-function)))
                  (and (equal (file-name-extension alt-file) "el")
                       (setq alt-file (file-name-sans-extension alt-file)))
		  (unless init-file-name
		    (setq init-file-name alt-file))
                  (load alt-file 'noerror 'nomessage)))

which makes me wonder if itʼs trying to cater for people who compile
their init.el file, since this code doesnʼt actually probe the
filesystem, but presumably later we do (load init-file-name), which
will match .elc and .el suffixes.

Robert