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: Eliminating "changed in Emacs outside of Customize" Date: Wed, 2 Feb 2005 16:45:57 -0600 (CST) Message-ID: <200502022245.j12MjvW17223@raven.dms.auburn.edu> References: <00ac01c5096a$cfaf6950$0200a8c0@sedrcw11488> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1107384886 28852 80.91.229.2 (2 Feb 2005 22:54:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 2 Feb 2005 22:54:46 +0000 (UTC) Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, drew.adams@oracle.com, rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 02 23:54:45 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CwTNd-0005p4-PS for ged-emacs-devel@m.gmane.org; Wed, 02 Feb 2005 23:53:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CwTaq-0007wa-Hg for ged-emacs-devel@m.gmane.org; Wed, 02 Feb 2005 18:07:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CwTYv-0006bv-5z for emacs-devel@gnu.org; Wed, 02 Feb 2005 18:05:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CwTYq-0006Za-7J for emacs-devel@gnu.org; Wed, 02 Feb 2005 18:05:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CwTYp-0006Vt-PT for emacs-devel@gnu.org; Wed, 02 Feb 2005 18:05:23 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CwTHL-0000OX-Hc; Wed, 02 Feb 2005 17:47:19 -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 j12MlD9N017024; Wed, 2 Feb 2005 16:47:13 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j12MjvW17223; Wed, 2 Feb 2005 16:45:57 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: lennart.borgman.073@student.lu.se In-reply-to: <00ac01c5096a$cfaf6950$0200a8c0@sedrcw11488> (lennart.borgman.073@student.lu.se) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:32777 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32777 Lennart Borgman wrote: When I now see the distinction between user variables (should only be changed by the user) and others it is much more clear. Should not this distinction should be pointed out very clearly in Info under Easy Customization? There is no such generally agreed upon clear cut distinction, especially not for hooks, which are the main problem. From `(elisp)Hooks': A "hook" is a variable where you can store a function or functions to be called on a particular occasion by an existing program. Emacs provides hooks for the sake of customization. Most often, hooks are set up in the init file (*note Init File::), but Lisp programs can set them also. *Note Standard Hooks::, for a list of standard hook variables. Say `crazy-global-minor-mode' adds `crazy-fun' to before-save-hook. `crazy-fun' only makes sense with `crazy-global-minor-mode' enabled and leads to disaster otherwise. Disabling `crazy-global-minor-mode' removes the function from the hook again. You customize before-save-hook by adding something to it, while `crazy-global-minor-mode' is enabled and save it to your .emacs. Now you also have permanently added `crazy-fun' to before-save-hook. _Something_ should warn you about that. That is what "Customized outside Custom" does. I do not believe that there would be widespread support for splitting every single *-hook into program-*-hook and user-*-hook, which would be the easiest way to solve the problem. I would prefer a marriage between set-variable and customize however. We decided to implement changes to set-variable _after_ Emacs 21.4 is released. Such a change requires rewriting tons of individual :set functions to work buffer locally. Deciding what the best way to do that is may be highly non-trivial and controversial for plenty of :set functions. In that case customize could warn for "rouge" custom variable states. It would warn all the time about the options you see if you do `emacs -Q' and then `M-x customize-rogue'. Every single variable you see there represents a bug, but a minor one and not necessarily trivial to correct. Maybe we could do something about those bugs _after_ emacs "21.4" is released. It would _not_ warn about crazy-fun, which would be the more serious problem. Drew Adams wrote: What is the specific problem that Per and Stefan think would result from treating "changed outside" as "set"? Adding crazy-fun to before-save-hook in the scenario above *without warning*. "Changed outside Custom" is a *warning*. If you know why it as changed outside Custom and you know it is harmless, you can ignore the warning. Sincerely, Luc.