From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: CHENG Gao Newsgroups: gmane.emacs.devel 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 Organization: eqiao.com Message-ID: References: <45128250.8090009@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: sea.gmane.org 1158893021 28652 80.91.229.2 (22 Sep 2006 02:43:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 22 Sep 2006 02:43:41 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 22 04:43:39 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GQb0p-0004yr-8h for ged-emacs-devel@m.gmane.org; Fri, 22 Sep 2006 04:43:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GQb0o-0000uV-CM for ged-emacs-devel@m.gmane.org; Thu, 21 Sep 2006 22:43:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GQb0b-0000u8-Qq for emacs-devel@gnu.org; Thu, 21 Sep 2006 22:43:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GQb0Z-0000tw-EE for emacs-devel@gnu.org; Thu, 21 Sep 2006 22:43:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GQb0Z-0000tt-9C for emacs-devel@gnu.org; Thu, 21 Sep 2006 22:43:19 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GQb4C-0006uf-W8 for emacs-devel@gnu.org; Thu, 21 Sep 2006 22:47:05 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GQb0L-0004uI-Mc for emacs-devel@gnu.org; Fri, 22 Sep 2006 04:43:06 +0200 Original-Received: from 58.217.207.68 ([58.217.207.68]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Sep 2006 04:43:05 +0200 Original-Received: from chenggao by 58.217.207.68 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Sep 2006 04:43:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 59 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 58.217.207.68 User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (windows-nt) Cancel-Lock: sha1:kHh+dVgog53mBFuKaYNUnM5gQGE= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60084 Archived-At: *On Thu, 21 Sep 2006 13:15:12 +0100 * Jason Rumney climbed out of the dark hell and cried out: > CHENG Gao wrote: >> *On Wed, 20 Sep 2006 21:58:48 -0400 * Richard Stallman >> 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.