projects
/
elisp
/
wanderlust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Version number is increased to 2.11.17.
[elisp/wanderlust.git]
/
elmo
/
elmo-split.el
diff --git
a/elmo/elmo-split.el
b/elmo/elmo-split.el
index
6dcd25d
..
db175a4
100644
(file)
--- a/
elmo/elmo-split.el
+++ b/
elmo/elmo-split.el
@@
-47,7
+47,7
@@
The format of this variable is a list of RULEs which has form like:
The 1st element CONDITION is a sexp which consists of following.
The 1st element CONDITION is a sexp which consists of following.
-1. Functions which accept argument FIELD-NAME and VALUE.
+1. Functions which accept arguments FIELD-NAME and VALUE.
FIELD-NAME is a symbol of the field name.
`equal' ... True if the field value equals to VALUE.
FIELD-NAME is a symbol of the field name.
`equal' ... True if the field value equals to VALUE.
@@
-62,12
+62,17
@@
FIELD-NAME is a symbol of the field name.
VALUE can contain \\& and \\N which will substitute
from matching \\(\\) patterns in the previous VALUE.
VALUE can contain \\& and \\N which will substitute
from matching \\(\\) patterns in the previous VALUE.
-2. Functions which accept any number of arguments.
+2. Functions which accept an argument SIZE, SIZE is some number.
+
+`<' ... True if the size of the message is less than SIZE.
+`>' ... True if the size of the message is greater than SIZE.
+
+3. Functions which accept any number of arguments.
`or' ... True if one of the argument returns true.
`and' ... True if all of the arguments return true.
`or' ... True if one of the argument returns true.
`and' ... True if all of the arguments return true.
-3. A symbol.
+4. A symbol.
When a symbol is specified, it is evaluated.
When a symbol is specified, it is evaluated.
@@
-112,7
+117,8
@@
Example:
:group 'elmo)
(defcustom elmo-split-default-action 'noop
:group 'elmo)
(defcustom elmo-split-default-action 'noop
- "Default action for messages which pass all rules."
+ "Default action for messages which pass all rules.
+It can be some ACTION as in `elmo-split-rule'."
:type '(choice (const :tag "do not touch" noop)
(const :tag "delete" delete)
(string :tag "folder name")
:type '(choice (const :tag "do not touch" noop)
(const :tag "delete" delete)
(string :tag "folder name")
@@
-152,6
+158,12
@@
Example:
(throw 'done nil)))
t))
(throw 'done nil)))
t))
+(defun elmo-split-> (buffer size)
+ (> (buffer-size buffer) size))
+
+(defun elmo-split-< (buffer size)
+ (< (buffer-size buffer) size))
+
(defun elmo-split-address-equal (buffer field value)
(with-current-buffer buffer
(let ((addrs (mapcar
(defun elmo-split-address-equal (buffer field value)
(with-current-buffer buffer
(let ((addrs (mapcar
@@
-282,6
+294,7
@@
If prefix argument ARG is specified, do a reharsal (no harm)."
(elmo-message-fetch folder msg
(elmo-make-fetch-strategy 'entire)
nil (current-buffer) 'unread))
(elmo-message-fetch folder msg
(elmo-make-fetch-strategy 'entire)
nil (current-buffer) 'unread))
+ (run-hooks 'elmo-split-fetch-hook)
(setq elmo-split-message-entity (mime-parse-buffer))
(catch 'terminate
(dolist (rule (append elmo-split-rule default-rule))
(setq elmo-split-message-entity (mime-parse-buffer))
(catch 'terminate
(dolist (rule (append elmo-split-rule default-rule))
@@
-314,7
+327,7
@@
If prefix argument ARG is specified, do a reharsal (no harm)."
action)))
(elmo-folder-create target-folder)))
(elmo-folder-open-internal target-folder)
action)))
(elmo-folder-create target-folder)))
(elmo-folder-open-internal target-folder)
- (elmo-folder-append-buffer target-folder 'unread)
+ (elmo-folder-append-buffer target-folder)
(elmo-folder-close-internal target-folder))
(error (setq failure t)
(incf fcount)))
(elmo-folder-close-internal target-folder))
(error (setq failure t)
(incf fcount)))
@@
-358,7
+371,7
@@
If prefix argument ARG is specified, do a reharsal (no harm)."
" Test: do nothing\n")
((function action)
(format " Test: function:%s\n"
" Test: do nothing\n")
((function action)
(format " Test: function:%s\n"
- (symbol-name action)))
+ (prin1-to-string action)))
(t
" ERROR: wrong action specified\n"))
(cond
(t
" ERROR: wrong action specified\n"))
(cond