* wl-vars.el (wl-folder-process-duplicates-alist): New user option.
authorteranisi <teranisi>
Thu, 26 Apr 2001 03:46:32 +0000 (03:46 +0000)
committerteranisi <teranisi>
Thu, 26 Apr 2001 03:46:32 +0000 (03:46 +0000)
* wl-summary.el (wl-summary-buffer-set-folder): Set up `process-duplicates'
 slot.

* wl-highlight.el (wl-highlight-message): Don't highlight as signature
 if detection failed.

* elmo.el (elmo-folder): Added process-duplicates slot.

* elmo-pipe.el (elmo-folder-mark-as-read): Define.
 (elmo-folder-unmark-read): Ditto.
 (elmo-folder-unmark-important): Ditto.
 (elmo-folder-mark-as-important): Ditto.

* elmo-multi.el (elmo-multi-folder-append-msgdb): Implemented
 duplicated message processing.

* elmo.el (elmo-generic-folder-append-msgdb): Ditto.

elmo/ChangeLog
elmo/elmo-multi.el
elmo/elmo-pipe.el
elmo/elmo-vars.el
elmo/elmo.el
wl/ChangeLog
wl/wl-highlight.el
wl/wl-summary.el
wl/wl-vars.el

index 5ffcf35..f946577 100644 (file)
@@ -1,3 +1,17 @@
+2001-04-26  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo.el (elmo-folder): Added process-duplicates slot.
+
+       * elmo-pipe.el (elmo-folder-mark-as-read): Define.
+       (elmo-folder-unmark-read): Ditto.
+       (elmo-folder-unmark-important): Ditto.
+       (elmo-folder-mark-as-important): Ditto.
+
+       * elmo-multi.el (elmo-multi-folder-append-msgdb): Implemented
+       duplicated message processing.
+
+       * elmo.el (elmo-generic-folder-append-msgdb): Ditto.
+
 2001-04-24  Hiroya Murata  <hiroya@use-ebisu.co.jp>
 
        * elmo-util.el (elmo-list-subdirectories-1): New function.
index 5eb4285..c8f4d47 100644 (file)
                                         (elmo-folder-msgdb folder))
                                        number-alist)))
             (cur number-alist)
-            to-be-deleted
+            overview to-be-deleted
             mark-alist same)
        (while cur
          (setq all-alist (delq (car cur) all-alist))
                ;; base is also same...delete it!
                (setq to-be-deleted (append to-be-deleted (list (car cur))))))
          (setq cur (cdr cur)))
-       (setq mark-alist (elmo-delete-if
-                         (function
-                          (lambda (x)
-                            (assq (car x) to-be-deleted)))
-                         (elmo-msgdb-get-mark-alist append-msgdb)))
-       (elmo-msgdb-set-mark-alist append-msgdb mark-alist)
+       (cond ((eq (elmo-folder-process-duplicates-internal folder)
+                  'hide)
+              ;; Hide duplicates.
+              (elmo-msgdb-append-to-killed-list folder to-be-deleted)
+              (setq overview (elmo-delete-if
+                              (lambda (x)
+                                (memq (elmo-msgdb-overview-entity-get-number
+                                       x)
+                                      to-be-deleted))
+                              (elmo-msgdb-get-overview append-msgdb)))
+              ;; Should be mark as read.
+              (elmo-folder-mark-as-read folder to-be-deleted)
+              (elmo-msgdb-set-overview append-msgdb overview))
+             ((eq (elmo-folder-process-duplicates-internal folder)
+                  'read)
+              ;; Mark as read duplicates.
+              (elmo-folder-mark-as-read folder to-be-deleted))
+             (t
+              ;; Do nothing.
+              (setq to-be-deleted nil)))
        (elmo-folder-set-msgdb-internal folder
                                        (elmo-msgdb-append
                                         (elmo-folder-msgdb folder)
index b708d1e..a589361 100644 (file)
   (elmo-folder-message-make-temp-files
    (elmo-pipe-folder-dst-internal folder) numbers start-number))
 
+(luna-define-method elmo-folder-mark-as-read ((folder elmo-pipe-folder)
+                                             numbers)
+  (elmo-folder-mark-as-read (elmo-pipe-folder-dst-internal folder)
+                           numbers))
+
+(luna-define-method elmo-folder-unmark-read ((folder elmo-pipe-folder)
+                                             numbers)
+  (elmo-folder-unmark-read (elmo-pipe-folder-dst-internal folder)
+                          numbers))
+
+(luna-define-method elmo-folder-unmark-important ((folder elmo-folder) numbers)
+  (elmo-folder-unmark-important (elmo-pipe-folder-dst-internal folder)
+                               numbers))
+
+(luna-define-method elmo-folder-mark-as-important ((folder elmo-folder)
+                                                  numbers)
+  (elmo-folder-mark-as-important (elmo-pipe-folder-dst-internal folder)
+                                numbers))
+
 (require 'product)
 (product-provide (provide 'elmo-pipe) (require 'elmo-version))
 
index eef790b..03d7d13 100644 (file)
@@ -120,7 +120,6 @@ For disconnected operations.")
 (defvar elmo-enable-disconnected-operation nil
   "*Enable disconnected operations.")
 
-
 (defvar elmo-auto-change-plugged 600
   "*Time to expire change plugged state automatically, as the number of seconds.
 Don't change plugged state automatically if nil.")
index f50223d..70245f1 100644 (file)
@@ -104,6 +104,7 @@ If a folder name begins with PREFIX, use BACKEND."
                                     persistent   ; non-nil if persistent.
                                     message-modified ; message is modified.
                                     mark-modified    ; mark is modified.
+                                    process-duplicates  ; read or hide
                                     ))
   (luna-define-internal-accessors 'elmo-folder))
 
@@ -989,7 +990,7 @@ FIELD is a symbol of the field."
                                         (elmo-folder-msgdb folder))
                                        number-alist)))
             (cur number-alist)
-            pair
+            pair overview
             to-be-deleted
             mark-alist)
        (while cur
@@ -998,13 +999,25 @@ FIELD is a symbol of the field."
          (if (setq pair (rassoc (cdr (car cur)) all-alist))
              (setq to-be-deleted (nconc to-be-deleted (list (car pair)))))
          (setq cur (cdr cur)))
-       ;; XXXX If caching is enabled, read-uncached mark should be set.
-       (setq mark-alist (elmo-delete-if
-                         (function
-                          (lambda (x)
-                            (memq (car x) to-be-deleted)))
-                         (elmo-msgdb-get-mark-alist append-msgdb)))
-       (elmo-msgdb-set-mark-alist append-msgdb mark-alist)
+       (cond ((eq (elmo-folder-process-duplicates-internal folder)
+                  'hide)
+              ;; Hide duplicates.
+              (setq overview (elmo-delete-if
+                              (lambda (x)
+                                (memq (elmo-msgdb-overview-entity-get-number
+                                       x)
+                                      to-be-deleted))
+                              (elmo-msgdb-get-overview append-msgdb)))
+              ;; Should be mark as read.
+              (elmo-folder-mark-as-read folder to-be-deleted)
+              (elmo-msgdb-set-overview append-msgdb overview))
+             ((eq (elmo-folder-process-duplicates-internal folder)
+                  'read)
+              ;; Mark as read duplicates.
+              (elmo-folder-mark-as-read folder to-be-deleted))
+             (t 
+              ;; Do nothing.
+              (setq to-be-deleted nil)))
        (elmo-folder-set-msgdb-internal folder
                                        (elmo-msgdb-append
                                         (elmo-folder-msgdb folder)
index 4cbaa74..06d5a99 100644 (file)
@@ -1,3 +1,13 @@
+2001-04-26  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-vars.el (wl-folder-process-duplicates-alist): New user option.
+
+       * wl-summary.el (wl-summary-buffer-set-folder): Set up
+       `process-duplicates' slot.
+
+       * wl-highlight.el (wl-highlight-message): Don't highlight as signature
+       if detection failed.
+
 2001-04-25  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * wl-version.el (wl-version-status): Set to "alpha".
