## 9 Message Attributes ¶

Each message in a folder has a set of attributes that VM will remember from session to session. Various VM commands set and unset these attributes. Here are the attributes maintained by VM.

`new`

  The message was retrieved from a spool file during this visit of the current folder.

`unread`

  The message was retrieved from a spool file during some past visit of the folder but is still unread.

`filed`

  The message has been saved to some folder.

`written`

  The body of the message has been saved to a file.

`edited`

  The message has been altered (with `vm-edit-message`) since it arrived.

`deleted`

  The message is deleted and will be removed from the folder at the next expunge.

`forwarded`

  The message has been forwarded with either `vm-forward-message`, `vm-send-digest` or one of their variants.

`redistributed`

  The message has been forwarded with the `vm-resend-message` command.

`replied`

  The message has been replied to.

You can set and unset these attributes directly by using `M-x vm-set-message-attributes`. You will be prompted in the minibuffer for names of the attributes and you can enter them with completion. Every attribute has an “un-” prefixed name you can use to unset the attribute, excepting “new” and “unread”, which are both negated by “read”. You can use a prefix argument with this command to affect multiple messages, and you can apply this command to marked messages with `M N`.

VM provides a special form of undo which allows changes to message attributes to be undone. Typing `C-x u` or `C-_` (`vm-undo`) undoes the last attribute change. Consecutive `vm-undo`’s undo further and further back. Any intervening command breaks the undo chain, after which the undo’s themselves become undoable by subsequent invocations of `vm-undo`.

Note that expunges, saves and message edits are not undoable.

Labels are user-defined message attributes. They can have any name and be assigned any meaning by you. Labels are added with `l a` (`vm-add-message-labels` and `l e` (`vm-add-existing-message-labels`, and are removed by `l d` (`vm-delete-message-labels`). BABYL format folders use labels to store basic attributed like “deleted” and “unread”. When visiting a BABYL folder VM uses these labels also in order to be compatible with other BABYL mailers. The labels used are “recent”, “unseen”, “deleted”, “answered”, “forwarded”, “redistributed”, “filed”, “edited” and “written”. If (and only if) you are using BABYL format folders, you should not use these label names for your own purposes.

All message attributes are stored in the folder. In order for attribute changes to be saved to disk, they must be written to the folder’s buffer prior to the buffer being saved. The variable `vm-flush-interval` controls how often that is done. A value of `t` means write the new attributes to the folder buffer whenever a change occurs. A value of `nil` means wait until just before the folder is saved before writing out the attributes. VM will work faster with this setting, but if Emacs or your system crashes, the auto-save file will contain no useful data pertaining to message attribute changes. The auto-save file will still reflect message edits and expunges. See Crash Recovery. A positive integer value n instructs VM to write out attribute changes every n seconds. The default value of this variable is `t`.