From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59897 Path: main.gmane.org!not-for-mail From: "Ted Zlatanov" Newsgroups: gmane.emacs.gnus.general Subject: Re: nnimap-generate-folder-list-from-bbdb, almost. Date: 24 Feb 2005 12:46:48 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <4nacptn94n.fsf@lifelogs.com> References: <87zmxulou2.fsf@mat.ucm.es> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1109267197 7559 80.91.229.2 (24 Feb 2005 17:46:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 Feb 2005 17:46:37 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+M8438@lists.math.uh.edu Thu Feb 24 18:46:36 2005 Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by ciao.gmane.org with esmtp (Exim 4.43) id 1D4N3m-0001pF-BD for ding-account@gmane.org; Thu, 24 Feb 2005 18:45:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1D4N55-0002xZ-00; Thu, 24 Feb 2005 11:47:19 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1D4N4x-0002xT-00 for ding@lists.math.uh.edu; Thu, 24 Feb 2005 11:47:11 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1D4N4u-0005lP-Dv for ding@lists.math.uh.edu; Thu, 24 Feb 2005 11:47:08 -0600 Original-Received: from clifford.bwh.harvard.edu ([134.174.9.41] helo=mail.bwh.harvard.edu) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1D4N4p-0003AP-00 for ; Thu, 24 Feb 2005 18:47:03 +0100 Original-Received: (qmail 28185 invoked from network); 24 Feb 2005 17:44:55 -0000 Envelope-Sender: tzz@lifelogs.com Envelope-Recipients: oub@mat.ucm.es, ding@gnus.org, Original-Received: from asimov.bwh.harvard.edu (HELO asimov) (internal?.8?user:?tzz@[134.174.8.118]) (envelope-sender ) by mail.bwh.harvard.edu (qmail-ldap-1.03) with SMTP for ; 24 Feb 2005 17:44:51 -0000 Mail-Followup-To: "Uwe Brauer" , ding@gnus.org Original-To: "Uwe Brauer" 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" X-Hashcash: 1:20:050224:oub@mat.ucm.es::MTfLtzci1/ipAR+n:0000000000000000000000000000000000000000000000023HS X-Hashcash: 1:20:050224:ding@gnus.org::2hvhqMmnVK0dvTde:0000AI2r In-Reply-To: <87zmxulou2.fsf@mat.ucm.es> (Uwe Brauer's message of "Wed, 23 Feb 2005 20:38:13 -0500") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) X-Spam-Status: No, score=-1.6 required=5.8 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on sysblade0.bwh.harvard.edu X-Spam-Score: -4.9 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu X-MailScanner-From: ding-owner+m8438@lists.math.uh.edu X-MailScanner-To: ding-account@gmane.org Xref: main.gmane.org gmane.emacs.gnus.general:59897 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59897 On Wed, 23 Feb 2005, oub@mat.ucm.es wrote: > Some weeks ago I asked in the gnus group for a function which would > allow to generate a entry in the nnimap-split-fancy list, based on a > relevant bbdb entry. > > I am almost there, that is I obtained a function > (my:nnimap-folder-list-from-bbdb) --which I have added below-- > > Evaluation the function, that > (eval-expression '(my:nnimap-folder-list-from-bbdb) nil) > returns > ( > ("From" "bill@upct\\.es" "testbill") > ^this is the relevant bbdb entry. > ("From" "oub@mat\\.ucm\\.es" "testimap")) > ^this is the relevant bbdb entry. > > > Now the problem is I don't know who to add this to the > nnimap-split-entry You can use a macro to do this. For example (from the manual, see the ELisp manual, node "Macros"): '(a list of (+ 2 3) elements) => (a list of (+ 2 3) elements) `(a list of (+ 2 3) elements) => (a list of (+ 2 3) elements) `(a list of ,(+ 2 3) elements) => (a list of 5 elements) Note how the backquote turns the expression into a macro. So it seems that in your case, something like this: (setq nnimap-split-fancy `(| ("Subject" "POSIBLE SPAM" "SPAM.POSS") ... ,(my:nnimap-folder-list-from-bbdb) ... "MAILBOX" )) should work. Ted