+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.
(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)
(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))
(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.")
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))
(elmo-folder-msgdb folder))
number-alist)))
(cur number-alist)
- pair
+ pair overview
to-be-deleted
mark-alist)
(while cur
(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)
+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".
(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)
(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)
: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