unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ~/.emacs vs ~/.emacs.d/init.el
@ 2007-06-13 10:00 Juanma Barranquero
  2007-06-13 17:28 ` Eli Zaretskii
  2007-06-21 18:54 ` Davis Herring
  0 siblings, 2 replies; 7+ messages in thread
From: Juanma Barranquero @ 2007-06-13 10:00 UTC (permalink / raw)
  To: Emacs Devel

With the recent introduction of `user-emacs-directory', I've been
wondering... Could someone please clarify the relation between these
things:

 --user                   (option for Emacs)
  init-file-user
  ~/.emacs.                (also _emacs, .emacs.el, _emacs.el)
  ~USER/.emacs             (is that possible on Windows?)
  ~/.emacs.d/init.el
  ~USER/.emacs.d/init.el   (is that possible at all?)

I've read the info nodes "Init File", "Find Init" and "Initial
Options"; I've also looked at the code. I'm still not sure whether

  emacs --user=another

should make ~another/.emacs.d/init.el possible, though the code
suggests that the answer is not (~/.emacs.d/ was hardcoded, and
`user-emacs-directory' does not change that), and I'm not sure why
(conceptually speaking).

             Juanma

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ~/.emacs vs ~/.emacs.d/init.el
  2007-06-13 10:00 ~/.emacs vs ~/.emacs.d/init.el Juanma Barranquero
@ 2007-06-13 17:28 ` Eli Zaretskii
  2007-06-13 17:34   ` Juanma Barranquero
  2007-06-21 18:54 ` Davis Herring
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2007-06-13 17:28 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel

> Date: Wed, 13 Jun 2007 12:00:32 +0200
> From: "Juanma Barranquero" <lekktu@gmail.com>
> 
>   ~USER/.emacs             (is that possible on Windows?)

No, we don't support ~USER on Windows yet (although it can be done on
the Windows versions since W2K).  Volunteers welcome.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ~/.emacs vs ~/.emacs.d/init.el
  2007-06-13 17:28 ` Eli Zaretskii
@ 2007-06-13 17:34   ` Juanma Barranquero
  2007-06-13 17:53     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Juanma Barranquero @ 2007-06-13 17:34 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On 6/13/07, Eli Zaretskii <eliz@gnu.org> wrote:

> No, we don't support ~USER on Windows yet (although it can be done on
> the Windows versions since W2K).  Volunteers welcome.

I wouldn't dismiss the idea of implementing it myself, once the task
is clear enough.

What about my other questions? Should --user=myuser influence whether
init.el is found (I mean, ~myuser/.emacs.d/init.el), or is ~/.emacs.d/
always valid only for the current user?

             Juanma

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ~/.emacs vs ~/.emacs.d/init.el
  2007-06-13 17:34   ` Juanma Barranquero
@ 2007-06-13 17:53     ` Eli Zaretskii
  2007-06-13 17:57       ` Juanma Barranquero
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2007-06-13 17:53 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel

> Date: Wed, 13 Jun 2007 19:34:00 +0200
> From: "Juanma Barranquero" <lekktu@gmail.com>
> Cc: emacs-devel@gnu.org
> 
> On 6/13/07, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > No, we don't support ~USER on Windows yet (although it can be done on
> > the Windows versions since W2K).  Volunteers welcome.
> 
> I wouldn't dismiss the idea of implementing it myself, once the task
> is clear enough.

The task is to map ~USER to

  C:/Documents and Settings/USER/Application Data

For this, we need to extend w32.c:getpwnam to support not just the
current user, but also the other users on the local machine (ask me
about the relevant Windows APIs if you need help finding them), and
then it should Just Work (the actuall expansion happens in
expand-file-name and other similar primitives defined on fileio.c).

> What about my other questions? Should --user=myuser influence whether
> init.el is found (I mean, ~myuser/.emacs.d/init.el), or is ~/.emacs.d/
> always valid only for the current user?

