+2001-12-26 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * NEWS, NEWS.ja: Added description about
+ `elmo-enable-disconnected-operation'.
+
+ * WL-MK (update-version): New function.
+
+ * Makefile (update-version): Added.
+
2001-12-18 Yuuichi Teranishi <teranisi@gohome.org>
* samples/ja/dot.wl,samples/en/dot.wl (my-wl-summary-subject-func-ml):
test:
$(EMACS) $(FLAGS) -l WL-MK -f test-wl $(LISPDIR) $(PIXMAPDIR)
+update-version:
+ $(EMACS) $(FLAGS) -l WL-MK -f update-version $(LISPDIR) $(PIXMAPDIR)
+
install-elc:
$(EMACS) $(FLAGS) -l WL-MK -f install-wl-package $(LISPDIR) $(PIXMAPDIR)
elmo-cache-directory (e.g. for whom put symbolic link for ~/.elmo/cache
on NFS environment).
+** Default value of elmo-enable-disconnected-operation is now `t'.
+ When the relevant messages are cached, you can do some operations
+ even in the off-line state.
+
* Version 2.6.1 is basically a bug fix version of 2.6.0.
** Fixed a problem that Emacs 21 causes `Recursive load...' error.
\e$BJ}$O!"\e(Belmo-cache-directory \e$B$r@_Dj$9$k$3$H$K$h$C$F%-%c%C%7%e$@$1\e(B
\e$B$rA4$/JL$N%G%#%l%/%H%j$K$G$-$^$9!#\e(B
+** elmo-enable-disconnected-operation \e$B$N%G%U%)%k%HCM$,\e(B t \e$B$K$J$j$^$7$?!#\e(B
+ \e$B%*%U%i%$%s>uBV$G$b%a%C%;!<%8$,%-%c%C%7%e$5$l$F$$$l$P!"$"$kDxEY$N\e(B
+ \e$B%a%C%;!<%8A`:n$,2DG=$G$9!#\e(B
+
* 2.6.1 \e$B$O\e(B 2.6.0 \e$B$N=$@5HG$G$9!#\e(B
** Emacs 21 \e$B$G\e(B Recursive load... \e$B$H=P$kIT6q9g$,=$@5$5$l$^$7$?!#\e(B
Web Page:
- Wanderlust \e$B$N\e(B Official Web \e$B%Z!<%8$N\e(B URL \e$B$O0J2<$NDL$j$G$9!#\e(B
+ Wanderlust \e$B8x<0\e(B Web \e$B%Z!<%8$N\e(B URL \e$B$O0J2<$NDL$j$G$9!#\e(B
http://www.gohome.org/wl/
% cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root checkout wanderlust
- \e$B0BDjHG$N;^$+$i\e(B Wanderlust \e$B<h$j=P$9>l9g$O!"0J2<$N$h$&$K$7$F$/$@$5$$!#\e(B
+ \e$B0BDjHG$N;^$+$i\e(B Wanderlust \e$B$r<h$j=P$9>l9g$O!"0J2<$NMM$K$7$F$/$@$5$$!#\e(B
% cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root checkout -r wl-2_8 wanderlust
http://cvs.m17n.org/cgi-bin/viewcvs/wanderlust/
- CVS \e$B$N\e(B commit log \e$B$r%a!<%k$G<u$1<h$j$?$$$H$-$O!"0J2<$N%"%I%l%9$K6u$N\e(B
+ CVS \e$B$N\e(B commit log \e$B$r%a!<%k$G<u$1<h$j$?$$J}$O!"<!$N%"%I%l%9$K6u$N\e(B
\e$B%a!<%k$rAw$C$F$/$@$5$$!#\e(B
cvs-info-help@cvs.m17n.org
Development:
- CVS \e$B$K4p$E$$$?3+H/$K;22C$7$?$$$H$-$O!"\e(B
+ CVS \e$B$K4p$E$$$?3+H/$K;22C$7$?$$J}$O!"\e(B
cvs@cvs.m17n.org
(config-wl-pixmap-dir)
(princ "\n"))
+(defun update-version ()
+ "Update version number of documents."
+ (config-wl-package)
+ (load-file "elmo/elmo-version.el")
+ (let ((version (mapconcat
+ 'number-to-string
+ (product-version (product-find 'elmo-version))
+ ".")))
+ (princ (concat "Update version number to " version "\n"))
+ ;; generate version.tex
+ (with-temp-buffer
+ (insert "\\def\\versionnumber{" version "}\n")
+ (write-region (point-min) (point-max) (expand-file-name
+ "version.tex" "doc")))
+ ;; generate version.texi
+ (with-temp-buffer
+ (insert "@set VERSION " version "\n")
+ (write-region (point-min) (point-max) (expand-file-name
+ "version.texi" "doc")))))
+
(defun test-wl ()
"Run test suite for developer."
(config-wl-package)
@item $
@kbd{$} \e$B%-!<$r2!$9$H!"\e(B@samp{$} \e$B%^!<%/$,IU$-$^$9!#$3$N%^!<%/$O\e(B Emacs \e$B$r=*N;\e(B
\e$B$7$F$bJ]B8$5$l$k$?$a!"$"$H$GJV;v$r=q$-$?$$>l9g$J$I!"3P$($F$*$-$?$$=EMW$J\e(B
-\e$B%a%C%;!<%8$KIU$1$F$*$/$HJXMx$G$9!#\e(B@samp{$} \e$B$NIU$$$?%a%C%;!<%8$O!"%K%e!<\e(B
-\e$B%95-;v$d%5!<%P>e$N\e(B IMAP \e$B%U%)%k%@$N%a%C%;!<%8$,\e(B expire \e$B$5$l$k$J$I$7$F>C$(\e(B
-\e$B$?>l9g$b;D$j$^$9!#\e(B
+\e$B%a%C%;!<%8$KIU$1$F$*$/$HJXMx$G$9!#\e(B@samp{$} \e$B$NIU$$$?%a%C%;!<%8$O!"\e(B
+(\e$B<B:]$N%a%C%;!<%8$,>C$5$l$?$H$7$F$b\e(B) @samp{'mark} \e$B%U%)%k%@$G1\Mw$G$-$^$9!#\e(B
+
@item \e$B$J$7\e(B
\e$B4{FI%a%C%;!<%8$K$O%^!<%/$,B8:_$7$^$;$s!#\e(B
@end table
key (if already exists, the mark is deleted). It is convenient to put
this mark on the messages to remember (If you want to remember to write
a reply for the message, for example) because this mark remains after
-you exited Emacs. Messages with the @samp{$} mark remains in the folder
-even the message itself is deleted in the actual folder.
+you exited Emacs. Messages with the @samp{$} mark can be reviewed in the
+@{'mark} folder even the message itself is deleted in the actual folder.
@item None
If the message is read and cached (or local message),there are no
+2001-12-26 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo.el (elmo-folder-synchronize): Delete important messages too.
+
+ * elmo-util.el (elmo-buffer-field-primitive-condition-match): Fixed
+ `since'; Fix timezone.
+
+ * elmo-msgdb.el (elmo-msgdb-search-internal-primitive): Ditto.
+
+ * elmo-nntp.el (elmo-nntp-search-primitive): Likewise.
+
+2001-12-25 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * elmo.el (elmo-message-fetch-with-cache-process): Rewrite.
+
+2001-12-23 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * elmo.el (elmo-generic-folder-append-messages): Make
+ fetch-strategy with `use-cache' as 'maybe. Check return value of
+ `elmo-message-fetch'.
+ (elmo-message-fetch): Return return value of
+ `elmo-message-fetch-with-cache-process'.
+ (elmo-message-fetch-with-cache-process): Return non-nil if
+ fetching was succeed. Load cache when fetching was failed and
+ fetch-strategy-use-cache is 'maybe.
+
+ * elmo-util.el (elmo-file-cache-load): New function.
+
+ * elmo-multi.el (elmo-message-use-cache-p): Remove duplicated
+ defun.
+
+ * elmo-archive.el (elmo-archive-message-fetch-internal): Return
+ non-nil if fetching was succeed.
+
+ * elmo-imap4.el (elmo-imap4-message-fetch): Likewise.
+
+ * elmo-nmz.el (elmo-map-message-fetch): Likewise.
+
+ * elmo-nntp.el (elmo-nntp-read-body): Likewise.
+ (elmo-message-fetch-with-cache-process): Likwise.
+
+ * elmo-pop3.el (elmo-pop3-read-body): Likewise.
+
+ * elmo-shimbun.el (elmo-map-message-fetch): Likewise.
+
2001-12-23 Yuuichi Teranishi <teranisi@gohome.org>
* elmo.el (elmo-folder-delete): Delete msgdb path.
(method (elmo-archive-get-method type 'cat))
(args (list arc (elmo-concat-path
prefix (int-to-string number)))))
- (when (file-exists-p arc)
- (and
- (as-binary-process
- (elmo-archive-call-method method args t))
- (elmo-delete-cr-buffer)))))
+ (and (file-exists-p arc)
+ (as-binary-process
+ (elmo-archive-call-method method args t))
+ (progn
+ (elmo-delete-cr-buffer)
+ t))))
(luna-define-method elmo-message-fetch-internal ((folder elmo-archive-folder)
number strategy
response 'fetch)))
(with-current-buffer outbuf
(erase-buffer)
- (insert response)))))
+ (insert response)
+ t))))
(luna-define-method elmo-message-fetch-plugged ((folder elmo-imap4-folder)
number strategy
(elmo-msgdb-overview-entity-get-cc entity))))
((or (string= key "since")
(string= key "before"))
- (let ((res (string< (timezone-make-date-sortable
- (elmo-msgdb-overview-entity-get-date entity))
- (elmo-date-make-sortable-string
- (elmo-date-get-datevec
- (elmo-filter-value condition))))))
- (setq result (if (string= key "before") res (not res)))))
+ (let ((field-date (elmo-date-make-sortable-string
+ (timezone-fix-time
+ (elmo-msgdb-overview-entity-get-date entity)
+ (current-time-zone) nil)))
+ (specified-date
+ (elmo-date-make-sortable-string
+ (elmo-date-get-datevec
+ (elmo-filter-value condition)))))
+ (setq result (if (string= key "since")
+ (or (string= specified-date field-date)
+ (string< specified-date field-date))
+ (string< field-date specified-date)))))
((member key elmo-msgdb-extra-fields)
(let ((extval (elmo-msgdb-overview-entity-get-extra-field entity key)))
(if (stringp extval)
(setq children (cdr children)))
match))
-(luna-define-method elmo-message-use-cache-p ((folder elmo-multi-folder)
- number)
- (elmo-message-use-cache-p
- (nth (- (/ number (elmo-multi-folder-divide-number-internal folder)) 1)
- (elmo-multi-folder-children-internal folder))
- (% number (elmo-multi-folder-divide-number-internal folder))))
-
(luna-define-method elmo-message-folder ((folder elmo-multi-folder)
number)
(nth (- (/ number (elmo-multi-folder-divide-number-internal folder)) 1)
(luna-define-method elmo-message-file-name ((folder elmo-multi-folder) number)
(let ((pair (elmo-multi-real-folder-number folder number)))
(elmo-message-file-name (car pair) (cdr pair))))
-
+
(luna-define-method elmo-folder-plugged-p ((folder elmo-multi-folder))
(let ((flds (elmo-multi-folder-children-internal folder)))
(catch 'plugged
location strategy
&optional section unseen)
(when (file-exists-p location)
- (insert-file-contents-as-binary location)
- (unless (or (std11-field-body "To")
- (std11-field-body "Cc")
- (std11-field-body "Subject"))
- (let (charset guess uid)
- (erase-buffer)
- (set-buffer-multibyte t)
- (insert-file-contents location)
- (setq charset (detect-mime-charset-region (point-min)
- (point-max)))
- (goto-char (point-min))
- (setq guess (mime-find-file-type location))
- (setq uid (nth 2 (file-attributes location)))
- (insert "From: " (concat (user-full-name uid)
- " <"(user-login-name uid) "@"
- (system-name) ">") "\n")
- (insert "Subject: " location "\n")
- (insert "Content-Type: "
- (concat (nth 0 guess) "/" (nth 1 guess))
- "; charset=" (upcase (symbol-name charset))
- "\nMIME-Version: 1.0\n\n")
- (encode-mime-charset-region (point-min) (point-max) charset)
- (set-buffer-multibyte nil)))))
+ (prog1
+ (insert-file-contents-as-binary location)
+ (unless (or (std11-field-body "To")
+ (std11-field-body "Cc")
+ (std11-field-body "Subject"))
+ (let (charset guess uid)
+ (erase-buffer)
+ (set-buffer-multibyte t)
+ (insert-file-contents location)
+ (setq charset (detect-mime-charset-region (point-min)
+ (point-max)))
+ (goto-char (point-min))
+ (setq guess (mime-find-file-type location))
+ (setq uid (nth 2 (file-attributes location)))
+ (insert "From: " (concat (user-full-name uid)
+ " <"(user-login-name uid) "@"
+ (system-name) ">") "\n")
+ (insert "Subject: " location "\n")
+ (insert "Content-Type: "
+ (concat (nth 0 guess) "/" (nth 1 guess))
+ "; charset=" (upcase (symbol-name charset))
+ "\nMIME-Version: 1.0\n\n")
+ (encode-mime-charset-region (point-min) (point-max) charset)
+ (set-buffer-multibyte nil))))))
(luna-define-method elmo-map-folder-list-message-locations
((folder elmo-nmz-folder))
(with-current-buffer outbuf
(erase-buffer)
(insert-buffer-substring (elmo-network-session-buffer session)
- start (- end 3))))))
+ start (- end 3))))
+ t))
(defun elmo-nntp-select-group (session group &optional force)
(let (response)
(with-current-buffer (elmo-network-session-buffer session)
(std11-field-body "Newsgroups")))))
-(luna-define-method elmo-message-fetch-with-cache-process :after
+(luna-define-method elmo-message-fetch-with-cache-process :around
((folder elmo-nntp-folder) number strategy &optional section unread)
- (elmo-nntp-setup-crosspost-buffer folder number)
- (unless unread
- (elmo-nntp-folder-update-crosspost-message-alist
- folder (list number))))
+ (when (luna-call-next-method)
+ (elmo-nntp-setup-crosspost-buffer folder number)
+ (unless unread
+ (elmo-nntp-folder-update-crosspost-message-alist
+ folder (list number)))
+ t))
(luna-define-method elmo-message-fetch-plugged ((folder elmo-nntp-folder)
number strategy
numbers))
((or (string= "since" search-key)
(string= "before" search-key))
- (let* ((key-date (elmo-date-get-datevec (elmo-filter-value condition)))
- (key-datestr (elmo-date-make-sortable-string key-date))
+ (let* ((specified-date (elmo-date-make-sortable-string
+ (elmo-date-get-datevec (elmo-filter-value
+ condition))))
(since (string= "since" search-key))
- result)
+ field-date result)
(if (eq (elmo-filter-type condition) 'unmatch)
(setq since (not since)))
(setq result
(delq nil
(mapcar
(lambda (pair)
+ (setq field-date
+ (elmo-date-make-sortable-string
+ (timezone-fix-time
+ (cdr pair)
+ (current-time-zone) nil)))
(if (if since
- (string< key-datestr
- (elmo-date-make-sortable-string
- (timezone-fix-time
- (cdr pair)
- (current-time-zone) nil)))
- (not (string< key-datestr
- (elmo-date-make-sortable-string
- (timezone-fix-time
- (cdr pair)
- (current-time-zone) nil)))))
+ (or (string= specified-date field-date)
+ (string< specified-date field-date))
+ (string< field-date
+ specified-date))
(car pair)))
(elmo-nntp-retrieve-field spec "date" from-msgs))))
(if from-msgs
(setq end (point))
(with-current-buffer outbuf
(erase-buffer)
- (insert-buffer-substring (process-buffer process) start (- end 3))))))
+ (insert-buffer-substring (process-buffer process) start (- end 3)))
+ t)))
(luna-define-method elmo-folder-open-internal ((folder elmo-pop3-folder))
(if (and (not elmo-inhibit-number-mapping)
(when (null (setq response (elmo-pop3-read-response
process t)))
(error "Fetching message failed"))
- (setq response (elmo-pop3-read-body process outbuf)))
+ (setq response (elmo-pop3-read-body process outbuf)))
(setq elmo-pop3-total-size nil))
(unless elmo-inhibit-display-retrieval-progress
(elmo-display-progress
(when (setq shimbun-id
(elmo-shimbun-header-extra-field header "x-shimbun-id"))
(goto-char (point-min))
- (insert (format "X-Shimbun-Id: %s\n" shimbun-id))))
+ (insert (format "X-Shimbun-Id: %s\n" shimbun-id)))
+ t)
(error "Unplugged")))
(luna-define-method elmo-message-encache :around ((folder
(length (memq number number-list)))
(string-to-int (elmo-filter-value condition)))))
((string= (elmo-filter-key condition) "since")
- (let ((date (elmo-date-get-datevec (elmo-filter-value condition))))
+ (let* ((date (elmo-date-get-datevec (elmo-filter-value condition)))
+ (field-date (elmo-date-make-sortable-string
+ (timezone-fix-time
+ (std11-field-body "date")
+ (current-time-zone) nil)))
+ (specified-date (timezone-make-sortable-date
+ (aref date 0)
+ (aref date 1)
+ (aref date 2)
+ (timezone-make-time-string
+ (aref date 3)
+ (aref date 4)
+ (aref date 5)))))
(setq result
- (string<
- (timezone-make-sortable-date (aref date 0)
- (aref date 1)
- (aref date 2)
- (timezone-make-time-string
- (aref date 3)
- (aref date 4)
- (aref date 5)))
- (timezone-make-date-sortable (std11-field-body "date"))))))
+ (or (string= field-date specified-date)
+ (string< specified-date field-date)))))
((string= (elmo-filter-key condition) "before")
(let ((date (elmo-date-get-datevec (elmo-filter-value condition))))
(setq result
(string<
- (timezone-make-date-sortable (std11-field-body "date"))
+ (timezone-make-date-sortable
+ (timezone-fix-time
+ (std11-field-body "date")
+ (current-time-zone) nil))
(timezone-make-sortable-date (aref date 0)
(aref date 1)
(aref date 2)
;; ignore error
(error)))
+(defun elmo-file-cache-load (cache-path section)
+ "Load cache on PATH into the current buffer.
+Return t if cache is loaded successfully."
+ (condition-case nil
+ (let (cache-file)
+ (when (and cache-path
+ (if (elmo-cache-path-section-p cache-path)
+ section
+ (null section))
+ (setq cache-file (elmo-file-cache-expand-path
+ cache-path
+ section))
+ (file-exists-p cache-file))
+ (insert-file-contents-as-binary cache-file)
+ t))
+ ;; igore error
+ (error)))
+
(defun elmo-cache-path-section-p (path)
"Return non-nil when PATH is `section' cache path."
(file-directory-p path))
(while numbers
(setq failure nil)
(condition-case nil
- (progn
- (elmo-message-fetch
- src-folder (car numbers)
- (if (and (not (elmo-folder-plugged-p src-folder))
- elmo-enable-disconnected-operation
- (setq cache (elmo-file-cache-get
- (elmo-message-field
- src-folder (car numbers)
- 'message-id)))
- (eq (elmo-file-cache-status cache) 'entire))
- (elmo-make-fetch-strategy
- 'entire t nil (elmo-file-cache-path cache))
- (elmo-make-fetch-strategy 'entire t))
- nil (current-buffer)
- 'unread)
- (unless (eq (buffer-size) 0)
- (setq failure (not
- (elmo-folder-append-buffer
- folder
- (setq unseen (member (elmo-message-mark
- src-folder (car numbers))
- unread-marks))
- (if same-number (car numbers)))))))
+ (setq cache (elmo-file-cache-get
+ (elmo-message-field src-folder
+ (car numbers)
+ 'message-id))
+ failure
+ (not
+ (and
+ (elmo-message-fetch
+ src-folder (car numbers)
+ (if (elmo-folder-plugged-p src-folder)
+ (elmo-make-fetch-strategy
+ 'entire 'maybe nil
+ (and cache (elmo-file-cache-path cache)))
+ (or (and elmo-enable-disconnected-operation
+ cache
+ (eq (elmo-file-cache-status cache) 'entire)
+ (elmo-make-fetch-strategy
+ 'entire t nil
+ (elmo-file-cache-path cache)))
+ (error "Unplugged")))
+ nil (current-buffer)
+ 'unread)
+ (> (buffer-size) 0)
+ (elmo-folder-append-buffer
+ folder
+ (setq unseen (member (elmo-message-mark
+ src-folder (car numbers))
+ unread-marks))
+ (if same-number (car numbers))))))
(error (setq failure t)))
;; FETCH & APPEND finished
(unless failure
(with-current-buffer outbuf
(erase-buffer)
(elmo-message-fetch-with-cache-process folder number
- strategy section unread)
- t)
+ strategy section unread))
(with-temp-buffer
(elmo-message-fetch-with-cache-process folder number
strategy section unread)
number strategy
&optional
section unread)
- (let (cache-path cache-file)
- (if (and (elmo-fetch-strategy-use-cache strategy)
- (setq cache-path (elmo-fetch-strategy-cache-path strategy))
- (setq cache-file (elmo-file-cache-expand-path
- cache-path
- section))
- (file-exists-p cache-file)
- (or (not (elmo-cache-path-section-p cache-file))
- (not (eq (elmo-fetch-strategy-entireness strategy) 'entire))))
- (insert-file-contents-as-binary cache-file)
- (elmo-message-fetch-internal folder number strategy section unread)
- (elmo-delete-cr-buffer)
- (when (and (> (buffer-size) 0)
- (elmo-fetch-strategy-save-cache strategy)
- (elmo-fetch-strategy-cache-path strategy))
- (elmo-file-cache-save
- (elmo-fetch-strategy-cache-path strategy)
- section)))))
+ (let ((cache-path (elmo-fetch-strategy-cache-path strategy))
+ (method-priorities
+ (cond ((eq (elmo-fetch-strategy-use-cache strategy) 'meybe)
+ '(entity cache))
+ ((elmo-fetch-strategy-use-cache strategy)
+ '(cache entity))
+ (t
+ '(entity))))
+ result err)
+ (while (and method-priorities
+ (null result))
+ (setq result
+ (case (car method-priorities)
+ (cache
+ (elmo-file-cache-load cache-path section))
+ (entity
+ (when (and (condition-case error
+ (elmo-message-fetch-internal folder number
+ strategy
+ section
+ unread)
+ (error (setq err error) nil))
+ (> (buffer-size) 0))
+ (elmo-delete-cr-buffer)
+ (when (and (elmo-fetch-strategy-save-cache strategy)
+ cache-path)
+ (elmo-file-cache-save cache-path section))
+ t)))
+ method-priorities (cdr method-priorities)))
+ (or result
+ (and err (signal (car err) (cdr err))))))
(luna-define-method elmo-folder-clear ((folder elmo-folder)
&optional keep-killed)
(length new-list)))
(setq diff-2 (elmo-list-diff (car diff) new-list)))
(elmo-msgdb-append-to-killed-list folder (car diff-2)))
- ;; Don't delete important marked messages.
- (setq delete-list
- (if (eq (elmo-folder-type-internal folder) 'mark)
- (cadr diff)
- (elmo-delete-if
- (lambda (x)
- (and (setq mark (cadr (assq x mark-alist)))
- (string= mark important-mark)))
- ;; delete message list
- (cadr diff))))
+ (setq delete-list (cadr diff))
(if (or (equal diff '(nil nil))
(equal diff '(nil))
(and (eq (length (car diff)) 0)
+2001-12-24 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * wl-draft.el (wl-draft-hide): Removed `interactive'.
+ (Pointed out by YAMASHITA Junji <ysjj@unixuser.org>)
+
+2001-12-23 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * Version number is increased to 2.9.2.
+
2001-12-21 Katsumi Yamaoka <yamaoka@jpl.org>
* wl-draft.el (wl-draft-elide-region): New user command.
(defun wl-draft-hide (editing-buffer)
"Hide the editing draft buffer if possible."
- (interactive)
(when (and editing-buffer
(buffer-live-p editing-buffer))
(set-buffer editing-buffer)