From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philippe M. Coatmeur Newsgroups: gmane.emacs.help Subject: Dude where is my car ? Date: Fri, 25 May 2012 22:59:10 +0000 Organization: A noiseless patient Spider Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1337983824 9908 80.91.229.3 (25 May 2012 22:10:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 25 May 2012 22:10:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 26 00:10:22 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 1SY2i5-0005hv-3G for geh-help-gnu-emacs@m.gmane.org; Sat, 26 May 2012 00:10:13 +0200 Original-Received: from localhost ([::1]:59651 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SY2i4-0007jr-Gt for geh-help-gnu-emacs@m.gmane.org; Fri, 25 May 2012 18:10:12 -0400 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Injection-Info: mx04.eternal-september.org; posting-host="DsGPYNqg28oB/FCi7TKkgw"; logging-data="11674"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX193lDI55xRhKXDrp9zclCqkxPBu3zXpUrA=" User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/24.1 Mule/6.0 (HANACHIRUSATO) Cancel-Lock: sha1:GKamxpGaDFwxOe98PsZ+n8DOn+g= Original-Xref: usenet.stanford.edu gnu.emacs.help:192571 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:84977 Archived-At: Hi everyone ; I have this function that loops trough a list of lists of email elements to extract them. The list looks like this : (("" "Fri, 25 May 2012 23:49:58 +0200" "Re: plopz" "1648") ("contact " "Fri, 25 May 2012 22:21:49 +0000" "tst" "1647")) (This is what you get if you C-h v with point over mail-bug-unseen-mails-one) (defun mail-bug-desktop-notify-one () (mapcar (lambda (x) (if (not (member x mail-bug-advertised-mails-one)) (progn (mail-bug-desktop-notification "Mew mail!" (format "%s %s %s" ;; Produces the values below (car (nthcdr 1 x)) ;; Fri, 25 May 2012 23:49:58 +0200 (car (nthcdr 2 x)) ;; Re: plopz (car (nthcdr 3 x))) ;; 1648 "500000" mail-bug-new-mail-icon-one) (add-to-list 'mail-bug-advertised-mails-one x)))) mail-bug-unseen-mails-one)) And this works fine, so it follows that (car (car x)) is the first element of each atomic list, right ? but when I try to extract it emacs (24.1.50 cvs) insults me!? I spent more than a good hour trying to figure this out (format "%s %s %s" (car (car x)) ;; Should produce (car (nthcdr 2 x)) ;; Re: encor un autre (car (nthcdr 3 x))) ;; 1643 error in process sentinel: format: Wrong type argument: listp, "" error in process sentinel: Wrong type argument: listp, "" (How am I supposed to interpret this first error ? Does format really expect a list?) What is it that I'm doing wrong ? Where is my car? Phil