From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: Documentation for custom-file - is not (load custom-file) needed? Date: Fri, 10 Dec 2004 21:38:00 -0600 (CST) Message-ID: <200412110338.iBB3c0D10832@raven.dms.auburn.edu> 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> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1102736494 20835 80.91.229.6 (11 Dec 2004 03:41:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 11 Dec 2004 03:41:34 +0000 (UTC) Cc: juri@jurta.org, lennart.borgman.073@student.lu.se, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 11 04:41: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 1Ccy8M-00006l-00 for ; Sat, 11 Dec 2004 04:41:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CcyIL-0008HZ-3w for ged-emacs-devel@m.gmane.org; Fri, 10 Dec 2004 22:51:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CcyHx-0008Gc-2E for emacs-devel@gnu.org; Fri, 10 Dec 2004 22:51:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CcyHv-0008Fk-1k for emacs-devel@gnu.org; Fri, 10 Dec 2004 22:51:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CcyHu-0008EP-Q6 for emacs-devel@gnu.org; Fri, 10 Dec 2004 22:51:18 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ccy6w-0002wX-7t for emacs-devel@gnu.org; Fri, 10 Dec 2004 22:39:58 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id iBB3dpFu027152; Fri, 10 Dec 2004 21:39:52 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id iBB3c0D10832; Fri, 10 Dec 2004 21:38:00 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: monnier@iro.umontreal.ca In-reply-to: (message from Stefan Monnier on Fri, 10 Dec 2004 15:40:56 -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: main.gmane.org gmane.emacs.devel:30995 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30995 Stefan Monnier wrote (talking about custom-file): If someone set it via defcustom he's already screwed Quite to the contrary. The user sets `custom-file' through Custom to tell Custom to write to that file. Custom copies the old `custom-set-variables' form into that file. (Not quite, but it does something equivalent that works even if the old custom file got renamed or deleted in the meantime.) It will also continue to write in that file for the remainder of the session or until custom-file gets changed again. If the user wants to save the value of `custom-file' for future sessions, he has to load that file in his .emacs so that Custom can find it, as used to be clearly pointed out in the docstring. Note that `custom-file' can be set on a "for this session only" basis. I myself too am starting to find it hard to keep up with every detail of what gets written back and forth in this thread. But I wonder if things are not needlessly getting too complicated and especially, too backward incompatible. People and packages have used the variable `custom-file' for various more sophisticated purposes. I hope that you are not in the process of breaking such uses and such third party packages. I myself do not use them (and hence can provide no nitty-gritty details), but other people use them. There are only two problems. First, the user who customizes through Custom has to realize that he has to load the file in his .emacs, if he wants to save his customization. That was clearly pointed out in the docstring, but that is changed now. We can easily change it again so that it gets even pointed out even more clearly than before. At the limit, we could (for people who have philosophical objections against reading docstrings) provide a warning if the user saves the file for future sessions (kind of like when the user uses a disabled command). The second, more difficult problem is that to use custom-file for the sort of thing it is most useful for, you have to write an Elisp form which is trivial for Elisp programmers, but may be intimidating for non-Elisp programmers. The current solution is that a non-Elisp programmer can copy the example I wrote for the Emacs manual with different version numbers. Basically one way to deal with the problem is to simply add a couple of lines to the docstring of custom-file, as I proposed earlier. I myself see no reason to do anything more complex than that. Sincerely, Luc.