Gnus development mailing list
 help / color / mirror / Atom feed
From: Rasmus <rasmus@gmx.us>
To: ding@gnus.org
Subject: Re: using bbdb in split methods
Date: Wed, 07 Sep 2011 13:00:15 +0200	[thread overview]
Message-ID: <87k49kr51c.fsf@gmail.com> (raw)
In-Reply-To: <87vct46ago.fsf@ucl.ac.uk>

Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Yes, I've been aware of bbdb 3 for a long time and, partly, this is why
> I have resisted getting too much into the current bbdb... but that's
> probably just an excuse for procrastination! :-(

I haven't used bbdb2 (I used org-contacts before) but bbdb3 is pretty
straight forward. 

Here is my bbdb3 setup

–Rasmus

#+begin_src org
* TODO BBDB 3
BBDB is the Insidious Big Brother Database for GNU Emacs. It
provides an address book for email and snail mail addresses, phone
numbers and the like. It can be linked with various Emacs mail
clients (Message and Mail mode, Rmail, Gnus, MH-E, and VM).
BBDB is fully customizable.
** Load stuff
#+begin_src emacs-lisp
(add-to-list 'load-path "~/.emacs.d/bbdb/lisp/")
(require 'bbdb)
(bbdb-initialize 'gnus)
(bbdb-mua-auto-update-init 'gnus)
#+end_src

** Sanitizing the BBDB
Wouldn't it be nice if it showed Danish addresses correctly?
#+begin_src emacs-lisp
(add-to-list 'bbdb-address-format-list '(("Denmark" "Danmark")
					 "spcC"
					 "@%s\n@%p @%c@ (%S)@\n%C@"
					 "@%c@"))

(add-to-list 'bbdb-phone-label-list "mobil")
#+end_src


I don't care about people from usenet. Don't ask me! Always ask in all
other cases. (This is somewhat annoying behavior that needs to be looked
further into) 

#+begin_src emacs-lisp
(defun bbdb/gnus-update-selectively ()
  "Update BBDB record selectively"
  (interactive)
  (if
      (gnus-news-group-p gnus-newsgroup-name)
      (setq bbdb/gnus-update-records-p nil)
    (setq bbdb/gnus-update-records-p 'query)
    ))

(add-hook 'gnus-summary-prepare-hook 'bbdb/gnus-update-selectively)

#+end_src

** Settings
There is a post about various settings at [[http://emacs-fu.blogspot.com/2009/08/managing-e-mail-addresses-with-bbdb.html][emacs-fu]] but it is probably
for the v2 branch of BBDB

#+begin_src emacs-lisp
  ;; for sending mails...
  (add-hook 'message-setup-hook 'bbdb-get-mail-aliases)
  (setq
   bbdb-electric nil
   bbdb-default-country "Denmark"
   bbdb-mail-user-agent 'gnus-user-agent
   bbdb-phone-style nil
   bbdb-completion-display-record nil
   bbdb-pop-up-layout 'one-line
   bbdb-pop-up-window-size 2
   bbdb-complete-mail-allow-cycling t
   bbdb-horiz-pop-up-window-size '(112 .1))

  (setq bbdb-mail-allow-redundancy 'mail-only)
#+end_src

#+end_src












  reply	other threads:[~2011-09-07 11:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-05  7:49 Eric S Fraga
2011-09-05 10:13 ` Eric Abrahamsen
2011-09-05 13:02   ` Eric S Fraga
2011-09-06  7:55   ` Eric S Fraga
2011-09-07  2:24     ` Eric Abrahamsen
2011-09-07  8:08       ` Eric S Fraga
2011-09-07 11:00         ` Rasmus [this message]
2011-09-07 15:03     ` David Engster
2011-09-27 21:39 ` Ted Zlatanov
2011-09-28 15:10   ` Eric S Fraga

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=87k49kr51c.fsf@gmail.com \
    --to=rasmus@gmx.us \
    --cc=ding@gnus.org \
    /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).