Discussion:
bbdbv3 with rmail
Xavier Maillard
2018-12-06 06:00:15 UTC
Permalink
Hello,

I am looking for a way to manage my contacts (basically, it consists
of email addresses, a few phone numbers and eventually some notes)
efficently. Eventually, it would integrate (very) well with rmail
(alias expansion, adding timestamps as a note, etc.)

BBDB seems a good candidate but dunno if v3 is ok (there is really
poor litterature with it)


Thank you for your help
--
Xavier Maillard
e/j:***@maillard.im w:www.maillard.im
m: 06 52 18 63 43 (old)
m: 06 49 60 48 56 (NEW)

GPG: 9983 DCA1 1FAC 8DA7 653A
F9AA BA49 09B7 8F04 DE1B
Colin Baxter
2018-12-06 08:16:48 UTC
Permalink
Dear Xavier,
Hello, I am looking for a way to manage my contacts (basically, it
consists of email addresses, a few phone numbers and eventually
some notes) efficently. Eventually, it would integrate (very) well
with rmail (alias expansion, adding timestamps as a note, etc.)
BBDB seems a good candidate but dunno if v3 is ok (there is really
poor litterature with it)
w:www.maillard.im m: 06 52 18 63 43 (old) m: 06 49 60 48 56 (NEW)
GPG: 9983 DCA1 1FAC 8DA7 653A F9AA BA49 09B7 8F04 DE1B
I use bbdb v3.2 with RMAIL and with gnus. I find it's excellent. I have
bbdb settings in both my ~/.emacs and ~/.gnus.el, which I've given
below. They work for me, but, of course, use at your own risk.

;;; My ~/.emacs settings ;;;;;;;;

