BBDBv3 + Wanderlust

Rob Walker <[email protected]> Sun, 25 Mar 2018 20:32:35 -0700
Newsgroups gmane.mail.wanderlust.general
Message-ID <851sg7mrzg.wl-rob__14190.7115270898$1522035096$gmane$org@ladle.net>
I came up with a minimal configuration that I can use to make WL and
BBDBv3 play nicely together.  It works like this:

;;; minimal settings
(setq wl-from "Rob Walker <[email protected]>")
(setq wl-local-domain "ladle.net")
(setq wl-message-id-domain "ladle.net")

(require 'bbdb)
(bbdb-initialize 'wl)
(bbdb-mua-auto-update-init 'wl)
(setq bbdb-update-records-p 'create)
;;; end of minimal settings


And then these two changes to code in the BBDBv3 source code.

bbdb-mua.el, within (defconst bbdb-mua-mode-alist

    (wl mime-view-mode wl-summary-mode wl-draft-mode)



bbdb-wl.el, modify bbdb/wl-header

;;;###autoload
(defun bbdb/wl-header (header)
  (with-current-buffer (get-buffer wl-summary-buffer-name)
    (elmo-message-entity-field
     (elmo-message-entity wl-summary-buffer-elmo-folder
			  (wl-summary-message-number))
     (intern (downcase header)) 'string)))


Some things that tripped me up while debugging.

1.  Delete the .elc files that are in the elpa/ directories
2.  Don't leave any backup files (~ or #) in the elpa/ directories
3.  elpa might do an install of code (in my case, it was an overnight
auto-upgrade) that can make things interesting.  Back up working
packages so you don't lose working packages.
4.  I had moved a file to file-backup.el to do work on file.el.  Then
a byte compilation happened somehow, causing my package-autoloads.el
file to reference the -backup file.  This was a lot of fun while
trying to figure out all of my changes to file.el weren't taking
place.
5.  DO NOT.  I repeat, DO NOT put this code in your WL init file.
;; (setq wl-summary-always-sticky-folder-list t)
This variable needs to be a regexp, and if it is t, and not "t" or
some other string, all sorts ofs automatic BBDB additional things will
fail in ways that I was never able to make sense.  This one line
killed me for a very long time, and forced me to revert to a binary
search to figure out the culprit.

I have requested that the above changes get into BBDBv3, but until
then, I have been adding them by hand with no problem.

Thanks,
Rob