html2
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A virtual folder is a mapping of messages from one or more real folders into a container that in most ways acts like a real folder but has no real existence outside of VM. You can have a virtual folder that contains a subset of messages in a real folder or several real folders. A virtual folder can also contain a subset of messages from another virtual folder.
A virtual folder is defined by its name, the folders that it contains
and its selectors. The variable vm-virtual-folder-alist is a list of
the definitions of all named virtual folders. In order to visit a
virtual folder with the vm-visit-virtual-folder (V V) command,
a virtual folder must have an entry in vm-virtual-folder-alist.
Each virtual folder definition should have the following form:
(VIRTUAL-FOLDER-NAME
( (FOLDER-NAME ...)
(SELECTOR [ARG ...]) ... )
... )
|
VIRTUAL-FOLDER-NAME is the name of the virtual folder being defined. This is the name by which you and VM will refer to this folder.
FOLDER-NAME should be the name of a real folder. There may be more than one FOLDER-NAME listed, the SELECTORs within that sublist will apply to them all. If FOLDER-NAME is a directory, VM will assume this to mean that all the folders in that directory should be searched.
The SELECTOR is a Lisp symbol that tells VM how to decide whether a message from one of the folders specified by the FOLDER-NAMEs should be included in the virtual folder. Some SELECTORs require an argument ARG; unless otherwise noted ARG may be omitted.
authormatches message if ARG matches the author; ARG should be a regular expression.
author-or-recipientmatches message if ARG matches the author of the message or any of its recipients; ARG should be a regular expression.
andmatches the message if all its argument selectors match the message. Example:
(and (author "Derek McGinty") (new)) |
matches all new messages from Derek McGinty.
and takes any number of arguments.
anymatches any message.
deletedmatches message if it is flagged for deletion.
editedmatches message if it has been edited.
filedmatches message if it has been saved with its headers.
forwardedmatches message if it has been forwarded using
a variant of vm-forward-message or vm-send-digest.
headermatches message if ARG matches any part of the header portion of the message; ARG should be a regular expression.
header-or-textmatches message if ARG matches any part of the headers or the text portion of the message; ARG should be a regular expression.
labelmatches message if message has a label named ARG.
less-chars-thanmatches message if message has less than ARG characters. ARG should be a number.
less-lines-thanmatches message if message has less than ARG lines. ARG should be a number.
more-chars-thanmatches message if message has more than ARG characters. ARG should be a number.
more-lines-thanmatches message if message has more than ARG lines. ARG should be a number.
markedmatches message if it is marked, as with
vm-mark-message.
newmatches message if it is new.
notmatches message only if its selector argument does NOT match the message. Example:
(not (deleted)) |
matches messages that are not deleted.
ormatches the message if any of its argument selectors match the message. Example:
(or (author "Dave Weckl") (subject "drum")) |
matches messages from Dave Weckl or messages
with the string “drum” in their Subject header.
or takes any number of arguments.
readmatches message if it is neither new nor unread.
recentmatches message if it is new.
recipientmatches message if ARG matches any part of the recipient list of the message. ARG should be a regular expression.
redistributedmatches message if it has been redistributed using
vm-resend-message.
repliedmatches message if it has been replied to.
sent-aftermatches message if it was sent after the date ARG. A fully specified date looks like this:
``31 Dec 1999 23:59:59 GMT'' |
although the parts can appear in any order. You can leave out any part and it will default to the current date’s value for that part, with the exception of the ‘hh:mm:ss’ part which defaults to midnight.
sent-beforematches message if it was sent before the date ARG. A fully specified date looks like this:
``31 Dec 1999 23:59:59 GMT'' |
although the parts can appear in any order. You can leave out any part and it will default to the current date’s value for that part, with the exception of the hh:mm:ss part which defaults to midnight.
subjectmatches message if ARG matches any part of the message’s subject; ARG should be a regular expression.
textmatches message if ARG matches any part of the text portion of the message; ARG should be a regular expression.
unansweredmatches message if it has not been replied to.
Same as the unreplied selector.
undeletedmatches message if it has not been deleted.
uneditedmatches message if it has not been edited.
unfiledmatches message if it has not been saved with its headers.
unforwardedmatches message if it has not been forwarded using
vm-forward-message or vm-send-digest or one
of their variants.
unreadmatches message if it is not new and hasn’t been read.
unseenmatches message if it is not new and hasn’t been read.
Same as the unread selector.
unredistributedmatches message if it has not been redistributed using
vm-resend-message.
unrepliedmatches message if it has not been replied to.
virtual-folder-membermatches message if the message is already a member of some virtual folder currently being visited.
writtenmatches message if it has been saved without its headers.
older-thanmatches message if it is at least ARG days old
evalmatches message if evaluating the sexpr ARG yields t.
outgoingmatches message if your are the author of it, i.e. if the author matches
vm-summary-uninteresting-senders
spam-scorematches message if its spam score is at least ARG. See
vm-vs-spam-score-headers for configuration.
spam-wordmatches message if it contains a word from vm-spam-words-file
folder-namematches message if it is from a folder matching ARG
in-bbdbmatches if the addresses from the message are in the BBDB. With an option first argument you might select the address class and with an optional second argument if only the first address should be checked.
(in-bbdb authors) |
(in-bbdb recipients t) |
attachmentmatches if a message contains an attachment resp. its text matched
vm-vs-attachment-regexp
vm-modematches the message if in vm-mode and one of its argument selectors match the message.
mail-modematches the message if in mail-mode and one of its argument selectors match the message.
Here is an example that you may find useful as a template to create virtual folder definitions.
(setq vm-virtual-folder-alist
'(
;; start virtual folder definition
("virtual-folder-name"
(("/path/to/folder" "/path/to/folder2")
(header "foo")
(header "bar")
)
(("/path/to/folder3" "/path/to/folder4")
(and (header "baz") (header "woof"))
)
)
;; end of virtual folder definition
)
)
|
The text selector provides a particularly effective way to search
for strings in messages. It is better than the
vm-isearch-forward/backward functions because it avoids searching
inside encoded attachments, hence faster.
Again, you visit virtual folders you have defined in
vm-virtual-folder-alist with V V. Once you’ve
visited a virtual folder most VM commands work as they do in a
normal folder. There are exceptions. If you use S
(vm-save-folder, the folder save command will be invoked
on each real folder in turn. Similarly if you use g
(vm-get-new-mail in a virtual folder, mail is retrieved
from the spool files associated with each of the real folders.
If any of the retrieved messages are matched by the virtual
folder’s selector, they will be added to the virtual folder.
These commands will signal an error when invoked if the current folder is a virtual folder:
vm-save-buffer
vm-write-file
vm-change-folder-type
vm-expunge-imap-messages
vm-expunge-pop-messages
|
Normally messages in a virtual folder share attributes with the
underlying real messages. For example, if you delete a message
in a virtual folder, it is also flagged as deleted in the real
folder. If you then run vm-expunge-folder in the virtual folder,
the deleted message is expunged from the virtual folder and from
the real folder. Labels are shared between virtual and real
messages. However virtual folders have their own set of message
marks.
To make virtual folders not share message attributes with real
folders by default, set the variable vm-virtual-mirror to nil.
This should be done in your VM init file and you should use
setq-default, as this variable is automatically local to all
buffers.
(setq-default vm-virtual-mirror nil) |
If you want to change whether the currently visited virtual
folder shares attributes with the underlying real folders, use the
command vm-toggle-virtual-mirror (bound to V M). If the
virtual folder is currently sharing attributes it will no longer
be. If it is not sharing attributes with the underlying folders
then it will be.
The command vm-create-virtual-folder (bound to V C) lets
you interactively create a virtual folder from the messages of
the current folder, using exactly one selector to choose the
messages. If you type V C header RET pigs, VM will create
a folder containing only those messages that contain the string
‘pigs’ in the header.
The command vm-apply-virtual-folder (bound to V X) tries
the selectors of a named virtual folder against the messages of
the current folder and creates a virtual folder containing the
matching messages.
The keys V S and V A invoke
vm-create-virtual-folder-same-subject and
vm-create-virtual-folder-same-author which create virtual folders
containing all the messages in the current folder with the same
subject or author as the current message.
The keys V O vm-virtual-omit-message will omit a message from the
virtual folder and V U vm-virtual-update-folders will force an
update of the virtual folder.
M-x vm-virtual-check-selector-interactive allows to test selectors interactively and will emit debug information when called with a prefix argument.
Automatic marking of messages for deletion based on a selector can be
achieved with vm-virtual-auto-delete-message for interactive use and the
function and vm-virtual-auto-delete-messages when added to the VM hook
vm-arrived-messages-hook. This can be quite handy for marking spam for
deletion.
M-x vm-virtual-save-message can be used to save messages to the
folder corresponding to the first matching selector and the function
vm-virtual-auto-archive-messages can file messages based on
selectors (see also vm-auto-archive-messages).
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Build Daemon user on May 13, 2010 using texi2html 1.82.