From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/9740 Path: main.gmane.org!not-for-mail From: Hans de Graaff Newsgroups: gmane.emacs.gnus.general Subject: Re: Using BBDB to split mail? Date: 31 Jan 1997 17:29:38 +0100 Sender: graaff@duticai.twi.tudelft.nl Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.94) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035149716 20227 80.91.224.250 (20 Oct 2002 21:35:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:35:16 +0000 (UTC) Return-Path: Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.8.5/8.8.5) with SMTP id IAA04792 for ; Fri, 31 Jan 1997 08:49:05 -0800 Original-Received: from duticai.twi.tudelft.nl (duticai.twi.tudelft.nl [130.161.159.1]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Fri, 31 Jan 1997 17:29:45 +0100 Original-Received: from dutifp.twi.tudelft.nl (dutifp [130.161.159.118]) by duticai.twi.tudelft.nl (8.8.5/8.8.5) with ESMTP id RAA10805 for ; Fri, 31 Jan 1997 17:29:43 +0100 (MET) Original-Received: (from graaff@localhost) by dutifp.twi.tudelft.nl (8.8.5/8.8.5) id RAA27136; Fri, 31 Jan 1997 17:29:40 +0100 (MET) Original-To: ding@ifi.uio.no X-Url: http://is.twi.tudelft.nl/~graaff/ X-Face: ,i^c$X{l+r}VV%(bl{^[ writes: > I would like to split mail acoording to whether the sending person > is in my BBDB database or not. I have briefly looked over the > documentation of splitting, and it seems that this can only be done > using a fancy split, and some lisp glue to query the BBDB database. Well, I got a single response (Thanks Hunter) about using fields in BBDB to split mail, but this wasn't what I wanted to do. So I had to hack up something myself. I used a function in the normal split rules to hack this together, and the function itself looks like this: (defun jjdg-bbdb-split-search (group) (let (from) (setq from (gnus-extract-address-components (gnus-fetch-field "from"))) (when from (bbdb-search-simple (car from) (cdr from)))) ) This does exactly what I want. Lars, thanks for thinking ahead and allowing functions in normal splits, and for providing gnus-util.el! It makes writing this sort of stuff much simpler. Hans