I have posted a fairly substantial revision of BBDB on CVS, see
the ChangeLog below.

Previously, the BBDB add-on moy-bbdb allowed one to update BBDB
using outgoing messages. This code duplicated a significant part of
the BBDB code. Also, each MUA support had already a significant
redundancy built in. Finally, the MH-E support had been missing up to
now in the new BBDB which would have added yet more redundant code
to BBDB. It was just painful to keep all this code consistent and up
to date, while the specific needs of different MUAs did not require
completely different code. All in all, the basic functions and
commands for each MUA were quite similar.

So now I have implemented a rather different approach, where this
redundancy has been removed. The new command bbdb-mua detects which
MUA is actually used. Then generic functions and commands can take
the (small) MUA-specific needs and requirements into account. The
bottom line is that the BBDB code has shrunk a lot and it became
much cleaner, while adding MH-E support and moy-bbdb functionality
become possible by adding just a few new lines of code.

(Now the MUA-specific files with BBDB code only contain those parts
of the code that are truly specific to one or another MUA.)

While I tested the new code for a few days, probably it still has
some rough edges that I have overlooked. Feedback welcome!

I would appreciate feedback on, in particular, two things:

- There are now several interactive commands to be used within MUAs
  to feed BBDB:

    bbdb-mua-display-records, bbdb-mua-display-sender,
    bbdb-mua-display-recipients, bbdb-mua-annotate-sender,
    bbdb-mua-annotate-recipients, bbdb-mua-edit-notes-sender,
    bbdb-mua-edit-notes-recipients

  It would be nice to have key bindings for these commands within
  each MUA. Is it possible to have one set of key bindings that works
  with all MUAs?

- MUA-specific BBDB insinuation adds key bindings for BBDB _and_ it
  puts bbdb-mua-pop-up-bbdb-buffer into respective MUA hooks to feed
  BBDB. Yet if outgoing messages are used to feed BBDB (as in
  moy-bbdb) there is no need to have bbdb-mua-pop-up-bbdb-buffer
  also in the hook for incoming mail.

  So what I am thinking about is that insinuation should be more
  flexible with respect to the different BBDB features it provides.
  Up to now, I do not have a good idea how to do this. Possibly,
  there should only be functions that add key bindings for BBDB to
  each MUA, while putting BBDB functions into various MUA hooks
  should only be described in the BBDB info pages (which are still
  awaiting the update...)

Suggestions welcome!

Roland


2010-12-15  Roland Winkler  <wink...@gnu.org>
        * lisp/bbdb.el (bbdb-mua-message): New customization group.
        (bbdb-update-records-p): Value may also be a function.
        (bbdb-mua-update-interactive-p): New variable.
        (bbdb-init-forms): Add message and mail mode support. Sendmail is
        depreciated (use mail instead). Remove outdated support for
        reportmail, supercite and w3.
        (bbdb-initialize): Updated accordingly. Do not test presence of
        features (which is not needed).
        (bbdb-insinuate-sendmail): Removed (use bbdb-insinuate-mail).
        ( bbdb-insinuate-message): Moved to bbdb-message.el.

        * lisp/bbdb-com.el (bbdb-mail, bbdb-mail-address): Simplified.

        * lisp/bbdb-mua.el (bbdb-mua, bbdb-message-header): New functions.
        (bbdb-get-address-components): Use bbdb-message-header.
        Simplified.
        (bbdb-update-records): New arg msg-key. Handle message cache.
        Arg update-p may also be a function.
        (bbdb-mua-update-records, bbdb-mua-update-mua)
        (bbdb-mua-update-interactive-p, bbdb-mua-pop-up-bbdb-buffer): New
        functions.
        (bbdb-mua-display-records, bbdb-mua-display-sender)
        (bbdb-mua-display-recipients, bbdb-mua-annotate-sender)
        (bbdb-mua-annotate-recipients, bbdb-mua-edit-notes-sender)
        (bbdb-mua-edit-notes-recipients): New commands.

        * lisp/bbdb-vm.el (bbdb/vm-header): Remove MIME decoding.
        (bbdb/vm-update-records, bbdb/vm-pop-up-bbdb-buffer)
        (bbdb/vm-show-records, bbdb/vm-show-sender)
        (bbdb/vm-show-recipients, bbdb/vm-annotate-sender)
        (bbdb/vm-edit-notes): Obsolete. Use instead generic functions in
        bbdb-mua.el.
        (bbdb-insinuate-vm): Use generic commands.

        * lisp/bbdb-gnus.el (bbdb/gnus-update-records)
        (bbdb/gnus-pop-up-bbdb-buffer, bbdb/gnus-show-records)
        (bbdb/gnus-show-sender, bbdb/gnus-show-recipients)
        (bbdb/gnus-annotate-sender, bbdb/gnus-edit-notes)
        (bbdb/gnus-summary-show-all-recipients): Obsolete. Use instead
        generic functions in bbdb-mua.el.
        (bbdb-insinuate-gnus): Use generic commands.
        (bbdb/gnus-lines-and-from-length): Removed as
        gnus-optional-headers appears to be obsolete, too.
        (bbdb/gnus-message-marker-field): New variable.
        (bbdb-message-marker-field): Declared obsolete.
        (bbdb/gnus-summary-get-sender, bbdb/gnus-summary-sender-in-bbdb)
        (bbdb/gnus-nnimap-folder-list-from-bbdb): Simplified.

        * lisp/bbdb-rmail.el (bbdb/rmail-update-records)
        (bbdb/rmail-pop-up-bbdb-buffer, bbdb/rmail-show-records)
        (bbdb/rmail-show-sender, bbdb/rmail-show-recipients)
        (bbdb/rmail-annotate-sender, bbdb/rmail-edit-notes)
        (bbdb/rmail-summary-show-all-recipients): Obsolete. Use instead
        generic functions in bbdb-mua.el.
        (bbdb-insinuate-rmail): Use generic commands.  Remove defadvice
        which has become obsolete because header Messge-ID is used for
        message caching.

        * lisp/bbdb-mhe.el, lisp/bbdb-message.el: New files.

        * lisp/Makefile: Updated to compile also the new files.

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to