I recently obtained bbdb 1.50 for use with lemacs 19.10 with mh-e. As
is, it does not work. It also does not work with lemacs 19.11 beta.
The main problem is that lemacs 19.10 says delete-windows-on takes
exactly one argument, but GNU emacs allows two. Also, the version of
mh-e that comes with lemacs 19 does not have mh-show-message-hook. It
is called mh-show-hook. Finally, calling bbdb/mh-update-record from
mh-show-hook fails because, for some reason, the current buffer is NOT
the message buffer.
A patch to fix this for lemacs 19 follows. It uses the appropriate
hook for mh-show-hook and uses a wrapper function to set-buffer
mh-show-buffer before calling bbdb/mh-update-record. Unfortunately, I don't
know how to take care of the delete-windows-on problem in a portable
way.
bbdb is a great little package!
Ray
Ray -----> [EMAIL PROTECTED]
Toy -----> Ericsson-GE RTP x7480
*** bbdb-mhe.el-orig Sat Feb 5 06:49:18 1994
--- bbdb-mhe.el Thu Aug 18 14:22:00 1994
***************
*** 119,124 ****
--- 119,129 ----
(set-buffer b)
(goto-char p)))
+ (defun bbdb/mh-show-message ()
+ "Hook function"
+ (save-excursion
+ (set-buffer mh-show-buffer)
+ (bbdb/mh-update-record)))
(defun bbdb/mh-pop-up-bbdb-buffer (&optional offer-to-create)
"Make the *BBDB* buffer be displayed along with the MH window,
***************
*** 207,262 ****
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name t)))
(defadvice mh-inc-folder (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name t)))
(defadvice mh-visit-folder (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name t)))
(defadvice mh-previous-undeleted-msg (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name t)))
(defadvice mh-next-undeleted-msg (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name t)))
(defadvice mh-delete-msg (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name t)))
(defadvice mh-reply (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name t)))
(defadvice mh-forward (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name t)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; mail from bbdb-mode using mh
--- 212,267 ----
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name)))
(defadvice mh-inc-folder (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name)))
(defadvice mh-visit-folder (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name)))
(defadvice mh-previous-undeleted-msg (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name)))
(defadvice mh-next-undeleted-msg (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name)))
(defadvice mh-delete-msg (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name)))
(defadvice mh-reply (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name)))
(defadvice mh-forward (before mh-bbdb-use-pop-up act)
"Turn off bbdb pop up window before the command. Used for commands
that (a) get confused by otherwindowness, and (b) will trigger a
re-pop-up when they're done."
(if (and mh-showing bbdb-use-pop-up)
! (delete-windows-on bbdb-buffer-name)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; mail from bbdb-mode using mh
***************
*** 269,275 ****
"Call this function to hook BBDB into MH-E."
(define-key mh-folder-mode-map ":" 'bbdb/mh-show-sender)
(define-key mh-folder-mode-map ";" 'bbdb/mh-edit-notes)
! (bbdb-add-hook 'mh-show-message-hook 'bbdb/mh-update-record)
)
(provide 'bbdb-mhe)
--- 274,281 ----
"Call this function to hook BBDB into MH-E."
(define-key mh-folder-mode-map ":" 'bbdb/mh-show-sender)
(define-key mh-folder-mode-map ";" 'bbdb/mh-edit-notes)
! ;;(bbdb-add-hook 'mh-show-message-hook 'bbdb/mh-update-record)
! (bbdb-add-hook 'mh-show-hook 'bbdb/mh-show-message)
)
(provide 'bbdb-mhe)