[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] Invoking Emacs from a "temporary environment"

From: Dani Moncayo
Subject: [h-e-w] Invoking Emacs from a "temporary environment"
Date: Mon, 30 Dec 2013 15:44:59 +0100


I'm on a Windows 8 machine, and I'd like to invoke Emacs from a
temporary environment that sets the HOME variable to the directory I
want (because I don't want to set that variable at system level).

This approach work when I start an interactive cmd console and do:
  set HOME=C:\whatever

But if I try to do everything with this single command (intended for
the target of a shortcut):
   cmd /C "set HOME=C:\whatever &&  C:\path\to\runemacs.exe"

I see an Emacs session with a *Warnings* buffer and this text inside:
  Warning (initialization): Unable to create `user-emacs-directory'
  Any data that would normally be written there may be lost!
  If you never want to see this message again,
  customize the variable `user-emacs-directory-warning'.

Also, I observe that that Emacs session hasn't taken the configuration
I have under "C:\whatever", even though "C-x d ~/ <RET>" shows the
contents of "C:\whatever".

I've also tried this command:
  cmd /C "set HOME=C:\whatever &&  set"

and I see that the last "set" shows a HOME environment variable with a
value of "C:\whatever", as expected.

So, why doesn't Emacs do the right thing when invoked that way?  Any
idea what's going on here?


Dani Moncayo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]