Gnus development mailing list
 help / color / mirror / Atom feed
From: Hans de Graaff <J.J.deGraaff@twi.tudelft.nl>
Subject: Re: Using BBDB to split mail?
Date: 31 Jan 1997 17:29:38 +0100	[thread overview]
Message-ID: <yahlo99q03x.fsf@twi.tudelft.nl> (raw)
In-Reply-To: Hans de Graaff's message of 23 Jan 1997 14:44:00 +0100

Hans de Graaff <J.J.deGraaff@twi.tudelft.nl> 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


      reply	other threads:[~1997-01-31 16:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-23 13:44 Hans de Graaff
1997-01-31 16:29 ` Hans de Graaff [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yahlo99q03x.fsf@twi.tudelft.nl \
    --to=j.j.degraaff@twi.tudelft.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).