> * Leo <fqy....@tznvy.pbz> [2011-12-27 12:30:57 +0800]: > > 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.
Welcome - more is coming... >> 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? I set it to 'search and now I am back to square one when the *BBDB* buffer is only updated when I hit ":". Moreover, what I noticed now is that bbdb-auto-notes works on the current bbdb record BEFORE is has been updated to reflect the current message. E.g. if the message from John contains "Organization: FOO" and *BBDB* shows Bill, then Bill's organization is set to FOO. Also, I want *BBDB* to display automatically both the sender and all the recipients, the sender first (regardless of the alphabetical order). >> 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 Will using them propagate to bbdb-file when I do bbdb-save? Presumably, yes, I am just trying to make sure... Now, how do I prevent such useless first/last name from being set from the mail in the first place? > Using the standard defstruct gives us setfable records for free. why aren't we using it?! -- Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000 http://camera.org http://thereligionofpeace.com http://memri.org http://iris.org.il http://jihadwatch.org http://mideasttruth.com WinWord 6.0 UNinstall: Not enough disk space to uninstall WinWord ------------------------------------------------------------------------------ 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/