GNU bug report logs -
#66534
30.0.50; [PATCH] Expand file-name of ~/.emacs before attempt to load it
Previous Next
Full log
Message #8 received at 66534 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 13 Oct 2023 20:41:16 +0200
> From: Christoph via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> 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 don't understand what you are saying here. The last sentence is
incorrect, as evidenced by the following:
(expand-file-name "~/.emacs" "/tmp")
=> "/home/eliz/.emacs"
IOW, "~/.emacs" is indeed treated by Emacs as an absolute file name,
but expand-file-name does NOT return "~/.emacs" unchanged.
So please explain what exactly is the problem you see here, and in
particular what issues that problem causes in your case.
Thanks.
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.