Last week I posted a patch for bbdb-mhe.el to get bbdb to work with
lemacs.  The first part of the patch about delete-windows-on is
correct.  However, in the next release of lemacs, the
delete-windows-on will be compatible with Emacs 19.  

There was also a patch about mh-show-message-hook.  While the patch
works, it is not great.  The problem was not getting the pop-up bbdb
buffer when displaying a new message.  This is due to the fact that
current-buffer is set to +inbox when bbdb/mh-update-record is called.
This happens because mh-display-msg does a set-buffer to the folder.

Thus, a better solution than my previous patch is to do this:

(defun bbdb/mh-show-message ()
  "Hook function for showing messages in MH-E."
  (save-excursion
    (set-buffer mh-show-buffer)
    (bbdb/mh-update-record)))

with

  (bbdb-add-hook 'mh-show-message-hook 'bbdb/mh-show-message)

instead of

  (bbdb-add-hook 'mh-show-message-hook 'bbdb/mh-update-record)


The save-excursion may not be necessary, but I wanted to be safe.
Perhaps the following would be better:

(defun bbdb/mh-show-message ()
  "Hook function for showing messages in MH-E."
  (let ((old-buffer current-buffer))
    (set-buffer mh-show-buffer)
    (bbdb/mh-update-record)
    (set-buffer old-buffer)))

Hope this will help someone besides me to get bbdb working.


Ray -----> [EMAIL PROTECTED]
Toy -----> Ericsson-GE RTP x7480

Reply via email to