* wl.el (wl-plugged-change): Use '<' instead of '<='.
* wl-folder.el (wl-folder-check-one-entity): Fixed last change again.
* elmo-shimbun.el (elmo-folder-open-internal): Do nothing if unplugged.
(elmo-folder-plugged-p): Define.
(elmo-folder-set-plugged): Ditto.
(elmo-shimbun-msgdb-create-entity): Do nothing if there's no header.
(elmo-folder-list-messages-internal): Return t if unplugged.
* elmo-multi.el (elmo-folder-list-messages-internal): Fixed problem
when elmo-folder-list-messages-internal method of children returns t.
* elmo-map.el (elmo-map-folder-update-locations): Fixed problem when
pair is nil.
(elmo-folder-open-internal): Don't update if unplugged status.
+2001-04-16 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo-shimbun.el (elmo-folder-open-internal): Do nothing if unplugged.
+ (elmo-folder-plugged-p): Define.
+ (elmo-folder-set-plugged): Ditto.
+ (elmo-shimbun-msgdb-create-entity): Do nothing if there's no header.
+ (elmo-folder-list-messages-internal): Return t if unplugged.
+
+ * elmo-multi.el (elmo-folder-list-messages-internal): Fixed problem
+ when elmo-folder-list-messages-internal method of children returns t.
+
+ * elmo-map.el (elmo-map-folder-update-locations): Fixed problem when
+ pair is nil.
+ (elmo-folder-open-internal): Don't update if unplugged status.
+
2001-04-13 Yuuichi Teranishi <teranisi@gohome.org>
* elmo.el (elmo-folder-synchronize): Fixed problem when there's no
(elmo-map-folder-location-hash-internal
folder)))
location-alist))
- (elmo-clear-hash-val (concat "#" (int-to-string (car pair)))
- (elmo-map-folder-location-hash-internal
- folder))
- (elmo-clear-hash-val location
- (elmo-map-folder-location-hash-internal
- folder)))
+ (when pair
+ (elmo-clear-hash-val (concat "#" (int-to-string (car pair)))
+ (elmo-map-folder-location-hash-internal
+ folder))
+ (elmo-clear-hash-val location
+ (elmo-map-folder-location-hash-internal
+ folder))))
(setq i (elmo-map-folder-number-max-internal folder))
(dolist (location new-locs)
(setq i (1+ i))
(elmo-map-folder-location-setup
folder
(elmo-msgdb-location-load (elmo-folder-msgdb-path folder)))
- (elmo-map-folder-update-locations
- folder
- (elmo-map-folder-list-message-locations folder)))
+ (if (elmo-folder-plugged-p folder)
+ (elmo-map-folder-update-locations
+ folder
+ (elmo-map-folder-list-message-locations folder))))
(luna-define-method elmo-folder-commit :after ((folder elmo-map-folder))
(when (elmo-folder-persistent-p folder)
((folder elmo-multi-folder) &optional nohide)
(let* ((flds (elmo-multi-folder-children-internal folder))
(cur-number 0)
- numbers)
+ list numbers)
(while flds
(setq cur-number (+ cur-number 1))
- (setq numbers (append
- numbers
- (mapcar
- (function
- (lambda (x)
- (+
- (* (elmo-multi-folder-divide-number-internal
- folder) cur-number) x)))
- (elmo-folder-list-messages-internal (car flds)))))
+ (setq list (elmo-folder-list-messages-internal (car flds)))
+ (setq numbers
+ (append
+ numbers
+ (if (listp list)
+ (mapcar
+ (function
+ (lambda (x)
+ (+
+ (* (elmo-multi-folder-divide-number-internal
+ folder) cur-number) x)))
+ list)
+ ;; Use current list.
+ (elmo-delete-if
+ (lambda (num)
+ (not
+ (eq cur-number (/ num
+ (elmo-multi-folder-divide-number-internal
+ folder)))))
+ (mapcar
+ 'car
+ (elmo-msgdb-get-number-alist
+ (elmo-folder-msgdb folder)))))))
(setq flds (cdr flds)))
numbers))
(luna-define-method elmo-folder-open-internal :before ((folder
elmo-shimbun-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 (elmo-shimbun-folder-headers-internal folder))))
- ;; Set up header hash.
- (dolist (header (elmo-shimbun-folder-headers-internal folder))
- (elmo-set-hash-val
- (shimbun-header-id header) header
- (elmo-shimbun-folder-header-hash-internal folder))))
+ (when (elmo-folder-plugged-p 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 (elmo-shimbun-folder-headers-internal folder))))
+ ;; Set up header hash.
+ (dolist (header (elmo-shimbun-folder-headers-internal folder))
+ (elmo-set-hash-val
+ (shimbun-header-id header) header
+ (elmo-shimbun-folder-header-hash-internal folder)))))
(luna-define-method elmo-folder-close-internal :after ((folder
elmo-shimbun-folder))
(elmo-shimbun-folder-set-header-hash-internal
folder nil))
+(luna-define-method elmo-folder-plugged-p ((folder elmo-shimbun-folder))
+ (elmo-plugged-p
+ "shimbun"
+ (shimbun-server-internal (elmo-shimbun-folder-shimbun-internal folder))
+ nil nil
+ (shimbun-server-internal (elmo-shimbun-folder-shimbun-internal folder))))
+
+(luna-define-method elmo-folder-set-plugged ((folder elmo-shimbun-folder)
+ plugged &optional add)
+ (elmo-set-plugged plugged
+ "shimbun"
+ (shimbun-server-internal
+ (elmo-shimbun-folder-shimbun-internal folder))
+ nil nil nil
+ (shimbun-server-internal
+ (elmo-shimbun-folder-shimbun-internal folder))
+ add))
+
(luna-define-method elmo-folder-check :after ((folder elmo-shimbun-folder))
(when (shimbun-current-group-internal
(elmo-shimbun-folder-shimbun-internal folder))
(expand-file-name "shimbun" elmo-msgdb-dir)))
(defun elmo-shimbun-msgdb-create-entity (folder number)
- (with-temp-buffer
- (shimbun-header-insert
- (elmo-get-hash-val
- (elmo-map-message-location folder number)
- (elmo-shimbun-folder-header-hash-internal folder)))
- (elmo-msgdb-create-overview-from-buffer number)))
+ (let ((header (elmo-get-hash-val
+ (elmo-map-message-location folder number)
+ (elmo-shimbun-folder-header-hash-internal folder))))
+ (when header
+ (with-temp-buffer
+ (shimbun-header-insert header)
+ (elmo-msgdb-create-overview-from-buffer number)))))
(luna-define-method elmo-folder-msgdb-create ((folder elmo-shimbun-folder)
numlist new-mark
(elmo-shimbun-folder-header-hash-internal folder)))
(buffer-string))))
+(luna-define-method elmo-folder-list-messages-internal :around
+ ((folder elmo-shimbun-folder) &optional nohide)
+ (if (elmo-folder-plugged-p folder)
+ (luna-call-next-method)
+ t))
+
(luna-define-method elmo-map-folder-list-message-locations
((folder elmo-shimbun-folder))
(mapcar
(bbdb-save-db t))
(defun bbdb-wl-get-update-record ()
- (set-buffer (wl-message-get-original-buffer))
- (bbdb-wl-update-record)
- (run-hooks 'bbdb-wl-get-update-record-hook))
+ (with-current-buffer (wl-message-get-original-buffer)
+ (bbdb-wl-update-record)
+ (run-hooks 'bbdb-wl-get-update-record-hook)))
(defun bbdb-wl-hide-bbdb-buffer ()
(let (bbdb-buf bbdb-win)
+2001-04-16 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * wl.el (wl-plugged-change): Use '<' instead of '<='.
+
+ * wl-folder.el (wl-folder-check-one-entity): Fixed last change again.
+
2001-04-14 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* wl-folder.el (wl-folder-check-one-entity): Fixed last change.
(wl-summary-count-unread (elmo-msgdb-mark-load
(elmo-folder-msgdb-path
folder)))))
- (setq unread (min unread (cdr nums)))
+ (setq unread (min unread (- (or (cdr nums) 0) (or (car nums) 0))))
(wl-folder-entity-hashtb-set wl-folder-entity-hashtb entity
(list (car nums)
unread
(enlarge-window (- window-lines (window-height)))
(when (fboundp 'pos-visible-in-window-p)
(goto-char (point-min))
- (while (and (<= (window-height) max-lines)
+ (while (and (< (window-height) max-lines)
(not (pos-visible-in-window-p (1- (point-max)))))
(enlarge-window 2))))
(error))