* modb-entity.el (elmo-msgdb-message-match-condition): Add new
authoryoichi <yoichi>
Fri, 2 Sep 2005 16:00:55 +0000 (16:00 +0000)
committeryoichi <yoichi>
Fri, 2 Sep 2005 16:00:55 +0000 (16:00 +0000)
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.

elmo/ChangeLog
elmo/modb-entity.el
wl/ChangeLog
wl/wl-folder.el
wl/wl-util.el

index a6f9a81..df60a77 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-02  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * modb-entity.el (elmo-msgdb-message-match-condition): Add new
+       condition `larger' and `smaller'.
+
 2005-07-30  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * elmo-util.el (elmo-safe-filename): Rewrite to replace
index df9eb01..b3b0759 100644 (file)
@@ -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)
index bb47d39..9170b6b 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-02  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * 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  <yoichi@geiin.org>
 
        * wl-vars.el (wl-summary-showto-folder-regexp): Update docstring.
index 42bff15..676ae9b 100644 (file)
@@ -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)
index 227d7e3..4d66436 100644 (file)
@@ -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