From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: Use .emacs.d in savehist.el Date: Sun, 30 Oct 2005 20:14:15 -0500 Message-ID: References: <87u0f69ae6.fsf-monnier+emacs@gnu.org> <87oe5e977f.fsf@mahaena.lrde> <87oe5dapcz.fsf@mahaena.lrde> <87wtjxt1z8.fsf@stupidchicken.com> <87hdazbqnm.fsf@stupidchicken.com> <87pspn9kc0.fsf@stupidchicken.com> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1130721470 24578 80.91.229.2 (31 Oct 2005 01:17:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Oct 2005 01:17:50 +0000 (UTC) Cc: emacs-devel@gnu.org, snogglethorpe@gmail.com, michael.cadilhac@lrde.org, monnier@iro.umontreal.ca, miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 31 02:17:47 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EWOHb-0001nh-U2 for ged-emacs-devel@m.gmane.org; Mon, 31 Oct 2005 02:16:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EWOHb-0005fH-AF for ged-emacs-devel@m.gmane.org; Sun, 30 Oct 2005 20:16:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EWOFd-0004i2-TF for emacs-devel@gnu.org; Sun, 30 Oct 2005 20:14:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EWOFc-0004hR-Uq for emacs-devel@gnu.org; Sun, 30 Oct 2005 20:14:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EWOFc-0004hL-LB for emacs-devel@gnu.org; Sun, 30 Oct 2005 20:14:16 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EWOFc-0006o3-MW for emacs-devel@gnu.org; Sun, 30 Oct 2005 20:14:16 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1EWOFb-0006RP-QL; Sun, 30 Oct 2005 20:14:15 -0500 Original-To: Chong Yidong In-reply-to: <87pspn9kc0.fsf@stupidchicken.com> (message from Chong Yidong on Sun, 30 Oct 2005 08:59:43 -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: , 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:45149 Archived-At: ;; This tells `load' to store the file name found ;; into user-init-file. (setq user-init-file t) (load user-init-file-1 t t) If the `load' function succeeds, it automagically binds `user-init-file' to the loaded filename. I don't know why this was written this way, but maybe there is a reason? The reason is to record the actual name found, whether it be .emacs or .emacs.el, or whatever. We need the actual file name, not just something that we could pass to `load' and load the same file. Also, if you want to use this function for the init file, you would have to account for the "_emacs" dotfile name used on MS-DOS and MS-Windows. In particular, MS-Windows uses "~/.emacs" by default, but if that is not available it accepts "~/_emacs" as the dotfile. That particular case does seem to needs special code. It is no big deal if the one case of .emacs can't use the general function (but it would be nice if it could). Another note: it seems to me that most libraries that use ".emacs.d" look for it in "~". Would it make sense to extend the `init-file-user' variable so that the directory goes into (concat "~" init-file-user "/.emacs.d") Yes!