Andreas Matthias <andreas.matth...@gmail.com> writes:

> To keep bbdb from asking me whether to add gmane-encrypted addresses
> to the database I did the following
>
> (setq bbdb/mail-auto-create-p 'bbdb-ignore-some-messages-hook)
> (setq bbdb/news-auto-create-p 'bbdb-ignore-some-messages-hook)
> (setq bbdb-ignore-some-messages-alist
>       `(("From" . "public.gmane.org")
>         ("Newsgroups" . "gmane.*")
>         ))
>
> However this doesn't work. I'm still being ask:
>    Add address "xyz@" to "..."? (y or n)
>
> What's wrong with this approach?
>
> Ciao
> Andreas

I've been meaning to do this myself for a while so I had a look. The
problem with what you've tried is that bbdb/mail-auto-create-p and
bbdb/news-auto-create-p only deal with the automatic creation of bbdb
records. The irritating messages are from bbdb deciding whether to add
an address to an existing record.

The current design of bbdb doesn't let you add a regexp to decide that a
given address is junk, I don't think. However, there's a slightly
hackier solution if you're using gnus: Stick the following in your
~/.gnus or somewhere it'll get loaded

(setf bbdb-always-add-addresses
      (lambda ()
        (if (or (not (boundp 'gnus-newsgroup-name))
                (not (string-match "^gmane" gnus-newsgroup-name)))
            'ask
          nil)))

It uses an undocumented variable, but maybe there's a better
way. Anyway, this means that it won't try to add any addresses in a
gmane group, which probably has the desired effect.

Rupert

Attachment: pgpwUcF3SK67T.pgp
Description: PGP signature

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to