From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80661 Path: news.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.gnus.general Subject: Re: Backquotes and commas and ",@" Date: Sat, 10 Dec 2011 10:52:46 +0100 Organization: Probably a good idea Message-ID: <87obvgkb2p.fsf@dod.no> References: <87bos21un6.fsf@dod.no> <87y5v6zisl.fsf@dod.no> <87vcpt1jsq.fsf@dod.no> <87aa73p17i.fsf@lifelogs.com> <87aa72lw5p.fsf@dod.no> <8739cslx4d.fsf@dod.no> <87wra4khpe.fsf@dod.no> <87sjkskfsg.fsf_-_@dod.no> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1323510827 9972 80.91.229.12 (10 Dec 2011 09:53:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 10 Dec 2011 09:53:47 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M28943@lists.math.uh.edu Sat Dec 10 10:53:43 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RZJck-0004HJ-Jx for ding-account@gmane.org; Sat, 10 Dec 2011 10:53:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1RZJcB-0003RL-Hc; Sat, 10 Dec 2011 03:53:07 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1RZJc8-0003R7-Rr for ding@lists.math.uh.edu; Sat, 10 Dec 2011 03:53:04 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RZJc6-0001IP-12 for ding@lists.math.uh.edu; Sat, 10 Dec 2011 03:53:04 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1RZJc3-0002hK-4m for ding@gnus.org; Sat, 10 Dec 2011 10:52:59 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RZJc3-00044S-2g for ding@gnus.org; Sat, 10 Dec 2011 10:52:59 +0100 Original-Received: from cm-84.208.231.161.getinternet.no ([84.208.231.161]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Dec 2011 10:52:59 +0100 Original-Received: from sb by cm-84.208.231.161.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Dec 2011 10:52:59 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 43 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.208.231.161.getinternet.no Mail-Copies-To: never User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:rEbVZJtJxKUzQVLxt2SNDos2fHU= X-Spam-Score: -6.1 (------) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80661 Archived-At: >>>>> Andreas Schwab : > Steinar Bang writes: >> This means that the gnus-sync-lesync-pre-save-group-entry function >> returns a list. > More specifically, it returns an alist of key/value pairs. Right! That makes sense. >> - Then the list will have an element that is a two element list, > It's a cons whose car is the key and cdr is the value. Right! And a cons cell isn't a two element list. A two element list would have been two cons cells, with the car of each cell holding the elements. >> consisting of the symbol '_id and the first element of the nentry >> argument to the function (I don't understand why you have to have >> the "." there, though...?) > Because you want the cdr to be the value of the key, not the cadr. And refreshing my lisp knowledge: - cdr is the second slot of a cons cell, ie. the one pointing to the next cons cell of the list - cadr is the car of the cdr ie. (cadr '(1 2)) is 2. However '(1 2) creates a two element list (ie. two cons cells with the car of the first cons cell being 1 and the car of the second cons cell being 2). And indeed (cadr (1 . 2)) fails (as one would expect from cadr's definition Ah... "value of the key" is somewhat ambigous. I took that to mean, well... the value of the key. While you meant the value that can be looked up, using the key, and in which case your sentence makes sense. So... I looked up the definition of alist, and it's indeed a list of cons cells (which isn't surprising when one stops to think about it). > Splicing the empty list will splice nothing. I suspected that this might be the case, but didn't stop to look it up.