(wl-summary-sync-update): Ditto.
(wl-summary-goto-folder-subr): Call wl-summary-sync-force-update with
`no-check'.
* wl-message.el (wl-message-buffer-prefetch-timer): New variable.
(wl-message-buffer-prefetch-next): Don't run timer if timer is already running.
* elmo.el (elmo-folder-synchronize): Added optional no-check argument.
* elmo-shimbun.el (elmo-shimbun-folder): Added headers slot.
(elmo-folder-open-internal): Set up headers slot.
(elmo-folder-check): Call elmo-folder-close-internal and
elmo-folder-open-internal.
(elmo-folder-close-internal): Clean up headers slot.
+2001-04-09 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo.el (elmo-folder-synchronize): Added optional no-check argument.
+
+ * elmo-shimbun.el (elmo-shimbun-folder): Added headers slot.
+ (elmo-folder-open-internal): Set up headers slot.
+ (elmo-folder-check): Call elmo-folder-close-internal and
+ elmo-folder-open-internal.
+ (elmo-folder-close-internal): Clean up headers slot.
+
2001-04-07 Masahiro MURATA <muse@ba2.so-net.ne.jp>
* elmo-archive.el (elmo-archive-folder-list-subfolders): Match
(eval-and-compile
(luna-define-class elmo-shimbun-folder
- (elmo-map-folder) (shimbun header-hash group))
+ (elmo-map-folder) (shimbun headers header-hash group))
(luna-define-internal-accessors 'elmo-shimbun-folder))
(luna-define-method elmo-folder-initialize ((folder
(shimbun-open-group
(elmo-shimbun-folder-shimbun-internal folder)
(elmo-shimbun-folder-group-internal folder))
+ (elmo-shimbun-folder-set-headers-internal
+ folder (shimbun-headers
+ (elmo-shimbun-folder-shimbun-internal folder)))
(elmo-shimbun-folder-set-header-hash-internal
folder
- (elmo-make-hash (length (shimbun-headers
- (elmo-shimbun-folder-shimbun-internal folder)))))
+ (elmo-make-hash (length (elmo-shimbun-folder-headers-internal folder))))
;; Set up header hash.
- (dolist (header (shimbun-headers (elmo-shimbun-folder-shimbun-internal
- folder)))
+ (dolist (header (elmo-shimbun-folder-headers-internal folder))
(elmo-set-hash-val
(shimbun-header-id header) header
(elmo-shimbun-folder-header-hash-internal folder))))
elmo-shimbun-folder))
(shimbun-close-group
(elmo-shimbun-folder-shimbun-internal folder))
+ (elmo-shimbun-folder-set-headers-internal
+ folder nil)
(elmo-shimbun-folder-set-header-hash-internal
folder nil))
(luna-define-method elmo-folder-check :after ((folder elmo-shimbun-folder))
- (shimbun-close-group
- (elmo-shimbun-folder-shimbun-internal folder))
- (shimbun-open-group
- (elmo-shimbun-folder-shimbun-internal folder)
- (elmo-shimbun-folder-group-internal folder)))
+ (when (shimbun-current-group-internal
+ (elmo-shimbun-folder-shimbun-internal folder))
+ ;; Discard current headers information.
+ (elmo-folder-close-internal folder)
+ (elmo-folder-open-internal folder)))
(luna-define-method elmo-folder-expand-msgdb-path ((folder
elmo-shimbun-folder))
((folder elmo-shimbun-folder))
(mapcar
(function shimbun-header-id)
- (shimbun-headers (elmo-shimbun-folder-shimbun-internal folder))))
+ (elmo-shimbun-folder-headers-internal folder)))
(luna-define-method elmo-folder-list-subfolders ((folder elmo-shimbun-folder)
&optional one-level)
unread-cached-mark ;"!"
read-uncached-mark ;"u"
important-mark ;"$"
- &optional ignore-msgdb)
+ &optional ignore-msgdb
+ no-check)
"Synchronize the folder data to the newest status.
FOLDER is the ELMO folder structure.
NEW-MARK, UNREAD-CACHED-MARK, READ-UNCACHED-MARK, and IMPORTANT-MARK
If optional IGNORE-MSGDB is non-nil, current msgdb is thrown away except
read mark status. If IGNORE-MSGDB is 'visible-only, only visible messages
are thrown away and synchronized.
+If NO-CHECK is non-nil, recheck folder is skipped.
Return a list of
\(NEW-MSGDB DELETE-LIST CROSSED\)
(elmo-folder-set-killed-list-internal folder nil))
(elmo-folder-set-msgdb-internal folder
(elmo-msgdb-clear))))
- (elmo-folder-check folder)
+ (unless no-check (elmo-folder-check folder))
(condition-case nil
(progn
(message "Checking folder diff...")
+2001-04-09 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * wl-summary.el (wl-summary-sync-force-update): Added argument
+ no-check.
+ (wl-summary-sync-update): Ditto.
+ (wl-summary-goto-folder-subr): Call wl-summary-sync-force-update
+ with `no-check'.
+
+ * wl-message.el (wl-message-buffer-prefetch-timer): New variable.
+ (wl-message-buffer-prefetch-next): Don't run timer if timer is
+ already running.
+
2001-04-07 Masahiro MURATA <muse@ba2.so-net.ne.jp>
* wl-expire.el (wl-expire-archive-get-folder): Added argument
wl-message-buffer-prefetch-folder-type-list))
(t wl-message-buffer-prefetch-folder-type-list)))
+
+(defvar wl-message-buffer-prefetch-timer nil)
+
(defun wl-message-buffer-prefetch-next (folder number &optional
summary charset)
(if (wl-message-buffer-prefetch-p folder)
(if (not (fboundp 'run-with-idle-timer))
(when (sit-for wl-message-buffer-prefetch-idle-time)
(wl-message-buffer-prefetch folder next summary charset))
- (run-with-idle-timer
- wl-message-buffer-prefetch-idle-time
- nil
- 'wl-message-buffer-prefetch folder next summary charset)
- (sit-for 0)))))))
+ (unless wl-message-buffer-prefetch-timer
+ (setq wl-message-buffer-prefetch-timer
+ (run-with-idle-timer
+ wl-message-buffer-prefetch-idle-time
+ nil
+ 'wl-message-buffer-prefetch
+ folder next summary charset)))))))))
(defun wl-message-buffer-prefetch (folder number summary charset)
(when (buffer-live-p summary)
(setq micro (+ micro (* 1000000 sec)))
(message "Prefetching %d...done(%f msec)."
number
- (/ micro 1000.0)))))))))))
+ (/ micro 1000.0))))))))))
+ (setq wl-message-buffer-prefetch-timer nil))
(defvar wl-message-button-map (make-sparse-keymap))
(kill-buffer summary-buf)))
(run-hooks 'wl-summary-exit-hook)))))
-(defun wl-summary-sync-force-update (&optional unset-cursor)
+(defun wl-summary-sync-force-update (&optional unset-cursor no-check)
(interactive)
- (wl-summary-sync-update unset-cursor))
+ (wl-summary-sync-update unset-cursor nil no-check))
(defsubst wl-summary-sync-all-init ()
(wl-summary-cleanup-temp-marks)
(nthcdr (max (- len in) 0) appends))
appends)))
-(defun wl-summary-sync-update (&optional unset-cursor sync-all)
+(defun wl-summary-sync-update (&optional unset-cursor sync-all no-check)
"Update the summary view to the newest folder status."
(interactive)
(let* ((folder wl-summary-buffer-elmo-folder)
wl-summary-unread-cached-mark
wl-summary-read-uncached-mark
wl-summary-important-mark
- sync-all))
+ sync-all no-check))
(setq new-msgdb (nth 0 sync-result))
(setq delete-list (nth 1 sync-result))
(setq crossed (nth 2 sync-result))
((eq scan-type 'no-sync))
((or (eq scan-type 'force-update)
(eq scan-type 'update))
- (setq mes (wl-summary-sync-force-update 'unset-cursor)))))
+ (setq mes (wl-summary-sync-force-update
+ 'unset-cursor 'no-check)))))
(if interactive
(switch-to-buffer buf)
(set-buffer buf))