vm filters; more choices and flexibility than current auto-folder-alist
The auto-folder-alist could be improved to cover a wider range of actions. Auto archiving is nice, but filtering (like mozilla-style or gmail style) can have mail attributes set, tags (labels) applied upon arrival and even be redirected to another mailbox. We could drop the auto-folder-alist for a more advanced filter list, which could of course be used for identically the same purpose as it is now in addition to the above, and equip it with the more advanced selection criteria available for virtual folders. The list could store "actions" (e.g. add label/save to folder/skip inbox/etc.) and be scanned upon arrival, likewise it could be scanned during auto-archiving via another type of action.
Some thought would be needed to best employ such a list, but some of the tools already exist for the virtual folders lists.
Blueprint information
- Status:
- Not started
- Approver:
- Uday Reddy
- Priority:
- Medium
- Drafter:
- Arik
- Direction:
- Approved
- Assignee:
- Arik
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Uday: Sounds like a good direction. It should not be too hard to implement this because many of the required elements are already present, such as selectors. The actions need some careful thought. But they can be defined incrementally. There will be a lot of demand for this stuff, once it goes out! And, demands for new extensions too!
Arik: What about the following entry point:
=== modified file 'lisp/vm-folder.el'
--- lisp/vm-folder.el 2010-08-19 00:00:02 +0000
+++ lisp/vm-folder.el 2010-08-19 00:33:19 +0000
@@ -4429,6 +4429,7 @@
(setq new-messages (cdr new-messages))))
+ >>>>>>>>> MAYBE INSERTION POINT
(run-hooks 'vm-arrived-
(if (and new-messages vm-virtual-buffers)
This would behave such that the arrived-
'(((selector) 'action "action args" 'action "action args"))
where selector is the same as virtual folder, i.e. (("folder spec") (selections spec)). I see a few actions to start with:
'move - save in another folder (this has spam filtering capability)
'add-label - set a label to the message
'set-attribute - mark message as read or whatever
Arik: see branch message-filters, which implements this for "label" and "set-attributes". An example of vm-auto-
takes message from me with the subject "test" and adds a label and marks as read:
(((("inbox")
(and
(author "arik")
(subject "test")))
label
("from-arik")
set-attributes
("read")))
I think the "move" action is going to take a little more work, since currently in VM there seems to be no way to save a message by it's message attribute but rather only if it is selected...
Arik: I change my mind. The "save" and "skip-inbox" actions are actually easy. Expunging can occur during this assimilate process without issues (that I can see so far) and can be run on a spare message list (i.e. just one message). It is even smooth such that I do not see the message flash before going away! The thing left to do is now make sure that the vm-arrived-