From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dani Moncayo Newsgroups: gmane.emacs.bugs Subject: bug#8221: 24.0.50; Allowed names for the init file. Windows/POSIX inconsistency Date: Fri, 11 Mar 2011 09:26:20 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1299832635 8157 80.91.229.12 (11 Mar 2011 08:37:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Mar 2011 08:37:15 +0000 (UTC) Cc: 8221@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 11 09:37:10 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PxxqP-0005YL-OF for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Mar 2011 09:37:10 +0100 Original-Received: from localhost ([127.0.0.1]:55721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxxqO-00034w-IM for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Mar 2011 03:37:08 -0500 Original-Received: from [140.186.70.92] (port=47704 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxxqF-00034M-Fa for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2011 03:37:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxxqC-0008My-J5 for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2011 03:36:58 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxxqC-0008Ms-Bh for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2011 03:36:56 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Pxxgc-0004H5-5z; Fri, 11 Mar 2011 03:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dani Moncayo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Mar 2011 08:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8221 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: Original-Received: via spool by 8221-submit@debbugs.gnu.org id=B8221.129983198916381 (code B ref 8221); Fri, 11 Mar 2011 08:27:02 +0000 Original-Received: (at 8221) by debbugs.gnu.org; 11 Mar 2011 08:26:29 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pxxg4-0004GA-S4 for submit@debbugs.gnu.org; Fri, 11 Mar 2011 03:26:29 -0500 Original-Received: from mail-yw0-f44.google.com ([209.85.213.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pxxg2-0004Fy-Kb for 8221@debbugs.gnu.org; Fri, 11 Mar 2011 03:26:27 -0500 Original-Received: by ywi6 with SMTP id 6so1131365ywi.3 for <8221@debbugs.gnu.org>; Fri, 11 Mar 2011 00:26:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=/PJA9N6ELnIXgOLcWY7J8beqTPC8T4J1HimF9ueWBDE=; b=pt31+g8bWV8FlwiOfCbwZ9ymGxsny70I5/lZsNLMqLXq8By6mwPP941HFx9eRHREY4 HF0C1yZh9ltEQ/qna2YbMklumQx4fm2PLDaFmV1UP7c2iwPepsicS1gGn2NV2Awmy8Xg ACyfr/WwyUqI/lveg/skI0Jfw2iiPwyByajQA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=OG/XFxbnsCXKunYGNrinsgvrz8kMIucwMlq43IPNJdanXwd2knBR6UIivjazcRlGCE 2W6QFLvFDnaHwHQTlHX/XOKHudMzUupM4CZAoOVmmNWjmOG5PW+vnRUyai2WaVzF3gcY YVqnQIexHbUDF77Sx3IhqTwcPwH6VcT53eT54= Original-Received: by 10.236.62.193 with SMTP id y41mr2127012yhc.4.1299831980992; Fri, 11 Mar 2011 00:26:20 -0800 (PST) Original-Received: by 10.90.78.4 with HTTP; Fri, 11 Mar 2011 00:26:20 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 11 Mar 2011 03:27:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:44913 Archived-At: Hi Juanma, On Fri, Mar 11, 2011 at 03:49, Juanma Barranquero wrote: > On Fri, Mar 11, 2011 at 00:35, Dani Moncayo wrote: > >> On one hand, it doesn't seem to be the documented behavior in the node >> "Windows HOME" of the manual. It refers to the init file as `.emacs', >> and says nothing about possible alternatives. > > The alternatives are documented on "53.6 The Init File, `~/.emacs'"; > there's no need to duplicate it on "G.5 HOME and Startup Directories > on MS-Windows". > Indeed, that is the node which explains the alternatives, and of course I agree that such info shouldn't be duplicated in any other node of the Manual. Instead of duplicating, the others nodes (IMO) should refer to the init file as `init file' (maybe giving a link to the suitable node), but not as `.emacs', as we currently have in node "Windows HOME". >> On the other hand, and according to the same info node, C:\ is checked >> as one possible "home" directory. > > I think you're reading more that the info node says. What it says is > that Emacs is looking for HOME (the environment variable) and if it > finds it, it looks there for the "init file". If that fails, it looks > for ".emacs" in C:\; and if that fails, it looks for the AppData dir > (which is an alternative to HOME, not to C:\). So it is clear (if a > bit inconsistent) that looking for .emacs (specifically) on C:\ > (specifically) is something done just because of back compatibility. > Yes, I got a bit confused about the exact procedure. Maybe I was somewhat biased, but IMO the current wording is a bit confusing: > The home directory is where your init file `.emacs' is stored. When > Emacs starts, it first checks whether the environment variable `HOME' > is set. If it is, it looks for the init file in the directory pointed > by `HOME'. If `HOME' is not defined, Emacs checks for an existing > `.emacs' file in `C:\', the root directory of drive `C:'(1). If > there's no such file in `C:\', Emacs next uses the Windows system calls > to find out the exact location of your application data directory. If > that system call fails, Emacs falls back to `C:\'. That made me think that the principle was (a) Try to find a suitable init file in several directories, and (b) Once an init file is found, the "home" directory is thereafter established accordingly. Thus, I suggest to revise the wording in that node, to avoid this confusion. >> Thus, init files such as >> "C:\.emacs.el" or "C:\.emacs.d\init.el" should be valid ones. But I've >> just tested those two and Emacs don't find them. > > If you ask me, not even C:\.emacs should be valid; "set HOME=C:\" > should be required for that. > I agree, because IMO the init file should always be user-specific, and C:\ isn't a user-specific directory. -- Dani Moncayo