* wl-vars.el (wl-summary-pick-field-default): Added `Last', `First' and
authorteranisi <teranisi>
Wed, 4 Oct 2000 03:56:52 +0000 (03:56 +0000)
committerteranisi <teranisi>
Wed, 4 Oct 2000 03:56:52 +0000 (03:56 +0000)
removed `Date'.
(wl-fldmgr-make-filter-default): New user option.

* wl-fldmgr.el (wl-fldmgr-make-filter): Simplify.
Use `elmo-read-search-condition' and `wl-fldmgr-make-filter-default'
(wl-fldmgr-filter-completion-alist): Abolish.

wl/ChangeLog
wl/wl-fldmgr.el
wl/wl-vars.el

index d6abfe4..56c4d93 100644 (file)
@@ -1,5 +1,13 @@
 2000-10-04  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * wl-vars.el (wl-summary-pick-field-default): Added `Last', `First' and
+       removed `Date'.
+       (wl-fldmgr-make-filter-default): New user option.
+
+       * wl-fldmgr.el (wl-fldmgr-make-filter): Simplify.
+       Use `elmo-read-search-condition' and `wl-fldmgr-make-filter-default'
+       (wl-fldmgr-filter-completion-alist): Abolish.
+
        * wl.el (wl): Don't check servers if arg is non-nil.
 
        * wl-draft.el (wl-draft-reply): Set only message-id string to
index b3dc8d5..bb52df7 100644 (file)
 
 ")
 
-(defconst wl-fldmgr-filter-completion-alist
-  '(("/last:")
-    ("/first:")
-    ("/since:")
-    ("/before:")
-    ("/from=")
-    ("/subject=")
-    ("/date=")
-    ("/to=")
-    ("/cc=")
-    ("/tocc=")
-    ("/body=")))
-
 ;;; Initial setup
 
 (defvar wl-fldmgr-mode-map nil)
@@ -1012,37 +999,16 @@ return value is diffs '(-new -unread -all)."
     (beginning-of-line)
     (if (looking-at wl-folder-group-regexp)
        (message "This folder is group")
-      (let ((tmp (wl-fldmgr-get-path-from-buffer)))
+      (let ((tmp (wl-fldmgr-get-path-from-buffer))
+           entity)
        (if (eq (cdr (nth 2 tmp)) 'access)
-           (message "Tan't change access group")
-         (let* ((entity (nth 4 tmp))
-                (old-entity entity)
-                old-filter
-                filter new-entity)
-           (unless entity (error "no folder"))
-           (when (string-match "^\\(\\(/[^/]+/\\)+\\)\\(.*\\)" entity)
-             (setq old-filter (substring entity
-                                         (match-beginning 1)
-                                         (match-end 1)))
-             (setq old-entity (substring entity
-                                         (match-beginning 3)
-                                         (match-end 3))))
-           (setq filter (completing-read "Filter: "
-                                         wl-fldmgr-filter-completion-alist
-                                         nil nil
-                                         (or old-filter "/")))
-           (unless (or (string= filter "")
-                       (string-match "/$" filter))
-             (setq filter (concat filter "/")))
-           (setq new-entity (concat filter old-entity))
-           (let ((entity new-entity)
-                 spec)
-             ;; check filter syntax
-             (while (eq
-                     (car (setq spec (elmo-folder-get-spec entity)))
-                     'filter)
-               (setq entity (nth 2 spec))))
-           (wl-fldmgr-add new-entity)))))))
+           (message "Can't change access group")
+         (setq entity (nth 4 tmp))
+         (unless entity (error "no folder"))
+         (wl-fldmgr-add (concat "/"
+                                (elmo-read-search-condition
+                                 wl-fldmgr-make-filter-default)
+                                "/" entity)))))))
 
 (defun wl-fldmgr-sort ()
   (interactive)
index b6a0384..dc4b188 100644 (file)
@@ -1158,12 +1158,13 @@ with wl-highlight-folder-many-face."
   "*Default field for pick."
   :type '(radio (const "From")
                (const "Subject")
-               (const "Date")
                (const "To")
                (const "Cc")
                (const "Body")
                (const "Since")
                (const "Before")
+               (const "Last")
+               (const "First")
                (string :tag "Other"))
   :group 'wl-summary)
 
@@ -1722,6 +1723,20 @@ ex.
   :type 'boolean
   :group 'wl-folder)
 
+(defcustom wl-fldmgr-make-filter-default "Body"
+  "*Default filter key while making filter on Folder."
+  :type '(radio (const "From")
+               (const "Subject")
+               (const "To")
+               (const "Cc")
+               (const "Body")
+               (const "Since")
+               (const "Before")
+               (const "Last")
+               (const "First")
+               (string :tag "Other"))
+  :group 'wl-folder)
+
 ;;; For Expire and Archive
 
 (defcustom wl-expire-alist nil