From: teranisi Date: Thu, 26 Apr 2001 03:46:32 +0000 (+0000) Subject: * wl-vars.el (wl-folder-process-duplicates-alist): New user option. X-Git-Tag: wl-2_6-root^3~26 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=00f056dae009c2eabbb8c1a6aa7244a935b7fa48;p=elisp%2Fwanderlust.git * 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. * 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. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 5ffcf35..f946577 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,17 @@ +2001-04-26 Yuuichi Teranishi + + * 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 * elmo-util.el (elmo-list-subdirectories-1): New function. diff --git a/elmo/elmo-multi.el b/elmo/elmo-multi.el index 5eb4285..c8f4d47 100644 --- a/elmo/elmo-multi.el +++ b/elmo/elmo-multi.el @@ -190,7 +190,7 @@ (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)) @@ -203,12 +203,26 @@ ;; 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) diff --git a/elmo/elmo-pipe.el b/elmo/elmo-pipe.el index b708d1e..a589361 100644 --- a/elmo/elmo-pipe.el +++ b/elmo/elmo-pipe.el @@ -208,6 +208,25 @@ (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)) diff --git a/elmo/elmo-vars.el b/elmo/elmo-vars.el index eef790b..03d7d13 100644 --- a/elmo/elmo-vars.el +++ b/elmo/elmo-vars.el @@ -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.") diff --git a/elmo/elmo.el b/elmo/elmo.el index f50223d..70245f1 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -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) diff --git a/wl/ChangeLog b/wl/ChangeLog index 4cbaa74..06d5a99 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,13 @@ +2001-04-26 Yuuichi Teranishi + + * 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 * wl-version.el (wl-version-status): Set to "alpha". diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index bf05fc1..041628c 100644 --- a/wl/wl-highlight.el +++ b/wl/wl-highlight.el @@ -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) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 94534bd..bc9b0f5 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -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) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 43736ea..932b067 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -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