File: mail-hist.el.html

To use this package, add this to your init file:

    (require 'mail-hist)

Or you could do it with hooks in your .emacs:

    (add-hook 'mail-mode-hook 'mail-hist-define-keys)
    (add-hook 'mail-send-hook 'mail-hist-put-headers-into-history)
    (add-hook 'vm-mail-mode-hook 'mail-hist-define-keys) ;or rmail, etc

Once it's installed, use M-p and M-n from mail headers to recover previous/next contents in the history for that header, or, in the body of the message, to recover previous/next text of the message. This only applies to outgoing mail -- mail-hist ignores received messages.

Although repeated history requests do clear out the text from the previous request, an isolated request just inserts its text at point, so that you can mix the histories of different messages easily. This might be confusing at times, but there should be no problems that undo can't handle.

Thanks to Jim Blandy for mentioning ring.el. It saved a lot of time.

Defined variables (5)

mail-hist-header-regexpRegular expression for matching headers in a mail message.
mail-hist-header-ring-alistAlist of form (header-name . history-ring).
mail-hist-history-sizeThe maximum number of elements in a mail field’s history.
mail-hist-keep-historyNon-nil means keep a history for headers and text of outgoing mail.
mail-hist-text-size-limitDon’t store any header or body with more than this many characters.

Defined functions (12)

mail-hist-add-header-contents-to-ring(HEADER &optional CONTENTS)
mail-hist-beginning-of-header()
mail-hist-current-header-contents()
mail-hist-current-header-name()
mail-hist-define-keys()
mail-hist-forward-header(COUNT)
mail-hist-get-header-ring(HEADER)
mail-hist-next-input(HEADER)
mail-hist-previous-input(HEADER)
mail-hist-put-headers-into-history()
mail-hist-retrieve-and-insert(HEADER ACCESS-FUNC)
mail-hist-text-too-long-p(TEXT)

Defined faces (0)