From: teranisi Date: Wed, 7 Feb 2001 08:36:51 +0000 (+0000) Subject: * elmo-pipe.el (elmo-pipe-drain): Bind `elmo-inhibit-read-cache' as t X-Git-Tag: wl-2_6-root~126 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7978f8968eff5732dd91d4539394b5ce18d32b04;p=elisp%2Fwanderlust.git * elmo-pipe.el (elmo-pipe-drain): Bind `elmo-inhibit-read-cache' as t while moving messages. * elmo2.el (elmo-read-msg): Don't use cache if `elmo-inhibit-read-cache' is non-nil. * elmo-vars.el (elmo-inhibit-read-cache): New global switch. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index f67e4ca..e8fd972 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,13 @@ +2001-02-07 Yuuichi Teranishi + + * elmo-pipe.el (elmo-pipe-drain): Bind `elmo-inhibit-read-cache' as t + while moving messages. + + * elmo2.el (elmo-read-msg): Don't use cache if + `elmo-inhibit-read-cache' is non-nil. + + * elmo-vars.el (elmo-inhibit-read-cache): New global switch. + 2001-02-01 OKAZAKI Tetsurou * elmo-cache.el (elmo-cache-expire-by-size): Count diff --git a/elmo/elmo-pipe.el b/elmo/elmo-pipe.el index f17f9f9..633f952 100644 --- a/elmo/elmo-pipe.el +++ b/elmo/elmo-pipe.el @@ -58,9 +58,7 @@ (defun elmo-pipe-drain (src dst) "Move all messages of SRC to DST." - (let (elmo-nntp-use-cache - elmo-imap4-use-cache - elmo-pop3-use-cache ; Inhibit caching while moving messages. + (let ((elmo-inhibit-read-cache t); Inhibit caching while moving messages. elmo-pop3-use-uidl) ; No need to use UIDL (message "Checking %s..." src) (let ((srclist (elmo-list-folder src)) diff --git a/elmo/elmo-vars.el b/elmo/elmo-vars.el index 8df13bf..1e0b0ca 100644 --- a/elmo/elmo-vars.el +++ b/elmo/elmo-vars.el @@ -358,6 +358,9 @@ set as non-nil.") (defvar elmo-display-progress-threshold 20 "*Displaying progress gauge if number of messages are more than this value.") +(defvar elmo-inhibit-read-cache nil + "*Global switch to inhibit reading cache.") + (require 'product) (product-provide (provide 'elmo-vars) (require 'elmo-version)) diff --git a/elmo/elmo2.el b/elmo/elmo2.el index cb21136..e96b6bc 100644 --- a/elmo/elmo2.el +++ b/elmo/elmo2.el @@ -208,11 +208,12 @@ without cacheing." (defun elmo-read-msg (folder msg outbuf msgdb &optional force-reload) "Read message into outbuf." (let ((inhibit-read-only t)) + (if elmo-inhibit-read-cache ;;Only use elmo-read-msg-with-cache, because if folder is network and ;;elmo-use-cache-p is nil, cannot read important msg. (by muse) ;;(if (not (elmo-use-cache-p folder msg)) - ;; (elmo-read-msg-no-cache folder msg outbuf) - (elmo-read-msg-with-cache folder msg outbuf msgdb force-reload))) + (elmo-read-msg-no-cache folder msg outbuf) + (elmo-read-msg-with-cache folder msg outbuf msgdb force-reload)))) (defun elmo-read-msg-with-cache (folder msg outbuf msgdb &optional force-reload)