[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bbdbv3 and wanderlust
From: |
Rob Walker |
Subject: |
bbdbv3 and wanderlust |
Date: |
Sat, 09 Sep 2017 16:25:40 -0700 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/25.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
Hi everyone,
tl;dr I tried a bunch of things, and I get stuck debugging in the
function bbdb/wl-header in the file bbdb-wl.el.
I have some questions about using bbdbv3 with Wanderlust. I have the
most simple setup I could implement.
I have only added melpa, installed wl and bbdb from melpa. ("adduser
g" and "ssh -X address@hidden" are great to create pristine environments)
My bbdb initialization code consists of the following lines:
(require 'bbdb)
(bbdb-initialize 'wl)
(bbdb-mua-auto-update-init 'wl)
The call to bbdb-initialize works, because
wl-init-hook is a variable defined in ‘wl-vars.el’.
Its value is (bbdb-insinuate-wl wl-plugged-init-icons wl-biff-init-icons)
Also, while I am in the Summary buffer, C-h k : returns
: runs the command bbdb-mua-display-sender (found in
wl-summary-mode-map), which is an interactive autoloaded compiled Lisp
function in ‘bbdb-mua.el’.
It is bound to :.
(bbdb-mua-display-sender &optional UPDATE-P)
The first time I do this, I get the message:
(New file)
At that moment, I am able to bring up a buffer called "bbdb", which
has the following in it:
;; -*- mode: Emacs-Lisp; coding: utf-8; -*-
;;; file-format: 7
So far, so good, right? Yes, except that file has no data in it. I
then hit : on a few more emails, and still nothing is added to the
bbdb file.
The second line seems to work as well, since:
wl-message-redisplay-hook is a variable defined in ‘wl-vars.el’.
Its value is (bbdb-mua-auto-update)
However, nothing happens when I'm reading emails. We enter
(bbdb-mua-auto-update), but we never exit the function.
(let* ((bbdb-silent-internal t)
(records (bbdb-mua-update-records header-class
(or update-p
bbdb-mua-auto-update-p)))
(bbdb-pop-up-window-size bbdb-mua-pop-up-window-size))
(if bbdb-mua-pop-up
(if records
(bbdb-display-records records bbdb-pop-up-layout
nil nil (bbdb-mua-window-p))
;; If there are no records, empty the BBDB window.
(bbdb-undisplay-records)))
records)
is the code that is failing.
We enter (bbdb-mua-update-records), but never exit it.
We enter (bbdb-mua), but never exit it. At the time of entering
(bbdb-mua),
bbdb-mua-mode-alist - ((vm vm-mode vm-virtual-mode vm-summary-mode
vm-presentation-mode) (gnus gnus-summary-mode gnus-article-mode gnus-tree-mode)
(rmail rmail-mode rmail-summary-mode) (mh mhe-mode mhe-summary-mode
mh-folder-mode) (mu4e mu4e-view-mode) (wl wl-summary-mode wl-draft-mode)
(message message-mode mu4e-compose-mode notmuch-message-mode) (mail mail-mode))
I believe the problem is that our display buffer is in
major-mode is a variable defined in ‘C source code’.
Its value is ‘mime-view-mode’
Original value was fundamental-mode
Local in buffer *WL:Message*-608594; global value is fundamental-mode
Automatically becomes buffer-local when set.
Documentation:
I added mime-view-mode to the (defconst bbdb-mua-mode-alist) and now
we exit (bbdb-mua) and (bbdb-mua-update-records). So with that one
change, I think we are able to get to the code at line 615 in
bbdb-mua.el which looks like this:
;; Wanderlust
((eq mua 'wl)
(bbdb-update-records (bbdb-get-address-components header-class)
update-p sort))
This is where I get lost. I am currently looking at
bbdb-get-adress-components, but I don't know how it is getting the
addresses. I suspect it isn't able to jump into the mime-view file
somehow. My thoughts moving forward are to figure out how the code at
https://bitbucket.org/cnngimenez/bbdb-wl grabs the headers, and use
that instead of what bbdb.el is doing. But that's just a guess.
Thanks,
Rob
- bbdbv3 and wanderlust,
Rob Walker <=