From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alex Schroeder Newsgroups: gmane.emacs.devel Subject: Re: [CVS] f7, f8 bound.. Date: Thu, 05 Sep 2002 00:35:17 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <87heh5tmca.fsf@emacswiki.org> References: <200209021705.g82H50d07442@rum.cs.yale.edu> <200209022324.g82NOoO08761@rum.cs.yale.edu> <20020903130247.GA6318@gnu.org> <20020903173120.GA29981@gnu.org> <20020903225635.GA26910@gnu.org> <20020903235314.GA31223@gnu.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031178802 21461 127.0.0.1 (4 Sep 2002 22:33:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 4 Sep 2002 22:33:22 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17mii8-0005a0-00 for ; Thu, 05 Sep 2002 00:33:20 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17mjHX-00043e-00 for ; Thu, 05 Sep 2002 01:09:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17mijj-0002AO-00; Wed, 04 Sep 2002 18:34:59 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17mii2-0001se-00 for emacs-devel@gnu.org; Wed, 04 Sep 2002 18:33:14 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17mihz-0001pw-00 for emacs-devel@gnu.org; Wed, 04 Sep 2002 18:33:13 -0400 Original-Received: from relay02.cablecom.net ([62.2.33.102]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17mihy-0001pS-00 for emacs-devel@gnu.org; Wed, 04 Sep 2002 18:33:11 -0400 Original-Received: from smtp.swissonline.ch (mail-4.swissonline.ch [62.2.32.85]) by relay02.cablecom.net (8.12.5/8.12.5/SOL/AWF/MXRELAY/20020820) with ESMTP id g84MX9Ws064394 for ; Thu, 5 Sep 2002 00:33:09 +0200 (CEST) (envelope-from alex@emacswiki.org) Original-Received: from confusibombus (dclient217-162-239-98.hispeed.ch [217.162.239.98]) by smtp.swissonline.ch (8.11.6/8.11.6/SMTPSOL/AWF/2002040101) with ESMTP id g84MX9H18340 for ; Thu, 5 Sep 2002 00:33:09 +0200 (MEST) Original-Received: from alex by confusibombus with local (Exim 3.35 #1 (Debian)) id 17mik2-0000An-00 for ; Thu, 05 Sep 2002 00:35:18 +0200 Original-To: emacs-devel@gnu.org X-Face: ^BC$`[IcggstLPyen&dqF+b2'zyK#r.mU*'Nms}@&4zw%SJ#5!/7SMVjBS7'lb;QK)|IPU5U'o1'522W4TyzB3Ab*IBo^iw]l4|kUbdZuUDO6=Um-.4IzhNiV'B"@K#jy_(wW|Zbk[34flKY^|PrQ?$u2\fKg^]AY>wOX#H32i In-Reply-To: ("Robert J. Chassell"'s message of "Wed, 4 Sep 2002 11:59:24 +0000 (UTC)") Original-Lines: 61 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2.90 (i686-pc-linux-gnu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7486 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7486 "Robert J. Chassell" writes: > As you saying that sometime recently, Emacs introduced a construction > so that these expressions no longer go into my .emacs file (or into > another file that is loaded from .emacs)? If so, where are they? How do > I hand edit them? It is not yet part of Emacs. The concept of a diff-list is that a list has a standard value, and all you want to do is add items or remove items from the list. This is important for large lists where your changes are small in comparison -- complex lists and keymaps come to mind. This translates as follows. Normal variable: (setq l '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)) or use custom to save a setting to a file: (custom-set-variables ... (l '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))) Diff List: (add-to-list 'l 16) (setq l (delete 4 l)) or use custom to save it: (custom-set-variables ... (l '(diff-list (16) (4)))) I think this representation works pretty well for me. You might have problems, if you think about it as follows: (setq l '(1 2 3 5 6 7 8 9 10 11 12 13 14 15 16)) is saved by custom as (custom-set-variables ... (l '(diff-list (16) (4)))) If you think that custom-set-variables just represents a set of setq statements, then you will be confused. What is the benefit, you might ask. Well, 1. we might save space in the file where the customizations are saved, since we do not need to copy them there, and 2. the customization will make sense even when the standard-value of a list has changed. Again, the example is Gnus. Assume you have a list of MIME types. You want to remove text/html and add picture/jpeg. If the new Gnus adds signature/gpg as a MIME type, only the diff-list solution will produce a value that contains the new signature/gpg type, as well as picture/jpeg added by the user, and lacking text/html removed by the user. Ok, enough for today. :) Alex.