all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* $USERPROFILE for $HOME on W32
@ 2004-11-22  6:26 Stefan Monnier
  2004-11-22  8:44 ` Jason Rumney
                   ` (2 more replies)
  0 siblings, 3 replies; 35+ messages in thread
From: Stefan Monnier @ 2004-11-22  6:26 UTC (permalink / raw)



To follow up on the thread, here is a suggested patch.
Any objection?
If anybody wants to install it (with or without adjustments), please feel
free to do it: I'd rather not spend any more time on this.


        Stefan


--- startup.el	17 oct 2004 18:58:12 -0400	1.333
+++ startup.el	22 nov 2004 01:23:05 -0500	
@@ -340,6 +340,14 @@
   (if command-line-processed
       (message "Back to top level.")
     (setq command-line-processed t)
+    ;; On W32, try to use $USERPROFILE if $HOME isn't properly set.
+    (when (and (memq system-type '(windows-nt))
+	       (equal (getenv "HOME") "C:/")
+	       (not (file-exists-p "~/.emacs"))
+	       (not (file-exists-p "~/_emacs"))
+	       (getenv "USERPROFILE")
+	       (file-writable-p (getenv "USERPROFILE")))
+      (setenv "HOME" (getenv "USERPROFILE")))
     ;; Give *Messages* the same default-directory as *scratch*,
     ;; just to keep things predictable.
     (let ((dir default-directory))

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2004-12-06 23:17 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-22  6:26 $USERPROFILE for $HOME on W32 Stefan Monnier
2004-11-22  8:44 ` Jason Rumney
2004-11-22 13:04   ` Stefan Monnier
2004-11-25 16:00   ` Stefan Monnier
2004-11-25 16:34     ` Jason Rumney
2004-11-25 16:54       ` Stefan
2004-11-25 21:52         ` Eli Zaretskii
2004-11-25 22:46           ` Jason Rumney
2004-11-26 10:32             ` Eli Zaretskii
2004-11-25 16:57     ` Andreas Schwab
2004-11-25 17:45       ` Stefan
2004-11-25 17:49         ` Andreas Schwab
2004-11-25 21:45         ` Eli Zaretskii
2004-11-26 20:56           ` Eli Zaretskii
2004-11-26 23:42             ` Andreas Schwab
2004-11-27  9:33               ` Eli Zaretskii
2004-11-27 13:26                 ` Andreas Schwab
2004-11-27 16:40                   ` Eli Zaretskii
2004-11-27 17:46                     ` Andreas Schwab
2004-11-25 22:04     ` Eli Zaretskii
2004-11-25 23:43       ` Stefan Monnier
2004-11-26 10:29         ` Eli Zaretskii
2004-11-26 14:47           ` Stefan Monnier
2004-11-26 20:50             ` Eli Zaretskii
2004-11-26 22:03               ` Stefan Monnier
2004-11-27 11:36                 ` Eli Zaretskii
2004-12-06 23:17   ` Lennart Borgman
2004-11-22 15:46 ` Eli Zaretskii
2004-11-22 16:47   ` Stefan Monnier
2004-11-23 11:49     ` Eli Zaretskii
2004-11-23  8:30   ` Jason Rumney
2004-11-23 11:32     ` Eli Zaretskii
2004-11-23 20:47       ` Jason Rumney
2004-11-23 20:57         ` Eli Zaretskii
2004-11-24  8:17 ` John Paul Wallington

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.