On Wed Jul 11 2012 Sam Steingold wrote:
> btw, when I have a record for "John Smith <f...@bar.com>" and I see an
> article by "John Smith <q...@bar.com>", bbdb shows John's record but
> does not offer to update the net field unless I try to edit the record
> with ";".  is this intentional?

BBDB now accepts a new value `update' for update-p, see the README
file. This will update existing records, but it will not attempt to
create new records. I kept the value `search' for update-p which
never modifies existing records.

When I looked into this, I had a disappointing surprise. I cannot
believe that even today some fairly basic design flaws of BBDB 2 are
popping up in BBDB 3:

BBDB uses a "message cache" for caching the BBDB records associated
with a message. I had made a silly mistake that made the cache
ineffective in BBDB 3. Well, that bug was easily fixed. But with the
cache being effective again, some fairly important other things are
not working anymore.

- The message cache contains for each message those records that
  have been recognized / created when the message was first viewed
  in the MUA. If these were the records matching the recipients
  (say, following a call of bbdb-mua-display-recipients), a
  subsequent call of bbdb-mua-display-sender again displays the
  recipients, because only those records are stored in the cache.
  Not quite the expected behavior.

- Messages are identified in the cache via `assq' and "message
  keys". VM uses a message-pointer and rmail uses an integer message
  key that work fine with assq. Yet for gnus, BBDB 2 used the
  function bbdb/gnus-get-message-id that returns the value of the
  "Message-ID" header of a message as a string. For BBDB 3, I even
  copied this idea for other MUAs... Yet strings don't work with
  assq and all the caching fails.

  Here a simple work appears to be assoc instead of assq. Yet this
  is slower than assq, and I have doubts that then all the caching
  is still worth the extra coding effort (in particular, when
  properly keeping track of senders and recipients).

So far, nobody noticed a bottleneck because of the broken message
cache in BBDB 3. I am tempted to remove this feature altogether...
(better suggestions welcome)
  
In the meanwhile, I have changed the default value of
bbdb-message-caching to nil.

On Tue Jul 17 2012 Sam Steingold wrote:
> I thought that bbdb-canonicalize-mail-function would do the job by
> returning nil or "" for bad e-mail addresses, and it worked for quite
> some time (it returned nil).

Use a return value of nil to ignore a mail address.  I cannot
promise, though, that I already identified all instances in the code
where this can be relevant.


2012-07-17  Roland Winkler  <wink...@gnu.org>
        * lisp/bbdb.el (bbdb-mua-update-interactive-p)
        (bbdb-mua-auto-update-p, bbdb-update-records-p): Update docstring.
        (bbdb-canonicalize-mail-function): Update docstring.
        (bbdb-message-caching): Use default nil till caching is fixed.
        (bbdb-cache-deleted-p, bbdb-cache-set-deleted-p)
        (bbdb-record-deleted-p, bbdb-record-set-deleted-p): Removed.
        (bbdb-display-name-organization): Use memq.

        * lisp/bbdb-mua.el (bbdb-mua, bbdb-message-header): Use memq.
        (bbdb-get-address-components): Allow mail to be nil. Use
        member-ignore-case.
        (bbdb-update-records): New value update for arg update-p.  Use
        memq.
        (bbdb-message-get-cache): Simplify.
        (bbdb-message-set-cache): Remove old value from cache.
        (bbdb-annotate-message): New value update for arg update-p.
        Operate on all records found by bbdb-message-search.  Return list
        of records.  Use member-ignore-case.
        (bbdb-mua-update-records): Use memq.
        (bbdb-auto-notes): Use member-ignore-case and assoc-string.

        * lisp/bbdb-com.el (bbdb-read-name, bbdb-insert-field): Use memq.
        (bbdb-complete-mail): Use member-ignore-case.

        * lisp/bbdb-message.el (bbdb/message-update-records-p)
        * lisp/bbdb-rmail.el (bbdb/rmail-update-records-p)
        * lisp/bbdb-mhe.el (bbdb/mh-update-records-p)
        * lisp/bbdb-gnus.el (bbdb/gnus-update-records-p)
        * lisp/bbdb-vm.el (bbdb/vm-update-records-p): Update
        docstring.

        * lisp/bbdb-print.el (bbdb-print-record): Do not use
        bbdb-record-deleted-p.

        * README: Update usage of update-p.


BBDB is available at
http://savannah.nongnu.org/projects/bbdb/
To check it out, use
git clone git://git.savannah.nongnu.org/bbdb.git

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to