From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: toggling a minor mode should not tell Customize that the value hasbeen set Date: Sun, 6 Jan 2008 08:19:24 -0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1199636384 10307 80.91.229.12 (6 Jan 2008 16:19:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Jan 2008 16:19:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 06 17:20:04 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 1JBYEC-0001LK-9O for ged-emacs-devel@m.gmane.org; Sun, 06 Jan 2008 17:20:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBYDp-00057R-4R for ged-emacs-devel@m.gmane.org; Sun, 06 Jan 2008 11:19:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JBYDk-00056z-DR for emacs-devel@gnu.org; Sun, 06 Jan 2008 11:19:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JBYDi-00056N-Fn for emacs-devel@gnu.org; Sun, 06 Jan 2008 11:19:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBYDi-00056E-8l for emacs-devel@gnu.org; Sun, 06 Jan 2008 11:19:30 -0500 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JBYDe-0008Ch-Ax; Sun, 06 Jan 2008 11:19:26 -0500 Original-Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m06GJNR3000417; Sun, 6 Jan 2008 10:19:24 -0600 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m06G6Hik001924; Sun, 6 Jan 2008 09:19:23 -0700 Original-Received: from 141.144.88.62 by acsmt351.oracle.com with ESMTP id 3479874671199636362; Sun, 06 Jan 2008 08:19:22 -0800 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:86339 Archived-At: > This means that if you so much as toggle a global minor mode, > and you later use `customize-customized' to see which options > you have edited and set, the minor mode variable shows up in > the list of customized options. > > I think this was done deliberately to make the interaction with Custom > smoother. Otherwise Custom would say it was "changed outside of > Custom" and it would make users worry. Yes, that's what I assumed. I think that's a mistake. It has the result that users see such changes show up with `customize-customized', even for simple toggles. Toggling a minor-mode variable does not mean "customizing" it. Here's an analogy (no, it's not the same thing; it's an analogy): `Buffer-menu-sort-column' is a defvar, but it could be a defcustom. (In fact, in my code it is, and I think it should be generally, so that users can specify their preferred sort column without using setq or defvar.) Change it to a defcustom, hypothetically. Now, what's the Customize behavior if a user clicks a column header or two a few times to change sort orders dynamically? Customize thinks (correctly) that the value was changed outside Customize. The user has not tried to _customize_ the value, to change its value as a preference, and that's what Customize thinks also. If the user (perhaps as part of `kill-emacs-query-functions') calls `customize-customized', s?he is not told that `Buffer-menu-sort-column' was customized ("set"). That's a good thing. It is _not_ a likely candidate for saving - the user did not set it using Customize. That same behavior should be available for minor mode variables. As long as there is a distinction between changing an option's value outside Customize and changing (setting) its value inside Customize, variables such as `Buffer-menu-sort-column' and toggles should not be automatically customized whenever you change them. I would agree that it can be appropriate for some commands to automatically customize (i.e. "set") options when run outside Customize. And it might be appropriate for some options to be automatically customized whenever they are set outside Customize. But clicking a sort column header and toggling a minor mode do not fall into that category, IMO. You might remember that I was the first one (perhaps the only one) who argued that Customize should be made to play better with Emacs, in particular by having changes that you make outside Customize be reflected inside it, so Customize recognizes them, just as if you had made them inside Customize. That means automatically "setting" any option that is changed in any way. That idea was not accepted. OK. As long as there is a difference between "changed outside" and "set" (inside), `customize-customized' should not identify variables such as minor modes and `Buffer-menu-sort-column' as having been "customized". These are things that are designed to be changed multiple times during a session, without such change signifying a change in preferred default value. If a user wants to then set or even save such a change with Customize, it is easy enough to do.