GNU bug report logs -
#59795
30.0.50; locate-user-emacs-file refer to relative path with --init-directory is passed as relative path
Previous Next
Full log
Message #13 received at 59795 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 03 Dec 2022 11:31:59 +0000
> From: Tommaso Rossi <tommaso.rossi1 <at> protonmail.com>
> Cc: 59795-done <at> debbugs.gnu.org
>
> Thanks for your reply.
> I think I didn't explained the problem very well, sorry for my english.
You have nothing to apologize about, I understood you completely.
> It is right that the init directory is interpreted relative to the
> directory where Emacs is started, what feels a bit strange is that
> when you change directory inside Emacs, the init directory becomes
> relative to the current directory for the function
> locate-user-emacs-file. I realized that when I found folders
> named as my init directory spawned everywhere in my filesystem, for
> example containing Transient (Magit) history or other files that should
> be in the real init directory.
>
> In Emacs Lisp code, it becomes difficult to locate the real init
> directory, because the user-emacs-directory is not absolute: if some
> library or package uses the locate-user-emacs-file function, like
> Transient, than this "init directory spawned everywhere" problem will
> raise.
The latest code should produce an absolute file name in
user-emacs-directory, which I believe fixes the problem you described. My
response just explained how will Emacs produce an absolute file name from a
relative one when it processes the --init-directory= option.
The fix is in the emacs-29 branch, soon to be merged to master, so you can
try the fix if you want.
This bug report was last modified 2 years and 171 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.