From: yoichi Date: Fri, 2 Sep 2005 16:00:55 +0000 (+0000) Subject: * modb-entity.el (elmo-msgdb-message-match-condition): Add new X-Git-Tag: wl-2_15_3~58 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=053d5502ac64ee7f484010c79c6c8d6c7a70f5f5;p=elisp%2Fwanderlust.git * modb-entity.el (elmo-msgdb-message-match-condition): Add new condition `larger' and `smaller'. * wl-util.el (wl-read-search-condition-internal): Add "Larger" and "Smaller". * wl-folder.el (wl-folder-complete-filter-condition): Ditto. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index a6f9a81..df60a77 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2005-09-02 Yoichi NAKAYAMA + + * modb-entity.el (elmo-msgdb-message-match-condition): Add new + condition `larger' and `smaller'. + 2005-07-30 Hiroya Murata * elmo-util.el (elmo-safe-filename): Rewrite to replace diff --git a/elmo/modb-entity.el b/elmo/modb-entity.el index df9eb01..b3b0759 100644 --- a/elmo/modb-entity.el +++ b/elmo/modb-entity.el @@ -554,6 +554,13 @@ If each field is t, function is set as default converter." (if (string= key "since") (not (elmo-time< field-date specified-date)) (elmo-time< field-date specified-date)))) + ((or (string= key "larger") + (string= key "smaller")) + (let ((bytes (elmo-msgdb-message-entity-field handler entity 'size)) + (threshold (string-to-int (elmo-filter-value condition)))) + (if (string= key "larger") + (> bytes threshold) + (< bytes threshold)))) ((setq field-value (elmo-msgdb-message-entity-field handler entity (intern key) diff --git a/wl/ChangeLog b/wl/ChangeLog index bb47d39..9170b6b 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,9 @@ +2005-09-02 Yoichi NAKAYAMA + + * wl-util.el (wl-read-search-condition-internal): Add "Larger" and + "Smaller". + * wl-folder.el (wl-folder-complete-filter-condition): Ditto. + 2005-08-04 Yoichi NAKAYAMA * wl-vars.el (wl-summary-showto-folder-regexp): Update docstring. diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 42bff15..676ae9b 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -3043,7 +3043,8 @@ Call `wl-summary-write-current-folder' with current folder name." (mapcar (lambda (x) (list (concat (downcase x) ":"))) (append '("last" "first" "from" "subject" "to" "cc" "body" - "since" "before" "tocc") + "since" "before" "tocc" + "larger" "smaller") elmo-msgdb-extra-fields)))) (if (not flag) (try-completion string candidate) diff --git a/wl/wl-util.el b/wl/wl-util.el index 227d7e3..4d66436 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -1004,7 +1004,8 @@ is enclosed by at least one regexp grouping construct." (let* ((completion-ignore-case t) (denial-fields (nconc (mapcar 'capitalize elmo-msgdb-extra-fields) '("Flag" "Since" "Before" - "From" "Subject" "To" "Cc" "Body" "ToCc"))) + "From" "Subject" "To" "Cc" "Body" "ToCc" + "Larger" "Smaller"))) (field (completing-read (format "%s (%s): " prompt default) (mapcar 'list