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-done@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 12:25:11 +0200	[thread overview]
Message-ID: <83bkokeqd4.fsf@gnu.org> (raw)
In-Reply-To: <fWlIO2XemlATe88twxFuiSXW8oSae3SPzU87u4GoGgYSsHLv8PBotSKf-tjGtebt6xuOYpZ3N6yaWmJYRNDCLPVmgYtOJthgZU66Ao7iJYs=@protonmail.com> (bug-gnu-emacs@gnu.org)

> 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	other threads:[~2022-12-03 10:25 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 [this message]
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

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=83bkokeqd4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=59795-done@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.