(require 'bbdb-loaddefs "~/path/to/bbdb/lisp/bbdb-loaddefs.el")

;;; Set bbdb file
(setq bbdb-file "~/path/to/bbdb") ;; en clair; Not encrypted. chmod 700.

;;; Initailise for message-mode (gnus outgoing) and mail-mode (rmail outgoing).
(bbdb-initialize 'gnus 'message 'pgp 'mail) ;; Add 'rmail if you wish.

;;; Auto saving of email addresses - Two methods.
;;
;;; METHOD 1 - I use this.
;;; Prompt for message-mode (gnus outgoing), mail-mode (rmail outgoing).
;;; No prompt for rmail-mode (incoming), gnus (incoming).
(bbdb-mua-auto-update-init 'message ;; message-mode is gnus outgoing
;; 'rmail ;; No rmail-mode (incoming)
'mail) ;; mail-mode is "rmail" outgoing.
(setq bbdb-mua-update-interactive-p '(query . create)
bbdb-message-all-addresses t ;; To: is 2nd line mail-mode. Default: nil.
bbdb-update-records-p 'query
bbdb-mua-auto-update-p 'query)
(add-hook 'bbdb-notice-mail-hook 'bbdb-auto-notes)
;;; BBDB Pop window. Toggle 't' or 'T' in bbdb buffer to expand lines.
(setq bbdb-mua-pop-up-window-size 3
bbdb-layout 'one-line ;; one-line, multi-line, full-multi-line (t or T)
bbdb-pop-up-window-size 5
bbdb-complete-mail-allow-cycling t)
;;;
;;; Method 2 - I don't use this, but it does work.
;; Pop window. Toggle 't' or 'T' in bbdb buffer to expand lines.
;(setq bbdb-mua-pop-up-window-size 3
; bbdb-layout 'one-line ;; one-line, multi-line, full-multi-line (t or T)
; bbdb-pop-up-window-size 5
; bbdb-complete-mail-allow-cycling nil) ;; Default
;;; <http://stackoverflow.com/questions/11991940/auto-create-entries-for-all-email-addresses-in-bbdb3>
;(bbdb-mua-auto-update-init 'message 'rmail) ;; rmail & message only.
;(setq bbdb-message-all-addresses nil) ;; t, nil - only 1st if nil (default).
;;;(setq bbdb-update-records-p 'create) ;; Create without query.
;(setq bbdb-update-records-p 'query) ;; Query then create on yes.
;;;

;;; Automatically save bbdb file after a change.
(add-hook 'bbdb-after-change-hook 'bbdb-save) ;; I use this.
;;; bbdb-after-change-hook runs with one argument, the record that was
;;; changed. The first arg of bbdb-save is the optional arg PROMPT. So
;;; this arg is always non-nil when called by the hook (thus prompting
;;; before saving). Otherwise use
;(add-hook 'bbdb-after-change-hook (lambda (arg) (bbdb-save))) ;; ANNOYING!
;;; for saving without prompting (but not if gpg password is required).

;;; bbdb telephone setting defaults to US style
;(setq bbdb-north-american-phone-numbers-p nil) ;; nil to format non-US style.
;; Above line no longer seems to work. Use next line:
(setq bbdb-phone-style 'nil) ;; Free-style numbering. Default 'nanp
;;; nanp = "North American Numbering Plan".

;;; My ~/.gnus.el settings ;;;;;;;

(add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
(add-hook 'gnus-startup-hook 'bbdb-insinuate-message)

Hope this helps.

Best wishes,

Colin Baxter
***@yandex.com
---------------------------------------------------------------------
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68 2A27 BBFA 2492 91F5 41C8
---------------------------------------------------------------------
Since mathematicians have invaded the theory of relativity, I do not
understand it myself. A. Einstein
Eric S Fraga
2018-12-06 09:57:19 UTC
Permalink
Post by Colin Baxter
I use bbdb v3.2 with RMAIL and with gnus. I find it's excellent. I have
bbdb settings in both my ~/.emacs and ~/.gnus.el, which I've given
below. They work for me, but, of course, use at your own risk.
Thanks for posting your config. Very useful. I have one question,
however, which maybe you can help with: I would like bbdb to
automatically create new entries (with query, I guess) for outgoing
emails but only search for incoming. Is this possible?

Thanks,
eric
--
Eric S Fraga via Emacs 27.0.50 & org 9.1.14 on Debian buster/sid
Colin Baxter
2018-12-07 06:41:31 UTC
Permalink
Dear Eric,
Post by Eric S Fraga
Post by Colin Baxter
I use bbdb v3.2 with RMAIL and with gnus. I find it's
excellent. I have bbdb settings in both my ~/.emacs and
~/.gnus.el, which I've given below. They work for me, but, of
course, use at your own risk.
Thanks for posting your config. Very useful. I have one
question, however, which maybe you can help with: I would like
bbdb to automatically create new entries (with query, I guess) for
outgoing emails but only search for incoming. Is this possible?
I'm not sure if it is possible. I don't know how, that's for
sure. However, I am uncertain what it means to search incoming addresses
without a create/query since what be the point of the search in the
first place? I may have misunderstood your question, of course. Sorry if
that is the case.

Best wishes.
Eric S Fraga
2018-12-07 06:58:35 UTC
Permalink
Post by Colin Baxter
I'm not sure if it is possible. I don't know how, that's for
sure.
Okay, thanks. I don't think it's possible either.
Post by Colin Baxter
However, I am uncertain what it means to search incoming addresses
without a create/query since what be the point of the search in the
first place? I may have misunderstood your question, of course. Sorry
if that is the case.
'search checks the existing entries for those that match and shows them
and, optionally, allows you to update them if something has changed
(name, email). I.e. it only shows entries but queries if something is
different than expected. Quite useful. It's sort of halfway to 'query
without interrupting the workflow for email.

Thanks again,
eric
--
Eric S Fraga via Emacs 27.0.50 & org 9.1.14 on Debian buster/sid
Colin Baxter
2018-12-07 10:55:40 UTC
Permalink
Dear Eric.
Post by Eric S Fraga
Post by Colin Baxter
I'm not sure if it is possible. I don't know how, that's for
sure.
Okay, thanks. I don't think it's possible either.
Post by Colin Baxter
However, I am uncertain what it means to search incoming
addresses without a create/query since what be the point of the
search in the first place? I may have misunderstood your
question, of course. Sorry if that is the case.
'search checks the existing entries for those that match and shows
them and, optionally, allows you to update them if something has
changed (name, email). I.e. it only shows entries but queries if
something is different than expected. Quite useful. It's sort of
halfway to 'query without interrupting the workflow for email.
Ok, I understand. And reading the doc string for
bbdb-mua-update-interactive-p does not give me any hints as how it might
be achieved. :-(

Best wishes,
Eric S Fraga
2018-12-07 15:43:21 UTC
Permalink
Post by Colin Baxter
Ok, I understand. And reading the doc string for
bbdb-mua-update-interactive-p does not give me any hints as how it might
be achieved. :-(
Thanks for looking. No worries. It's only a minor itch that I wanted
to scratch... bbdb (& gnus) work so well for me overall that every
little bit that is not "perfect" really stands out! :-)
--
Eric S Fraga via Emacs 27.0.50 & org 9.1.13 on Debian buster/sid
Bob Newell
2018-12-07 22:16:50 UTC
Permalink
Post by Xavier Maillard
BBDB seems a good candidate but dunno if v3 is ok (there is really
poor litterature with it)
BBDB 3 is a bit arcane and does take time to learn and to get set up
for the way you like to work. It can be frustrating at first, but
believe me, your efforts will be well repaid in the end. At this
point, I would really miss it if it were to go away. It works
wonderfully with gnus (which is even more arcane and takes even more
time to get right, but also greatly rewards that time and trouble).

BBDB v3 is a big upgrade over v2, even though documentation lags. But
there is a mailing list and people there are very helpful.
--
Bob Newell
Honolulu, Hawai`i

Via Linux/Emacs/Gnus/BBDB.
Loading...