* bug#15539: Fwd: bug#15539: [PATCH] Setting user-emacs-directory
[not found] <CAADsv97dLVFXvGXFRv-L+nZN9rsAoLRsWOdbcabz7quK3EozMA@mail.gmail.com>
@ 2016-03-24 19:21 ` François Févotte
2016-03-27 0:37 ` John Wiegley
0 siblings, 1 reply; 3+ messages in thread
From: François Févotte @ 2016-03-24 19:21 UTC (permalink / raw)
To: 15539
Dear Emacs developers,
sorry for the late reaction: I thought I was subscribed to this bug, but I
somehow wasn't and only just saw last month's discussions.
I fully understand that putting yet another knob in Emacs implies an added
complexity which is not necessarily desirable. However, I would like to
emphasize that the proposed patch does not "change a well-established
constant". People not wanting to know about this new behavior will never see
any change. And I would expect that any user explicitly setting an
`EMACS_USER_DIRECTORY' environment variable know what they are doing.
Also, below is a list of methods (that I know of) which can help users start
Emacs with an initialization file in a custom location. None of them are
flawless, which justifies IMHO the introduction of a feature like the one
proposed here. But even if you still find that there is no real need for such a
feature (which would be perfectly fine by me), at least this list might help
future users stumbling on this bug report...
* Method 1 (as mentioned by Eli Zaretskii above): set the HOME environment
variable.
This works well, and can even be set on a per-process basis, which is a
desirable feature IMO. This method however has potentially unwelcome side
effects, mainly related to the fact that $HOME is used in a lot of different
contexts, unrelated to the Emacs startup process. In particular:
- All processes launched from within Emacs will inherit this setting. This can
easily be avoided be re-setting HOME to its normal value in
`process-environment' within Emacs.
- All paths beginning with `~/' will be expanded to the "fake" HOME directory,
which can be confusing. One can reset the HOME environment variable from
within Emacs using `setenv' to avoid that. But then problems can arise since
`user-emacs-directory' itself is by default "~/.emacs.d".
* Method 2: set a symbolic link from ~/.emacs.d to somewhere else.
This method is mainly useful to help quickly switch between different profiles
by having the symlink point to one of several possible directories.
It's very easy
to set up (which is why many users seem to do it), but has the main drawback
that multiple Emacs instances running concurrently must all share the same
user directory.
* Method 3: run `emacs -q -l SOMEWHERE/init.el'
The initialization file located SOMEWHERE/init.el can then set things up
correctly like this:
(setq user-init-file (or load-file-name (buffer-file-name)))
(setq user-emacs-directory (file-name-directory user-init-file))
Like the first method above, this one works on a per-process basis and one can
run different instances of Emacs using different user directories.
The main drawback of this approach is that it entirely bypasses the normal
startup process. Things like `emacs-init-time', `after-init-hook',
`initial-major-mode' (list is not exhaustive) don't work as expected.
Again, I you feel like the added complexity is not worth the extra flexibility
for users, that's fine by me. Just ignore my message and leave the bug closed.
Cheers,
François
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#15539: Fwd: bug#15539: [PATCH] Setting user-emacs-directory
2016-03-24 19:21 ` bug#15539: Fwd: bug#15539: [PATCH] Setting user-emacs-directory François Févotte
@ 2016-03-27 0:37 ` John Wiegley
2016-03-27 9:46 ` François Févotte
0 siblings, 1 reply; 3+ messages in thread
From: John Wiegley @ 2016-03-27 0:37 UTC (permalink / raw)
To: François Févotte; +Cc: 15539
[-- Attachment #1: Type: text/plain, Size: 884 bytes --]
>>>>> François Févotte <francois.fevotte@ensta.org> writes:
> Again, I you feel like the added complexity is not worth the extra
> flexibility for users, that's fine by me. Just ignore my message and leave
> the bug closed.
I'd personally like to avoid the extra complexity. One can always specify
one's init file directly, change `user-emacs-directory' immediately upon load,
and then manually alter the load path. So, it's not that you *can't* make
dynamically variable initialization directories, it's just not *convenient*.
That being the case, unless more users request this, I think we'd be solving a
problem most people aren't sensitive to, while those few who are DO have a way
to address their needs.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 629 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#15539: Fwd: bug#15539: [PATCH] Setting user-emacs-directory
2016-03-27 0:37 ` John Wiegley
@ 2016-03-27 9:46 ` François Févotte
0 siblings, 0 replies; 3+ messages in thread
From: François Févotte @ 2016-03-27 9:46 UTC (permalink / raw)
To: John Wiegley; +Cc: 15539
> I'd personally like to avoid the extra complexity.
OK, thanks a lot for the answer. I'll keep using manual solutions to
circumvent this issue, and maybe try to provide somewhere
semi-automated ways to do this to help other users who might have the
same needs.
And also thanks for all your work on Emacs.
Cheers,
François
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-27 9:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAADsv97dLVFXvGXFRv-L+nZN9rsAoLRsWOdbcabz7quK3EozMA@mail.gmail.com>
2016-03-24 19:21 ` bug#15539: Fwd: bug#15539: [PATCH] Setting user-emacs-directory François Févotte
2016-03-27 0:37 ` John Wiegley
2016-03-27 9:46 ` François Févotte
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).