From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: :file keyword for Customize Date: Thu, 08 May 2008 14:12:28 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <868wykr4o3.fsf@lifelogs.com> References: <004101c8b129$788cd490$0ab32382@us.oracle.com> <48232D95.3020304@gnu.org> <004501c8b12c$d10ce620$0ab32382@us.oracle.com> <48233394.5060205@gnu.org> <86d4nwr8vs.fsf@lifelogs.com> <000101c8b135$6d360920$0ab32382@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210273782 13678 80.91.229.12 (8 May 2008 19:09:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 May 2008 19:09:42 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 08 21:10:17 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 1JuBVL-0006T1-LO for ged-emacs-devel@m.gmane.org; Thu, 08 May 2008 21:10:11 +0200 Original-Received: from localhost ([127.0.0.1]:50455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JuBUd-0001ZV-CN for ged-emacs-devel@m.gmane.org; Thu, 08 May 2008 15:09:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JuBUZ-0001ZO-KH for emacs-devel@gnu.org; Thu, 08 May 2008 15:09:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JuBUX-0001ZC-0b for emacs-devel@gnu.org; Thu, 08 May 2008 15:09:22 -0400 Original-Received: from [199.232.76.173] (port=36323 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JuBUW-0001Z9-SQ for emacs-devel@gnu.org; Thu, 08 May 2008 15:09:20 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:41996 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JuBUW-00044v-ND for emacs-devel@gnu.org; Thu, 08 May 2008 15:09:20 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JuBUT-0003lX-Vu for emacs-devel@gnu.org; Thu, 08 May 2008 19:09:18 +0000 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 May 2008 19:09:17 +0000 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 May 2008 19:09:17 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 57 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:shm2Vm3Vjn8lLxYjJxnwp3Bwsmk= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:96810 Archived-At: On Thu, 8 May 2008 11:00:40 -0700 "Drew Adams" wrote: >Ted Z wrote: >> FWIW, I would make custom-file accept an alist of defgroup/defcustom >> symbol name regex, associated with a file name or a function. DA> I don't think that's the place to specify such organization, We disagree then. DA> and I don't think a regexp offers the right kind of flexibility. That may be, the selection mechanism is not important. It can be a cond form. The point is to put the choice in the user's hands. >> That puts the power in the user's hands, yet allows package authors >> to add to the alist. The big win is that no special :file keyword is >> needed, and all existing packages will work with or without this >> special settings. DA> I don't see any such big win. It's no big deal to add a :file DA> keyword. And all existing packages would continue to work with no DA> changes - :file would be optional, of course. All existing packages can work with the new mechanism I proposed without modifications, whereas your proposal requires special *new* code everywhere a different custom file is desired, and leaves the choice up to whoever writes the source code. Thus the win is that less code is written all around, users have more choice, and everything works as it did before. DA> This is about letting an individual option or face (or perhaps DA> group) decide where it is stored (and consequently let users decide DA> when it is loaded). The place to do that is in `defcustom' and DA> `defface' (and perhaps `defgroup'). I think I understand your proposal, and I think it puts the option in the place where it's hardest to change it if the package author or the user should need to do it. It also makes it hard to organize configurations in a way that the *user* likes. Perhaps I misunderstand your proposal. Will the user be able to change the :file parameter on their own without modifying code, for example? What happens if the file name changes with a new package? Do you add extra code to handle the possible values of :file? What if the user wants to save the configuration for two packages in one custom file, but all other packages in the default place? This really is not an unusual need. I like to keep my Gnus and BBDB variables separate from the rest of Emacs but in one file, for example. The default path the package author picks may not be appropriate. For example, in Gnus a lot of work had to be done to remove dependencies on ~/News and ~/Mail that were put in place over time. Many users needed those paths relocated to somewhere that made sense to them. Ted