From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Documentation for custom-file - is not (load custom-file) needed? Date: Fri, 10 Dec 2004 12:05:02 -0500 Message-ID: <87653am6wd.fsf-monnier+emacs@gnu.org> References: <075b01c4d9a4$52799460$0200a8c0@sedrcw11488> <00bb01c4daee$5eb81350$0200a8c0@sedrcw11488> <200412051733.iB5HXIX13206@raven.dms.auburn.edu> <000001c4db1a$8d3770f0$0200a8c0@sedrcw11488> <200412060046.iB60kZj15003@raven.dms.auburn.edu> <003e01c4db31$e45a2550$0200a8c0@sedrcw11488> <200412060402.iB6421q15173@raven.dms.auburn.edu> <200412070539.iB75dV924747@raven.dms.auburn.edu> <200412090220.iB92KHR16407@raven.dms.auburn.edu> <874qiusno3.fsf@jurta.org> <00d101c4ded0$37cad4e0$0200a8c0@sedrcw11488> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1102698371 30672 80.91.229.6 (10 Dec 2004 17:06:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2004 17:06:11 +0000 (UTC) Cc: Juri Linkov , teirllm@dms.auburn.edu, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 10 18:06:01 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 1CcoDQ-0006Iy-00 for ; Fri, 10 Dec 2004 18:06:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CcoNO-0003Nx-7i for ged-emacs-devel@m.gmane.org; Fri, 10 Dec 2004 12:16:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CcoMy-0003NC-Az for emacs-devel@gnu.org; Fri, 10 Dec 2004 12:15:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CcoMw-0003MW-Ns for emacs-devel@gnu.org; Fri, 10 Dec 2004 12:15:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CcoMw-0003MC-Fy for emacs-devel@gnu.org; Fri, 10 Dec 2004 12:15:50 -0500 Original-Received: from [209.226.175.93] (helo=tomts36-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CcoCQ-0001YE-1m for emacs-devel@gnu.org; Fri, 10 Dec 2004 12:04:58 -0500 Original-Received: from alfajor ([67.71.27.115]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20041210170457.EKPM1694.tomts36-srv.bellnexxia.net@alfajor>; Fri, 10 Dec 2004 12:04:57 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id E03ACD730B; Fri, 10 Dec 2004 12:05:02 -0500 (EST) Original-To: "Lennart Borgman" In-Reply-To: <00d101c4ded0$37cad4e0$0200a8c0@sedrcw11488> (Lennart Borgman's message of "Fri, 10 Dec 2004 16:51:06 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) 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: main.gmane.org gmane.emacs.devel:30978 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30978 W.r.t removing custom-file: some users may set custom-file in their .emacs and expect it to do something, so we may as well keep it. >> 2. `custom-set-variables' (a function call with saved customized >> values in its argument which is stored in one of the user init files) >> will record the names of the files where it was loaded from, when it >> is called during loading. It will read the value of the variable >> `load-file-name' during its loading. > Agree, but: As I pointed out earlier I think that if an eval is beeing done > then (buffer-file-name) should be used instead. This gives the same file > name as load-file-name would have given during load. The reason is that I > think this makes it easier to change "custom file". I'd rather not try to be too clever. After all, when moving the custom file, you need to tell future Emacsen where it'll be, so you need to change your .emacs to either (setq custom-file "newfile") or (load "newfile"). Just M-C-x won't cut it. I suggest we do this slowly and progressively. E.g. we can start by making custom-file a defvar (the current defcustom is just misleading since you can't really customize it meaningfully). Then we can introduce the custom-files thingy that uses load-file-name to keep track of where things are saved. This would at first only be used to detect strange situations and warn the user about it. After that, we can start thinking again what it is exactly that we want and how to get it. Stefan