From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: A fundamental problem with defcustoms that are lists Date: Sat, 06 Sep 2008 22:04:27 +0200 Message-ID: <48C2E24B.7000602@gmail.com> References: <48C2BF2F.9040700@gmail.com> <001901c9104f$fe082fe0$0200a8c0@us.oracle.com> <48C2D31A.1000804@gmail.com> <000001c9105a$ab50a560$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1220731495 23564 80.91.229.12 (6 Sep 2008 20:04:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Sep 2008 20:04:55 +0000 (UTC) Cc: 'Emacs Devel' To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 06 22:05:50 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 1Kc42X-0007BB-P4 for ged-emacs-devel@m.gmane.org; Sat, 06 Sep 2008 22:05:50 +0200 Original-Received: from localhost ([127.0.0.1]:53892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kc41Y-0004hy-1Y for ged-emacs-devel@m.gmane.org; Sat, 06 Sep 2008 16:04:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kc41T-0004hr-5O for emacs-devel@gnu.org; Sat, 06 Sep 2008 16:04:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kc41R-0004hb-OQ for emacs-devel@gnu.org; Sat, 06 Sep 2008 16:04:42 -0400 Original-Received: from [199.232.76.173] (port=56337 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kc41R-0004hY-LF for emacs-devel@gnu.org; Sat, 06 Sep 2008 16:04:41 -0400 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]:42362) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kc41R-0000hD-3d for emacs-devel@gnu.org; Sat, 06 Sep 2008 16:04:41 -0400 Original-Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:61607 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1Kc41O-0001Sy-6H; Sat, 06 Sep 2008 22:04:39 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <000001c9105a$ab50a560$0200a8c0@us.oracle.com> X-Enigmail-Version: 0.95.7 X-Antivirus: avast! (VPS 080906-0, 2008-09-06), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.87 X-Scan-Result: No virus found in message 1Kc41O-0001Sy-6H. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Kc41O-0001Sy-6H 38b66c289abd41c683147bf13d66972f X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) 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:103603 Archived-At: Drew Adams wrote: > The question is what you (a library) want/expect users to replace: the whole > list or just part of it. If you want some part of it to always be there, then > include that part automatically, outside of the user's customization. In that > case, start the user-replaceable part off with a default value of nil. I clearly want both possibilities. (And you are again saying that they should be different cases. I said before I do not agree with that.) > I was trying to point out the difference between a list of default values and a > list that serves as a default value, and that it is the library and its use of > the list that decides which it needs (possibly both). Yes, both. That is the normal case in my opinion. >> But that would not give the same flexibility as what I propose. > > Be specific. It is about giving the both the possibility to replace the default value and add things to it. I took lists as an example. There might be other cases too, but this is the most important case I believe. >> Here is my proposal a bit more concretely expressed: >> >> - In the values stored for a list (ie type 'repeat) for a defcustom >> allow a value 'custom-insert-default to insert the default >> value for the 'repeat list. > > How is that better than having a separate variable (or function) that provides > the list of default values, and having the code splice that in where needed? Is > it that you are trying to give the user greater control over where the > default-values list is spliced in? Yes. Plus that it gives the user the freedom to replace all values. > I really don't see a useful use case for this. Why don't you start by explaining > your concrete use case or a problematic situation? Either you will convince > people that something "fundamental" is in fact missing, or someone will show you > that you can already do what you want. I can give that later if it is needed.