"Roland Winkler" <wink...@gnu.org> writes: > On Thu Jun 6 2013 Kevin Brubeck Unhammer wrote: >> I want BBDB3 to search (and, if exists, add new email addresses) when >> reading mail in Gnus; and when sending mail, always create a new entry >> if it doesn't exist already. I thought >> >> (setq bbdb-update-records-p 'update >> bbdb/message-update-records-p 'create) >> >> would do it, but it seems like bbdb/message-update-records-p is >> not used by any of the code. > > bbdb/message-update-records-p is just a fallback, see the docstring
Ah, so it's only used if bbdb-update-records-p is nil? (When I grepped for it in the code I found nothing so I thought it was unused.) > of this variable. You could make the value of bbdb-update-records-p > a function (untested) > > (setq bbdb-update-records-p > (lambda () > (let ((mua (bbdb-mua))) > (cond ((eq mua 'gnus) 'update) > ((eq mua 'message) 'create) > (t 'search))))) This seems to work, as well as (setq bbdb-update-records-p nil bbdb/gnus-update-records-p 'update bbdb/message-update-records-p 'create) However, now when I send an email to a new address, I get: Debugger entered--Lisp error: (wrong-type-argument arrayp nil) aset(nil 0 "") bbdb-cache-set-fl-name(nil "") (let ((fl-name (bbdb-concat (quote name-first-last) first last)) (lf-name (bbdb-concat (quote name-last-first) last first)) (cache (bbdb-record-cache record))) (bbdb-cache-set-fl-name cache fl-name) (bbdb-cache-set-lf-name cache lf-name) (bbdb-puthash fl-name record) (bbdb-puthash lf-name record) fl-name) bbdb-record-set-name([nil nil nil nil nil nil nil nil [nil nil nil nil nil nil] nil] t t) (or (bbdb-cache-fl-name (bbdb-record-cache record)) (bbdb-record-set-name record t t)) bbdb-record-name([nil nil nil nil nil nil nil nil [nil nil nil nil nil nil] nil]) bbdb-annotate-message((nil "test...@example.com" "To" recipients message) create) byte-code("\304=\203\305 \304\"\2027\306=\203\305 \307\"\2027\310=\203'\305 \310\"\2027\311=\2057\312 @ \211A@)\"\313\207" [bbdb-update-records-p address x hits create bbdb-annotate-message query bbdb-prompt-for-create update search bbdb-message-search nil] 4) bbdb-update-records(((nil "test...@example.com" "To" recipients message)) bbdb-select-message) bbdb-mua-update-records(nil bbdb-select-message) bbdb-mua-auto-update() run-hooks(message-send-hook) message-send(nil) message-send-and-exit(nil) message-wait-send-and-exit(nil) call-interactively(message-wait-send-and-exit nil nil) I'm on BBDB version 3.02 ($Date: 2013/05/15 13:17:58 $) -- Kevin Brubeck Unhammer GPG: 0x766AC60C ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/