unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: CHENG Gao <chenggao@gmail.com>
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	[thread overview]
Message-ID: <u8xkcsjv3.fsf@news.eqiao.com> (raw)
In-Reply-To: 45128250.8090009@gnu.org

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

> CHENG Gao wrote:
>> *On Wed, 20 Sep 2006 21:58:48 -0400 * Richard Stallman <rms@gnu.org>
>> 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.

  parent reply	other threads:[~2006-09-22  2:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-19 23:09 single init file/directory for windows and linux using version control svn or cvs Patrick Drechsler
2006-09-20  3:24 ` Eli Zaretskii
2006-09-21 10:21   ` Patrick Drechsler
2006-09-20  7:49 ` Stefan Monnier
2006-09-21 10:23   ` Patrick Drechsler
2006-09-21  1:58 ` Richard Stallman
2006-09-21 10:25   ` Patrick Drechsler
2006-09-21 11:53   ` CHENG Gao
2006-09-21 12:15     ` Jason Rumney
2006-09-21 20:15       ` Richard Stallman
2006-09-22 12:39         ` Eli Zaretskii
2006-09-23  3:34           ` Richard Stallman
2006-09-23 10:26             ` Eli Zaretskii
2006-09-22  2:41       ` CHENG Gao [this message]
2006-09-22 12:46         ` Eli Zaretskii
2006-09-22 14:31           ` CHENG Gao
2006-09-23  9:57             ` Eli Zaretskii
2006-09-23 10:17         ` Jason Rumney
2006-09-21  2:51 ` Eric Hanchrow
2006-09-21 10:25   ` Patrick Drechsler

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u8xkcsjv3.fsf@news.eqiao.com \
    --to=chenggao@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 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).