VM has many hook variables that allow you to run functions when certain events occur. Here is a list of the hooks and when they are run. (If you don't write Emacs-Lisp programs you can skip this chapter.)
vm-select-new-message-hook
|
List of hook functions called every time a message with the ``new'' attribute is made to be the current message. When the hooks are run the current buffer will be the folder containing the message and the start and end of the message will be bracketed by (point-min) and (point-max). |
vm-select-unread-message-hook
|
List of hook functions called every time a message with the ``unread'' attribute is made to be the current message. When the hooks are run the current buffer will be the folder containing the message and the start and end of the message will be bracketed by (point-min) and (point-max). |
vm-select-message-hook
|
List of hook functions called every time a message is made to be the current message. When the hooks are run the current buffer will be the folder containing the message and the start and end of the message will be bracketed by (point-min) and (point-max). |
vm-arrived-message-hook
|
List of hook functions called once for each message gathered from the
system mail spool, or from another folder with |
vm-spooled-mail-waiting-hook
|
List of functions called when VM first notices mail is spooled for a folder. The folder buffer will be current when the hooks are run. |
vm-arrived-messages-hook
|
List of hook functions called after VM has gathered a group
of messages from the system mail spool, or from another
folder with |
vm-reply-hook
|
List of hook functions to be run after a Mail mode composition
buffer has been created for a reply. VM runs this hook and then
runs |
vm-forward-message-hook
|
List of hook functions to be run after a Mail mode
composition buffer has been created to forward a message. VM
runs this hook and then runs |
vm-resend-bounced-message-hook
|
List of hook functions to be run after a Mail mode
composition buffer has been created to resend a bounced message.
VM runs this hook and then runs |
vm-resend-message-hook
|
List of hook functions to be run after a Mail mode composition
buffer has been created to resend a message. VM runs this hook
and then runs |
vm-send-digest-hook
|
List of hook functions to be run after a Mail mode composition
buffer has been created to send a digest. VM runs this hook and
then runs |
vm-mail-hook
|
List of hook functions to be run after a Mail mode
composition buffer has been created to send a non specialized
message, i.e. a message that is not a reply, forward, digest,
etc. VM runs this hook and then runs |
vm-summary-update-hook
|
List of hook functions called just after VM updates an existing entry a folder summary. |
vm-summary-redo-hook
|
List of hook functions called just after VM adds or deletes entries from a folder summary. |
vm-visit-folder-hook
|
List of hook functions called just after VM visits a folder.
It doesn't matter if the folder buffer already exists, this hook
is run each time |
vm-retrieved-spooled-mail-hook
|
List of hook functions called just after VM has retrieved a group of messages from your system mailbox(es). When these hooks are run, the messages have been added to the folder buffer but not the message list or summary. When the hooks are run, the current buffer will be the folder where the messages were incorporated. |
vm-edit-message-hook
|
List of hook functions to be run just before a message is edited.
This is the last thing |
vm-mail-mode-hook
|
List of hook functions to be run after a Mail mode composition buffer has been created. This is the last thing VM does before leaving you in the Mail mode buffer. |
vm-mode-hook
|
List of hook functions to run when a buffer enters |
vm-mode-hooks
|
Old name for |
vm-summary-mode-hook
|
List of hook functions to run when a VM summary buffer is created. The current buffer will be that buffer when the hooks are run. |
vm-summary-mode-hooks
|
Old name for |
vm-virtual-mode-hook
|
List of hook functions to run when a VM virtual folder buffer is created. The current buffer will be that buffer when the hooks are run. |
vm-presentation-mode-hook
|
List of hook functions to run when a VM presentation buffer is created. The current buffer will be that buffer when the hooks are run. Presentation buffers are used to display messages when some type of decoding must be done to the message to make it presentable. E.g. MIME decoding. |
vm-quit-hook
|
List of hook functions to run when you quit VM. This applies to any VM quit command. |
vm-summary-pointer-update-hook
|
List of hook functions to run when VM summary pointer is updated. When the hooks are run, the current buffer will be the summary buffer. |
vm-display-buffer-hook
|
List of hook functions that are run every time VM wants to display a buffer. When the hooks are run the current buffer will be the buffer that VM wants to display. The hooks are expected to select a window and VM will display the buffer in that window. If you use display hooks, you should not use VM's builtin window configuration system as the result is likely to be confusing. |
vm-undisplay-buffer-hook
|
List of hook functions that are run every time VM wants to remove a buffer from the display. When the hooks are run the current buffer will be the buffer that VM wants to disappear. The hooks are expected to do the work of removing the buffer from the display. The hook functions should not kill the buffer. If you use undisplay hooks, you should not use VM's builtin window configuration system as the result is likely to be confusing. |
vm-iconify-frame-hook
|
List of hook functions that are run whenever VM iconifies a frame. |
vm-menu-setup-hook
|
List of hook functions that are run just after all menus are initialized. |
vm-mime-display-function
|
If non- |
mail-yank-hooks
|
Hooks called after a message is yanked into a mail composition. (This hook is deprecated, you should use mail-citation-hook instead.) Value is a list of functions to be run. Each hook function can find the newly yanked message between point and mark. Each hook function should return with point and mark around the yanked message.
See the documentation for |
mail-citation-hook
|
Hook for modifying a citation just inserted in the mail buffer. Each hook function can find the citation between (point) and (mark t). And each hook function should leave point and mark around the citation text as modified.
If this hook is entirely empty, i.e. |