I've installed both a bbdb-notice-hook and a bbdb-change-hook, but
contrary to the bbdb-notice-hook documentation, my change hook is
being called after I change a record in my notice hook.  This could
be a problem with the way I change the record, but I don't think so
since I just copied from the examples in bbdb-hooks.el.

My simple hooks are:

(defun my-bbdb-change-hook (record)
  (bbdb-record-putprop record 'last-change (bbdb-time-string)))
(defun my-bbdb-notice-hook (record)
  (bbdb-record-putprop record 'last-seen (bbdb-time-string)))

(add-hook 'bbdb-change-hook 'my-bbdb-change-hook)
(add-hook 'bbdb-notice-hook 'my-bbdb-notice-hook)


Here's the backtrace of the offending call to my change-hook with
the extra record data removed:

  my-bbdb-change-hook
  bbdb-invoke-hook(bbdb-change-hook
  bbdb-change-record
  bbdb-record-putprop
  my-bbdb-notice-hook
  bbdb-invoke-hook(bbdb-notice-hook
  bbdb-annotate-message-sender
  bbdb/gnus-update-record()
  funcall(bbdb/gnus-update-record)
  mapcar(funcall (bbdb/gnus-update-record
  run-hooks(gnus-article-prepare-hook)
  gnus-article-prepare(52 nil)
  gnus-summary-display-article(52)
  gnus-summary-next-page(nil)
  call-interactively(gnus-summary-next-page)

The documentation on bbdb-notice-hook says:

  Also note that bbdb-change-hook will NOT be called as a result of any
  modifications you may make to the record inside this hook.

BTW, This happens with version 1.50.

--
Dave Brennan                         HaL Computer Systems, Austin, TX, USA
[EMAIL PROTECTED]                      http://www.hal.com/~brennan

Reply via email to