From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: custom: how do I augment an option? Date: Thu, 6 Sep 2012 06:37:05 -0700 Message-ID: References: <87zk5473qz.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1346938660 12551 80.91.229.3 (6 Sep 2012 13:37:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Sep 2012 13:37:40 +0000 (UTC) To: "'Stefan Monnier'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 06 15:37:42 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T9cH1-0007jy-Bd for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Sep 2012 15:37:35 +0200 Original-Received: from localhost ([::1]:60638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9cGy-0003Y1-2m for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Sep 2012 09:37:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9cGn-0003Xn-Hl for help-gnu-emacs@gnu.org; Thu, 06 Sep 2012 09:37:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9cGe-00040H-2b for help-gnu-emacs@gnu.org; Thu, 06 Sep 2012 09:37:21 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:29033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9cGd-000409-Rm for help-gnu-emacs@gnu.org; Thu, 06 Sep 2012 09:37:11 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q86Db95Y015689 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 Sep 2012 13:37:10 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q86Db9Mq009807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Sep 2012 13:37:09 GMT Original-Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q86Db90O022977; Thu, 6 Sep 2012 08:37:09 -0500 Original-Received: from dradamslap1 (/10.159.176.40) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 06 Sep 2012 06:37:08 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Thread-Index: Ac2MMaTQ4N7bU/PRSbWbwUgwMj2vKwAAGw6w X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86669 Archived-At: > 3- submit a patch for Customize which lets the user specify > not just a new value but a change (like a "diff") to the > default value. For lists representing sets, a way for the > user to specify elements to add and elements to remove > would be great. For lists where order matters, the user > should additionally have some control over where to add > elements. > Point 3 would be *really* welcome. +1 One reason this would be helpful would be simplicity of expression. But another, quite important reason IMO, would be some ability to better handle updates of the default value, e.g. in a new version of the given defcustom. For example, an option value that is a list of mappings of some kind might have additional mappings by default in a newer version of the library. If you have already customized the option then you might not learn of the added possibilities. I see this fairly often. You've customized based on the old default value, not the new one. Given some awareness of the change, you might now want to customize the option differently. But this problem of a changed default value is presented even for non-collection options. It would be good to have a simple (optional) way for users of a library to be alerted that the default value of a given option or face that they have customized has changed. E.g., if the default value of `foo' was 3, you have customized it to 42, and the default value is now nil, be able to be alerted to that default change.