all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Shitikanth <shitikanth1@gmail.com>
Cc: 55655@debbugs.gnu.org
Subject: bug#55655: 28.1; package.el no longers respects `user-emacs-directory'
Date: Fri, 27 May 2022 08:29:43 -0400	[thread overview]
Message-ID: <jwvo7zjgogo.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CALjXJSQgmrskzZKJz9wcCT-oTbzfDMsJonrXaZx7us95H0katQ@mail.gmail.com> (Shitikanth's message of "Fri, 27 May 2022 10:40:53 +0530")

>>Could you give some more details about the use case that actually
>> affects you
>
> I just have a couple of different configs and use them with
> "emacs -Q --load $config_dir/init.el" and set the user-emacs-directory
> early in "$config_dir/init.el". This was also the easiest way to try out
> other people's configs without disturbing your own.

I see... for this specific case `--init-directory` or `--user` might
work better.

> I guess I was always aware that this was an abuse of the init system,
> so if this is an intended change, you can close the bug report.

What you see is not exactly an "intended change" in the sense that it
would be good to make it behave the way you want to in your case.

But it's not straightforward: `package-user-directory` is now predefined
in the dumped Emacs.  Obviously it does need to be (re)computed at
startup (since your $HOME was not know when Emacs was dumped), but we do
that at the very beginning before processing `--eval` or loading
init files.  For your case to work properly, we'd need to delay the
(re)computation of `package-user-directory` to do it more lazily.

It doesn't seem impossible to do, but it might be tricky and risks
introducing other problems.

You can workaround the problem by explicitly calling

    (custom-reevaluate-setting 'package-user-directory)

after you've set `user-emacs-directory`.


        Stefan






      parent reply	other threads:[~2022-05-27 12:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26 11:07 bug#55655: 28.1; package.el no longers respects `user-emacs-directory' Shitikanth
2022-05-26 11:49 ` Eli Zaretskii
2022-05-26 13:19   ` Shitikanth
2022-05-26 13:55     ` Eli Zaretskii
2022-05-26 15:29 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-27  5:10   ` Shitikanth
2022-05-27  5:39     ` Visuwesh
2022-05-27  6:03       ` Shitikanth
2023-09-13  1:40         ` Stefan Kangas
2022-05-27 12:29     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [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=jwvo7zjgogo.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=55655@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=shitikanth1@gmail.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.