bbdb-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bbdbv3 and wanderlust


From: Rob Walker
Subject: Re: bbdbv3 and wanderlust
Date: Wed, 13 Sep 2017 01:01:43 -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)

I think I fixed it.  I modified three files, and the diffs fit on one
screen.  I don't know how to get these things in the code base.  I
don't know what needs to be done to get this into the official
codebase, but I'm happy to do whatever is needed.

Here is the extent of my changes.  I will be happy to give anyone the
config files that I am using.  They are quite minimal for this
development effort.

Thanks,
Rob

pwd ; for i in `find . | grep pristine`; do { j=$(echo ${i} | sed -e 
's/-pristine//'); echo "old file: ${j}"; echo "new file: ${i}"; diff ${i} ${j}; 
}; done
/home/h
old file: ./.emacs.d/elpa/bbdb-20170725.300/bbdb-wl.el
new file: ./.emacs.d/elpa/bbdb-20170725.300/bbdb-wl-pristine.el
39,42c39,43
<   (elmo-message-entity-field
<    (elmo-message-entity wl-summary-buffer-elmo-folder
<                         (wl-summary-message-number))
<    (intern (downcase header)) 'string))
---
>   (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)))
old file: ./.emacs.d/elpa/bbdb-20170725.300/bbdb-mua.el
new file: ./.emacs.d/elpa/bbdb-20170725.300/bbdb-mua-pristine.el
72c72
<     (wl wl-summary-mode wl-draft-mode)
---
>     (wl wl-summary-mode wl-draft-mode mime-view-mode)
old file: ./.emacs.d/elpa/wanderlust-20170627.2306/wl-summary.el
new file: ./.emacs.d/elpa/wanderlust-20170627.2306/wl-summary-pristine.el
2173,2178c2173,2179
<   (save-excursion
<     (beginning-of-line)
<     (if (or (re-search-forward "\r\\(-?[0-9]+\\)" (point-at-eol) t)
<           (re-search-forward "^ *\\(-?[0-9]+\\)" (point-at-eol) t))
<       (string-to-number (wl-match-buffer 1))
<       nil)))
---
>   (with-current-buffer (get-buffer wl-summary-buffer-name)
>     (save-excursion
>       (beginning-of-line)
>       (if (or (re-search-forward "\r\\(-?[0-9]+\\)" (point-at-eol) t)
>             (re-search-forward "^ *\\(-?[0-9]+\\)" (point-at-eol) t))
>         (string-to-number (wl-match-buffer 1))
>       nil))))



On Sat, 09 Sep 2017 16:25:40 -0700,
Rob Walker wrote:
> 
> 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
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]