emacs-devel
[Top][All Lists]
Advanced

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

Re: single init file/directory for windows and linux using version contr


From: CHENG Gao
Subject: Re: single init file/directory for windows and linux using version control svn or cvs
Date: Fri, 22 Sep 2006 10:41:52 +0800
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (windows-nt)

*On Thu, 21 Sep 2006 13:15:12 +0100
* Jason Rumney <address@hidden> climbed out of the dark hell and cried out:

> CHENG Gao wrote:
>> *On Wed, 20 Sep 2006 21:58:48 -0400 * Richard Stallman <address@hidden>
>> climbed out of the dark hell and cried out:
>>
>>   
>>> Emacs ought to recognize ~/.emacs.d/init.el, on any system, when it
>>> does not find .emacs. If this does not work on Windows, it is a bug.
>>> Could you confirm that that is what is happening to you?
>>>     
>> I use ~/.emacs.d/init.el under M$ Windoze and MacOSX, thus I can put
>> all Emacs related setting files in one ./emacs.d/ file. I confirm this
>> works well under two OSes above mentioned.
>>   
>
> The case found by the original poster is when $HOME is not set in the
> environment. In Emacs 22 we default to the user specific APPDATA system
> directory, but we first check that C:\.emacs and C:\_emacs do not exist,
> in case the user used a previous version of Emacs that defaulted to C:\.
> The original poster had created C:\.emacs.d\init.el, but we do not check
> for this file when deciding whether to default to the old HOME location,
> since it is only supported since Emacs 22.

Personally I think HOME dir issue under M$ Windoze is over-addressed.
IIRC, there is no fallback dir for HOME under GNU/Linux and BSD, and
user always (and should) know where HOME is. Why Windoze is so special
that a (or even some) fallback dir(s) is(are) provided? Even Windoze
users should know where HOME is. I understand it may not be the case,
let alone IIRC different Windoze versions have different HOME. To
accomodate this complicated and inconsistent situation may make things
more complicated.

Maybe the clearer and simpler solution is to tell users to set HOME dir
explicitly in manual. If a user can not handle HOME thing, my suggestion
is DONT use Emacs. notepad.exe is better choice.

I set HOME to c:/cygwin/home/user, and in CMD shell:
C:\>set HOME
HOME=c:/cygwin/home/user
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\user
(M$ Windoze XP Home Edition SP 2)

Checking registry, under \\HKEY_CURRENT_USER\\Volatile Environment,
                                                <- Volatile! Good wording! 
there are environment vars like APPDATA, CLIENTNAME, HOMEDRIVE, HOMEPATH
etc., and if you check environment vars by
WIN key+Pause->Advanced->Environment Variables, you can not see any of
them. Windoze miracle!

For CVS Emacs (HEAD and unicode-2 branch), addpm.exe does not add any
registry item for new and fresh installation. It only updates registry
if they exist. So Emacs need no registry setting to work well. Why
should Emacs depend on registry items like HOMEPATH/APPDATA?

Sorry my comment is becoming too long and boring. I shut up now.






reply via email to

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