From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: toggling a minor mode should not tell Customize that the value has been set Date: Sun, 06 Jan 2008 16:20:06 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1199654426 3966 80.91.229.12 (6 Jan 2008 21:20:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Jan 2008 21:20:26 +0000 (UTC) Cc: Emacs-Devel To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 06 22:20:47 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JBcv8-0002LY-D0 for ged-emacs-devel@m.gmane.org; Sun, 06 Jan 2008 22:20:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBcul-00020W-4g for ged-emacs-devel@m.gmane.org; Sun, 06 Jan 2008 16:20:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JBcug-0001vr-CD for emacs-devel@gnu.org; Sun, 06 Jan 2008 16:20:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JBcue-0001rI-Hn for emacs-devel@gnu.org; Sun, 06 Jan 2008 16:20:09 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBcue-0001r5-C8 for emacs-devel@gnu.org; Sun, 06 Jan 2008 16:20:08 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JBcue-0004bm-B4 for emacs-devel@gnu.org; Sun, 06 Jan 2008 16:20:08 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAKvUgEfO+K+E/2dsb2JhbACmaw X-IronPort-AV: E=Sophos;i="4.24,250,1196658000"; d="scan'208";a="12342796" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 06 Jan 2008 16:20:07 -0500 Original-Received: from pastel.home ([206.248.175.132]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id MWA52307; Sun, 06 Jan 2008 16:20:07 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id E14ED7F7C; Sun, 6 Jan 2008 16:20:06 -0500 (EST) In-Reply-To: (Drew Adams's message of "Sun, 6 Jan 2008 12:47:23 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:86395 Archived-At: > I haven't seen any explanation. You've simply said, as support, that > toggling the variable enables/disables the mode for the session. OK, let's take a step back: There are currently only two options: either toggling the mode interactively causes the var to be "changed outside Customize" or it marks it as "Customized". The current code chooses the second and you advocate the first. The problem with the first is that it's a catch-all case: it just says "this has been changed somehow and we have no clue whatsoever what it means, how it was done, whether it'll occur again in the future, and hence Customize doesn't know what effect will result from changing and/or saving this variable. For all Customize knows, the value might already have changed between the time Customize read it to display it and the time the user gets to see the displayed value". In contrast, when the user interactively does M-x foo-mode RET, we know that this has been done in a way that Customize can easily understand and which does not affect its ability o make further changes and/or save the variable. Calling it customize-mark-as-set is a way to better interact with Customize. For that reason, the first option is *wrong*: it loses valuable information about how the minor mode was changed. In my mind "customize-customized" returns the list of defcustom variables that were changed in a principled way. Period. If you want to distinguish more finely between "principled" and "via Custom", go ahead, but I doubt the benefits are worth the trouble. Stefan