>>>>> "msj" == Martin Sjolin <[EMAIL PROTECTED]> writes:

    msj> Below is a first hack at doing this .... i do not like do
    msj> muck around within supercite this way. If somebody has a
    msj> better way (== cleaner) for adding a faked from entry to
    msj> sc-mail-info without changing sc-mail-glom-fram (notice that
    msj> this has to be during the end of process since we need the
    msj> from e-mail for lookup in BBDB).

[Remember I don't use BBDB and know next to nothing about it.  -BAW]

Would it be useful if sc-mail-process-headers ran a hook as the last
thing it did?   Something like:

(defun sc-mail-process-headers (start end)
  "Process original mail message's mail headers.
After processing, mail headers may be nuked.  Header information is
stored in `sc-mail-info', and any old information is lost unless an
error occurs."
  (interactive "r")
  (let ((info (copy-alist sc-mail-info))
        (attribs (copy-alist sc-attributions)))
    (setq sc-mail-info nil
          sc-attributions nil)
    (regi-interpret sc-mail-glom-frame start end)
    (if (null sc-mail-info)
        (progn
          (message "No mail headers found! Restoring old information.")
          (setq sc-mail-info info
                sc-attributions attribs))
      (regi-interpret (sc-mail-build-nuke-frame)
                      sc-mail-headers-start sc-mail-headers-end)
      ))
  (run-hooks 'sc-mail-process-headers-hook))

At this point all the mail info should be in sc-mail-info.  You would
also probably need an API to add arbitrary fields and values to
sc-mail-info (since you probably don't want to be hacking that list
manually).

-Barry

Reply via email to