From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jay Finger" Newsgroups: gmane.emacs.devel Subject: RE: $HOME default on w32 Date: Wed, 27 Oct 2004 10:14:29 -0700 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <20041027171430.KRZX22257.out007.verizon.net@muskrat> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1098897357 12633 80.91.229.6 (27 Oct 2004 17:15:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Oct 2004 17:15:57 +0000 (UTC) Cc: ''Kai Grossjohann' ' , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 27 19:15:33 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CMrOW-0003Iz-00 for ; Wed, 27 Oct 2004 19:15:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CMrWH-0003Pa-7V for ged-emacs-devel@m.gmane.org; Wed, 27 Oct 2004 13:23:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CMrW8-0003OK-Nj for emacs-devel@gnu.org; Wed, 27 Oct 2004 13:23:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CMrW7-0003Nf-3f for emacs-devel@gnu.org; Wed, 27 Oct 2004 13:23:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CMrW6-0003Mq-MY for emacs-devel@gnu.org; Wed, 27 Oct 2004 13:23:22 -0400 Original-Received: from [206.46.170.107] (helo=out007.verizon.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CMrNX-0006Dd-Qd for emacs-devel@gnu.org; Wed, 27 Oct 2004 13:14:32 -0400 Original-Received: from muskrat ([4.15.136.159]) by out007.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20041027171430.KRZX22257.out007.verizon.net@muskrat>; Wed, 27 Oct 2004 12:14:30 -0500 Original-To: "'Stefan Monnier'" , "'Stephan Stahl'" X-Mailer: Microsoft Office Outlook, Build 11.0.6353 In-reply-to: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcS8JOr1lUouheo4SBa8y82b2P3xgwAG1FHQ X-Authentication-Info: Submitted using SMTP AUTH at out007.verizon.net from [4.15.136.159] at Wed, 27 Oct 2004 12:14:30 -0500 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29062 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29062 Stefan, I agree with your summary of what the two scenarios are. CSIDL_PERSONAL (i.e. My Documents) is per-user. By default this is equal to "$USERPROFILE\My Documents". On networked systems My Documents is often redirected to a user-specific location on the network so that users can have one directory of data. The system also does sync'ing so that when offline (e.g. the laptop is not on the network) the data is still available. CSIDL_PERSONAL wouldn't be set to have multiple users pointing at one directory unless an admin really wanted that, in which case I think it would be ok if emacs followed that. So I think CSIDL_PERSONAL would meet both 1 and 2. Just to confuse the issue a little:-) there are two others that you might want to consider, but I don't think they're correct for $HOME. CSIDL_APPDATA is application specific data (e.g. where an app might save it's own metadata that users aren't entirely aware of). For example, Microsoft Outlook saves some user settings in CSIDL_APPDATA\Microsoft\Outlook\... This directory is by default at "$USERPROFILE\Application Data", but may roam with the user from machine to machine. In other words, it is user specific, but might not be machine specific. There is also CSIDL_LOCAL_APPDATA. It is similar to CSIDL_APPDATA, but with the promise that it will not roam. In other words it is both user-specific and machine-specific. So, if emacs was trying to get a "Designed for Microsoft Windows XP" logo :-) it might make sense for some things like saved window configuration or location of backup files to go into CSIDL_APPDATA\GNU\Emacs\... Personally, I think that $HOME (~) should be CSIDL_PERSONAL, and that's good enough for now. jay > -----Original Message----- > From: Stefan Monnier [mailto:monnier@iro.umontreal.ca] > Sent: Wednesday, October 27, 2004 5:59 AM > To: Stephan Stahl > Cc: Jay Finger; 'Kai Grossjohann' ; emacs-devel@gnu.org > Subject: Re: $HOME default on w32 > > >> So what the difference between the two (conceptually) ? > >> Which one should we use ? > >> What does it mean if $USERPROFILE points to C:/foo/bar and > CSIDL_PERSONAL > >> points to U:/toto/titi ? What kind of file should go where ? > > > As far as i understand it $USERPROFILE points to the place where the > > system puts the user files.. (directories like "Cookies", > > "Favorites", "Start Menu"). > > While "My Documents" holds the users own files. > > > FWIW i use "My Documents" as $HOME because it is the most accessible > > place when working with windowze. Every filedialog has an item "My > > Documents", the second folder in the windowze file explorer is "My > > Documents". > > So there are two issues w.r.t $HOME: > 1 - $HOME is used for convenience so the user can access his files with > the > ~ shorthand. > 2 - $HOME is used to find user-specific (as opposed to global) settings in > files such as ~/.emacs. > > Number 2 tells us $HOME should be set to $USERPROFILE whereas number 1 > would > tend to prefer CSIDL_PERSONAL. > > I find number 2 much more important, so I stick to my original idea. > > > Stefan