unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [h-e-w] Re: Emacs-21.3-5 msi installer
@ 2005-05-05  2:43 Robinows
  0 siblings, 0 replies; only message in thread
From: Robinows @ 2005-05-05  2:43 UTC (permalink / raw)
  Cc: rdieter


[-- Attachment #1.1: Type: text/plain, Size: 1512 bytes --]

 
>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"},


[-- Attachment #1.2: Type: text/html, Size: 3070 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-05  2:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-05  2:43 [h-e-w] Re: Emacs-21.3-5 msi installer Robinows

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).