index bf05fc1..041628c 100644 (file)
@@ -1163,7 +1163,8 @@ interpreted as cited text.)"
          (if (and hack-sig (not too-big))
              (setq end (funcall wl-highlight-signature-search-function
                                 (- end wl-max-signature-size) end)))
-         (if hack-sig
+         (if (and hack-sig
+                  (not (eq end real-end)))
              (put-text-property end (point-max)
                                 'face 'wl-highlight-message-signature))
          (narrow-to-region start end)
index 94534bd..bc9b0f5 100644 (file)
@@ -711,6 +711,11 @@ you."
   (setq wl-summary-buffer-persistent
        (wl-folder-persistent-p (elmo-folder-name-internal folder)))
   (elmo-folder-set-persistent-internal folder wl-summary-buffer-persistent)
+  ;; process duplicates.
+  (elmo-folder-set-process-duplicates-internal
+   folder (cdr (elmo-string-matched-assoc
+               (elmo-folder-name-internal folder)
+               wl-folder-process-duplicates-alist)))
   (setq
    wl-thread-indent-level-internal
    (or (nth 0 wl-summary-buffer-thread-indent-set)
index 43736ea..932b067 100644 (file)
@@ -1635,6 +1635,22 @@ If nil, always use default."
   :type 'boolean
   :group 'wl-pref)
 
+(defcustom wl-folder-process-duplicates-alist
+  (list (cons (concat "^" (regexp-quote wl-draft-folder) "$\\|^"
+                     (regexp-quote wl-trash-folder) "$") nil)
+       (cons ".*" 'hide))
+  "Specify process type of duplicated messages.
+It should be a list of cons cell like: (REGEXP . TYPE)
+REGEXP is a regular expression string of folder name.
+TYPE is one of the symbols `hide' or `read'.
+`hide' means hide duplicated messages.
+`read' means mark as read duplicated messages.
+If TYPE is nil, do nothing for duplicated messages."
+  :type '(repeat (cons (regexp :tag "Folder regexp")
+                      (choice (const :tag "Hide" kill)
+                              (const :tag "Mark as read" read))))
+  :group 'wl-folder)
+
 (defcustom wl-folder-move-cur-folder nil
   "*Non-nil, move to current folder on folder-mode when goto folder."
   :type 'boolean