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

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

bug#59795: 30.0.50; locate-user-emacs-file refer to relative path with -


From: Eli Zaretskii
Subject: bug#59795: 30.0.50; locate-user-emacs-file refer to relative path with --init-directory is passed as relative path
Date: Sat, 03 Dec 2022 12:25:11 +0200

> Date: Fri, 02 Dec 2022 12:47:43 +0000
> From:  Tommaso Rossi via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> When launching emacs with --init-directory option set to a relative path, I 
> noticed that locate-user-emacs-file
> refers to a relative path.
> This means that every library that uses that function spawns files in visited 
> directories instead that in the
> init-directory.
> 
> 1) Open shell in home (~)
> 2) emacs -Q --init-directory .my-emacs.d
> 3) C-x C-f ~/other-directory RET
> 4) M-: (locate-user-emacs-file "some-file") RET
> 
> result: ~/other-directory/.my-emacs.d/some-file
> expected: ~/.my-emacs.d/some-file
> 
> It happens both starting with -Q or not.
> The problem does not happen when an absolute path is passed as 
> --init-directory option argument.
> 
> Perhaps the user-emacs-directory should be parsed as absolute path at startup?

I made --init-directory=DIR be interpreted relative to the directory where
Emacs is started.

Thanks.





reply via email to

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