all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tommaso Rossi <tommaso.rossi1@protonmail.com>
Cc: 59795@debbugs.gnu.org
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 14:12:50 +0200	[thread overview]
Message-ID: <835yeseldp.fsf@gnu.org> (raw)
In-Reply-To: <4ARS8y26LgnIVnPW_ysunddEPANdGQpVnlgpOiqx-uZiyGEf2YJYW05X-TgY8TSgkbmha7vFOr2MG4BJPfykTpAmLQveDluPGqKk1-NVWfw=@protonmail.com> (message from Tommaso Rossi on Sat, 03 Dec 2022 11:31:59 +0000)

> Date: Sat, 03 Dec 2022 11:31:59 +0000
> From: Tommaso Rossi <tommaso.rossi1@protonmail.com>
> Cc: 59795-done@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.





      reply	other threads:[~2022-12-03 12:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 12:47 bug#59795: 30.0.50; locate-user-emacs-file refer to relative path with --init-directory is passed as relative path Tommaso Rossi via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-03 10:25 ` Eli Zaretskii
2022-12-03 11:31   ` Tommaso Rossi via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-03 12:12     ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=835yeseldp.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=59795@debbugs.gnu.org \
    --cc=tommaso.rossi1@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.