GNU bug report logs -
#66534
30.0.50; [PATCH] Expand file-name of ~/.emacs before attempt to load it
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[0001-Expand-file-name-of-.emacs-before-attempt-to-load-it.patch (text/x-patch, attachment)]
This bug report was last modified 1 year and 236 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.