From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robinows@aol.com Newsgroups: gmane.emacs.devel Subject: Re: [h-e-w] Re: Emacs-21.3-5 msi installer Date: Wed, 4 May 2005 22:43:36 EDT Message-ID: <5b.691a317b.2faae258@aol.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0447611388==" X-Trace: sea.gmane.org 1115261164 22402 80.91.229.2 (5 May 2005 02:46:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 May 2005 02:46:04 +0000 (UTC) Cc: rdieter@math.unl.edu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 05 04:46:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DTWN5-00010e-Qd for ged-emacs-devel@m.gmane.org; Thu, 05 May 2005 04:45:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTWUW-0007RA-Eo for ged-emacs-devel@m.gmane.org; Wed, 04 May 2005 22:53:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DTWSr-00075W-VE for emacs-devel@gnu.org; Wed, 04 May 2005 22:51:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DTWSh-0006yb-DJ for emacs-devel@gnu.org; Wed, 04 May 2005 22:51:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTWSc-0006sD-RC for emacs-devel@gnu.org; Wed, 04 May 2005 22:51:34 -0400 Original-Received: from [64.12.137.1] (helo=imo-m20.mx.aol.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DTWQ1-000858-J5 for emacs-devel@gnu.org; Wed, 04 May 2005 22:48:53 -0400 Original-Received: from Robinows@aol.com by imo-m20.mx.aol.com (mail_out_v38_r1.7.) id 7.5b.691a317b (3874); Wed, 4 May 2005 22:43:36 -0400 (EDT) Original-To: emacs-devel@gnu.org X-Mailer: 9.0 Security Edition for Windows sub 2170 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:36692 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36692 --===============0447611388== Content-Type: multipart/alternative; boundary="-----------------------------1115261016" -------------------------------1115261016 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit >>From help-emacs-windows (a discussion about a Windows installer): In a message dated 5/4/2005 6:57:24 P.M. Eastern Daylight Time, rdieter@math.unl.edu writes: Brian Elmegaard wrote: >> Works like a charm, Rex. >> >> I have the following suggestions to be put in default.el: >> (setenv "HOME" (getenv "USERPROFILE")) ; users will not have the root >> ; of C: as home >What if HOME is already set? >Wouldn't it be better to set HOME to %HOMEDRIVE%%HOMEPATH% (if >they're defined)? Of course, overwriting an existing HOME variable is a bad idea, but Brian has a point. Naive Windows users are not likely to have a HOME variable and in a corporate environment may not have write access to C:\. It seems to me the place to fix this is in Emacs, not in a third-party tool. Something like the patch below. This looks first for the HOME variable, then USERPROFILE (likely to be C:\Documents and Settings\%USERNAME% ), and then, as a last resort, C:/. One could get fancier by playing with the default value of "emacs_dir" or using %HOMEDRIVE% instead of C: --- w32.c.~1.90.~ 2005-02-16 21:28:51.296875000 -0500 +++ w32.c 2005-05-04 20:21:49.593750000 -0400 @@ -949,7 +949,8 @@ char * def_value; } env_vars[] = { - {"HOME", "C:/"}, + {"USERPROFILE", "C:/"}, + {"HOME", "%USERPROFILE%"}, {"PRELOAD_WINSOCK", NULL}, {"emacs_dir", "C:/emacs"}, {"EMACSLOADPATH", "%emacs_dir%/site-lisp;%emacs_dir%/../site-lisp;%emacs_dir%/lisp;%emacs_dir%/leim"}, -------------------------------1115261016 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable
From help-emacs-windows (a discussion about a Windows installer):
 
In a message dated 5/4/2005 6:57:24 P.M. Eastern Daylight Time,=20 rdieter@math.unl.edu writes:
Brian Elmegaard wrote:
>> Works like a charm, Rex.
&g= t;>=20
>> I have the following suggestions to be put in=20 default.el:
>> (setenv "HOME" (getenv "USERPROFILE"))  ; use= rs=20 will not have the root
>>           = ;=20                     &nbs= p;=20        ; of C: as home

>What if HOME is alre= ady=20 set?
>Wouldn't it be better to set HOME to %HOMEDRIVE%%HOMEPATH% (if= =20 >they're defined)?
Of course, overwriting an existing HOME variable is a bad i= dea,=20 but Brian has a point. Naive Windows users are not likely to have a HOME=20 variable and in a corporate environment may not have write access to=20 C:\.  It seems to me the place to fix this is in Emacs, not in a=20 third-party tool. Something like the patch below.
This looks first for the HOME variable, then USERPROFILE (likely to b= e=20 C:\Documents and Settings\%USERNAME% ), and then, as a last resort, C:/.
One could get fancier by playing with the default value of "emacs_dir= " or=20 using %HOMEDRIVE% instead of C:

 
--- w32.c.~1.90.~ 2005-02-16 21:28:51.296875000 -0500
+++=20 w32.c 2005-05-04 20:21:49.593750000 -0400
@@ -949,7 +949,8=20 @@
       char *=20 def_value;
     } env_vars[]=20 =3D
     {
-      {"HOME"= ,=20 "C:/"},
+      {"USERPROFILE",=20 "C:/"},
+      {"HOME",=20 "%USERPROFILE%"},
       {"PRELOAD_WINSOCK"= ,=20 NULL},
       {"emacs_dir",=20 "C:/emacs"},
       {"EMACSLOADPATH",=20 "%emacs_dir%/site-lisp;%emacs_dir%/../site-lisp;%emacs_dir%/lisp;%emacs_dir%= /leim"},
-------------------------------1115261016-- --===============0447611388== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --===============0447611388==--