I don't have anything intelligent to say on that, I'm confused myself.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ~/.emacs vs ~/.emacs.d/init.el
  2007-06-13 17:53     ` Eli Zaretskii
@ 2007-06-13 17:57       ` Juanma Barranquero
  0 siblings, 0 replies; 7+ messages in thread
From: Juanma Barranquero @ 2007-06-13 17:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On 6/13/07, Eli Zaretskii <eliz@gnu.org> wrote:

> The task is to map ~USER to
>
>   C:/Documents and Settings/USER/Application Data
>
> For this, we need to extend w32.c:getpwnam to support not just the
> current user, but also the other users on the local machine (ask me
> about the relevant Windows APIs if you need help finding them), and
> then it should Just Work (the actuall expansion happens in
> expand-file-name and other similar primitives defined on fileio.c).

OK, I'll put this issue in my ToDo list.

> I don't have anything intelligent to say on that, I'm confused myself.

Glad to know I'm in good company, then ;-)

             Juanma

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ~/.emacs vs ~/.emacs.d/init.el
  2007-06-13 10:00 ~/.emacs vs ~/.emacs.d/init.el Juanma Barranquero
  2007-06-13 17:28 ` Eli Zaretskii
@ 2007-06-21 18:54 ` Davis Herring
  2007-06-21 19:18   ` Juanma Barranquero
  1 sibling, 1 reply; 7+ messages in thread
From: Davis Herring @ 2007-06-21 18:54 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs Devel

> I've read the info nodes "Init File", "Find Init" and "Initial
> Options"; I've also looked at the code. I'm still not sure whether
>
>   emacs --user=another
>
> should make ~another/.emacs.d/init.el possible, though the code
> suggests that the answer is not (~/.emacs.d/ was hardcoded, and
> `user-emacs-directory' does not change that), and I'm not sure why
> (conceptually speaking).

It certainly should!  --user picks a _directory_ (the home directory of a
user), and .emacs, .emacs.d/init.el, etc. are all conceptually relative
filenames in that directory.  I hate to duplicate the
`user-emacs-directory' variable (or whatever it ends up being called), but
those filenames should really get `expand-file-name'd against a home
directory chosen by that option (or by $HOME otherwise).

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ~/.emacs vs ~/.emacs.d/init.el
  2007-06-21 18:54 ` Davis Herring
@ 2007-06-21 19:18   ` Juanma Barranquero
  0 siblings, 0 replies; 7+ messages in thread
From: Juanma Barranquero @ 2007-06-21 19:18 UTC (permalink / raw)
  To: herring; +Cc: Emacs Devel

On 6/21/07, Davis Herring <herring@lanl.gov> wrote:

> It certainly should!  --user picks a _directory_ (the home directory of a
> user), and .emacs, .emacs.d/init.el, etc. are all conceptually relative
> filenames in that directory.

Yes, that's my interpretation, too. But ~/.emacs.d/ appeared at least
seven years ago (there's a reference in the ChangeLog from
2000-04-24). It's hard to believe nobody has worried about -u in all
that time. <conspiranoia>Something Else Is At Work...</conspiranoia>

> I hate to duplicate the
> `user-emacs-directory' variable (or whatever it ends up being called), but
> those filenames should really get `expand-file-name'd against a home
> directory chosen by that option (or by $HOME otherwise).

The Function Without a Name can take care of that easily, I think.

             Juanma

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-06-21 19:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-13 10:00 ~/.emacs vs ~/.emacs.d/init.el Juanma Barranquero
2007-06-13 17:28 ` Eli Zaretskii
2007-06-13 17:34   ` Juanma Barranquero
2007-06-13 17:53     ` Eli Zaretskii
2007-06-13 17:57       ` Juanma Barranquero
2007-06-21 18:54 ` Davis Herring
2007-06-21 19:18   ` Juanma Barranquero

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).