bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66534: 30.0.50; [PATCH] Expand file-name of ~/.emacs before attempt


From: Christoph
Subject: bug#66534: 30.0.50; [PATCH] Expand file-name of ~/.emacs before attempt to load it
Date: Fri, 13 Oct 2023 20:41:16 +0200

Hi,

I noticed that during startup, emacs tries to load ~/.emacs (with
different extensions) many times over.  You can see this by using
strace and tracing the openat syscall.  The problem is, that `load'
does not expand the ~/ in the filename passed to it.  So it does not
recognize the file as being absolute and tries to resolve it using
the load-path.

While resolving the path in the openp function in lread.c,
`expand-file-name' is used with the default directory being the
elements of the load-path.  Since for `expand-file-name', ~/.emacs is
an absolute path, it returns the path unchanged, and load tries to
load ~/.emacs many times over.  I am not sure if the behavior of
`load' should also be considered a bug, but since all the other paths
of init files are resolved using `expand-file-name', I guess the same
should be done for the ~/.emacs path as well.

-- Christoph

Attachment: 0001-Expand-file-name-of-.emacs-before-attempt-to-load-it.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]