From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Documentation for custom-file - is not (load custom-file) needed? Date: Mon, 13 Dec 2004 11:01:12 +0200 Organization: JURTA Message-ID: <87brcyk39w.fsf@jurta.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> <87653am6wd.fsf-monnier+emacs@gnu.org> <00e301c4dee7$283b19b0$0200a8c0@sedrcw11488> <200412130349.iBD3nMQ21137@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1102928914 30146 80.91.229.6 (13 Dec 2004 09:08:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Dec 2004 09:08:34 +0000 (UTC) Cc: lennart.borgman.073@student.lu.se, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 13 10:08:27 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 1CdmBv-0008Ra-00 for ; Mon, 13 Dec 2004 10:08:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CdmM0-0006tG-GU for ged-emacs-devel@m.gmane.org; Mon, 13 Dec 2004 04:18:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CdmKu-0006sg-IL for emacs-devel@gnu.org; Mon, 13 Dec 2004 04:17:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CdmKt-0006sO-9i for emacs-devel@gnu.org; Mon, 13 Dec 2004 04:17:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CdmKt-0006s9-2W for emacs-devel@gnu.org; Mon, 13 Dec 2004 04:17:43 -0500 Original-Received: from [194.126.101.100] (helo=MXR-4.estpak.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CdmAX-00040k-Kt for emacs-devel@gnu.org; Mon, 13 Dec 2004 04:07:02 -0500 Original-Received: from mail.neti.ee (80-235-34-66-dsl.mus.estpak.ee [80.235.34.66]) by MXR-4.estpak.ee (Postfix) with ESMTP id 856B5D5070; Mon, 13 Dec 2004 11:06:15 +0200 (EET) Original-To: Luc Teirlinck In-Reply-To: <200412130349.iBD3nMQ21137@raven.dms.auburn.edu> (Luc Teirlinck's message of "Sun, 12 Dec 2004 21:49:22 -0600 (CST)") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at neti.ee 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:31061 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31061 Luc Teirlinck writes: > One solution might be to tell the user who customizes in .emacs and > for some reason needs to load the file in .emacs instead of after > it, to do: > > (setq custom-file "~/emacs/lisp/custom-21.4.el") > (load custom-file) There are situations where this is meaningless. For example, the user might have a file, only small part of which is the `custom-set-variables' list: (setq custom-file "~/emacs/lisp/.emacs-21.4.el") (add-to-list 'load-path "~/emacs/lisp/") (load ".emacs-21.4.el") For the user there are two separate issues here: setting the file name where customize will save customized variables, and loading a file with user settings (i.e. an init file like ~/.emacs, but in another location). `(load custom-file)' would not make sense here. Moreover, when the user will change the value of (setq custom-file ...) the file with other settings will not be loaded anymore. There should be a reliable way to detect if the file with `custom-set-variables' was really loaded, and not to load it twice. With `custom-files' set inside `custom-set-variables' to `load-file-name' this is easy: (member custom-file custom-files) means it was loaded. -- Juri Linkov http://www.jurta.org/emacs/