On 2011-12-27 11:33 +0800, Sam Steingold wrote: > I finally took the leap to switch to v 3. > In the process I doubled http://www.emacswiki.org/emacs/UpgradeBBDB
Thanks. > > I still have a couple of problems: > > 1. despite > (bbdb-mua-auto-update-init 'gnus 'message) > when I view an article, the *BBDB* buffer does not appear for the > known senders (marked with a bbdb/gnus-summary-known-poster-mark in > summary). When I do > (add-hook 'gnus-article-prepare-hook 'bbdb-mua-display-sender) > I am asked to create a record for the author of EVERY article I view. > This was controlled by > (setq bbdb/news-auto-create-p 'bbdb-ignore-most-messages-hook) > in v2. What do I do now? Have you tried customising bbdb-mua-auto-update-p? > 2. I want to avoid putting the email uid into the first name slot. > I.e., when creating a record for "f...@bar.com", I want the names to > be void, not "foo" "". > As a first step, I tried to find all such records I have: > > (defun address-name (address) > (if (string-match "@" address) > (substring address 0 (match-beginning 0)) > address)) > > (with-current-buffer (find-file-noselect bbdb-file) > (dolist (rec bbdb-records) > (when (and (equal (bbdb-record-lastname rec) "") > (find (bbdb-record-firstname rec) (bbdb-record-mail rec) > :key 'address-name :test 'equal)) > (print rec)))) > > Now, my question is: how do I modify these records? > > (setf (bbdb-record-lastname rec) nil > (bbdb-record-firstname rec) nil) > > does not work. > Thanks. The setters are: bbdb-record-set-lastname bbdb-record-set-firstname Note BBDB uses its own bbdb-defstruct macro and supports no setf. Using the standard defstruct gives us setfable records for free. Leo ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/