Synch up with main trunk. elmo-mark-restart
authorhmurata <hmurata>
Sat, 30 Aug 2003 10:01:46 +0000 (10:01 +0000)
committerhmurata <hmurata>
Sat, 30 Aug 2003 10:01:46 +0000 (10:01 +0000)
49 files changed:
ChangeLog
NEWS
NEWS.ja
WL-MK
doc/TODO
doc/TODO.ja
doc/version.tex
doc/version.texi
doc/wl-ja.texi
doc/wl-refcard-ja.tex
doc/wl-refcard.tex
doc/wl.texi
elmo/ChangeLog
elmo/elmo-dop.el
elmo/elmo-filter.el
elmo/elmo-imap4.el
elmo/elmo-localdir.el
elmo/elmo-maildir.el
elmo/elmo-mime.el
elmo/elmo-msgdb.el
elmo/elmo-multi.el
elmo/elmo-net.el
elmo/elmo-nmz.el
elmo/elmo-nntp.el
elmo/elmo-pipe.el
elmo/elmo-pop3.el
elmo/elmo-util.el
elmo/elmo-version.el
elmo/elmo.el
etc/VERSION
samples/en/dot.wl
samples/ja/dot.wl
tests/ChangeLog
tests/check-modules.el
wl/ChangeLog
wl/wl-action.el
wl/wl-address.el
wl/wl-draft.el
wl/wl-expire.el
wl/wl-highlight.el
wl/wl-message.el
wl/wl-mime.el
wl/wl-refile.el
wl/wl-score.el
wl/wl-summary.el
wl/wl-thread.el
wl/wl-util.el
wl/wl-vars.el
wl/wl.el

index b2751d4..de137db 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2003-08-26  Tetsurou Okazaki  <okazaki@be.to>
+
+       * WL-MK (wl-texinfo-info-file, wl-texinfo-texi-file,
+       wl-texinfo-check-newer): New functions.
+       (wl-texinfo-install-file): Use `wl-texifo-info-file'.
+       (wl-primary-info-file): Likewise.
+       (wl-texinfo-format-file): Use `wl-texinfo-check-newer'
+       and `wl-texinfo-texi-file'.  Remove unused local variable `beg'.
+
+2003-07-26  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * doc/.cvsignore: New file.
+
 2003-07-19  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * etc/icons/wl-summary-dispose-up.xpm: New file.
diff --git a/NEWS b/NEWS
index 22d1339..32cb3b8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,65 @@
 Wanderlust NEWS -- User-visible changes in Wanderlust.
 
+* Changes in 2.12.0 from 2.10.1
+
+** New mark, 'A' and '&' is added for answered messages.
+   Now answered messages have its own mark in the summary mode.
+   'A' is displayed for uncached messages and '&' is for cached messages.
+
+** New search condition 'Flag' (Status of the message) is added.
+   There are flags 'unread', 'important', 'answered',
+   'digest' (unread or important) and 'any' (any of the flag).
+   For example, following filter folder contains only unread or important
+   messages in the %inbox folder.
+
+   /flag:digest/%inbox
+
+** In the multi-folder, status of messages are synchronized with original
+   folder.
+   For example, unread status of '+inbox' is updated to '*+inbox,+outbox'.
+
+** The temporary mark and corresponding action is now customizable.
+
+   By default, follwoing mark-and-actions are defined.
+   mark-and-actions which are defined as before.
+    "o" refile   (same as before)
+    "O" copy     (same as before)
+    "d" dispose  (formerly delete, 'D' mark. Messages are moved to
+                 wl-trash-folder. Its behavior is decided by
+                 wl-dispose-folder-alist.)
+   New mark-and-actions which are newly introduced.
+    "D" delete   (remove message immediately)
+    "i" prefetch (prefetch message)
+    "~" resend   (resend message)
+   Press 'x' to execute actions which corresponds to the mark.
+   mark-and-actions can be define by the new variable, 
+   'wl-summary-mark-action-list'. See its docstring for more in detail.
+
+** The function wl-summary-resend-message is abolished. Instead of it,
+   you can put mark for resending by wl-summary-resend.
+
+** New face
+
+   wl-highlight-summary-disposed-face
+   wl-highlight-summary-prefetch-face
+   wl-highlight-summary-resend-face
+   wl-highlight-summary-answered-face
+   wl-highlight-action-argument-face
+
+** Abolished face
+
+   wl-highlight-refile-destination-face
+   (renamed to wl-highlight-action-argument-face)
+
+** Variables renamed
+   wl-summary-delete-folder-alist is renamed to
+   wl-summary-dispose-folder-alist.
+
+** POP3 folder existence check is simplifyed (by default).
+   The default value for elmo-pop3-exists-exactly is changed to nil.
+
+** IMAP4 commands EXPUNGE and CHECK are now send asynchronously.
+
 ** Default value of wl-folder-hierarchy-access-folders has been changed.
 
 ** Access group "@/" of shimbun folders can be used now.
diff --git a/NEWS.ja b/NEWS.ja
index 8224383..d3df5f8 100644 (file)
--- a/NEWS.ja
+++ b/NEWS.ja
@@ -1,5 +1,61 @@
 Wanderlust NEWS (\e$BF|K\8lHG\e(B) -- User-visible changes in Wanderlust.
 
+* 2.10.1 \e$B$+$i\e(B 2.12.0 \e$B$X$NJQ99E@\e(B
+
+** \e$BJV?.:Q$_%^!<%/\e(B A,& \e$B$,DI2C$5$l$^$7$?!#\e(B
+   \e$B%5%^%j$K$*$$$F!$JV?.$7$?%a%C%;!<%8$K\e(B A \e$B%^!<%/\e(B(\e$B%-%c%C%7%e$J$7$N>l9g\e(B)
+   \e$B$b$7$/$O\e(B & \e$B%^!<%/\e(B(\e$B%-%c%C%7%e$"$j$N>l9g\e(B) \e$B$,I=<($5$l$^$9!#\e(B
+
+** \e$B%U%)%k%@$N8!:w>r7o$K!$\e(B'\e$B%U%i%0\e(B' (\e$B%a%C%;!<%8$N>uBV\e(B) \e$B$,DI2C$5$l$^$7$?!#\e(B
+   \e$B%U%i%0$K$O!"\e(Bunread(\e$BL$FI\e(B), important(\e$B=EMW\e(B), answered(\e$BJV?.:Q$_\e(B),
+   digest (\e$BL$FI$^$?$O=EMW\e(B), any (\e$BL$FI$^$?$O=EMW$^$?$OJV?.:Q$_\e(B)\e$B$,$"$j$^$9!#\e(B
+   \e$BNc$($P!"<!$N%U%#%k%?%U%)%k%@$O!"\e(B%inbox \e$B$N$&$A!$L$FI$^$?$O=EMW$J\e(B
+   \e$B%a%C%;!<%8$N$_$,=P8=$7$^$9!#\e(B
+   /flag:digest/%inbox
+
+** \e$B%^%k%A%U%)%k%@$H%*%j%8%J%k%U%)%k%@$N>uBV$,F14|$5$l$k$h$&$K$J$j$^$7$?!#\e(B
+   \e$BNc$($P!$\e(B+inbox \e$B$NL$FI>pJs$,!$\e(B*+inbox,+outbox \e$B$K$bH?1G$5$l$^$9!#\e(B
+
+** \e$B0l;~%^!<%/$H!"$=$l$KBP$9$k%"%/%7%g%s$r<+M3$KDj5A$G$-$k$h$&$K$J$j$^$7$?!#\e(B
+
+   \e$B%G%U%)%k%H$G$O0J2<$N%^!<%/$H%"%/%7%g%s$rDj5A$7$F$$$^$9!#\e(B
+   \e$B=>Mh$+$i0z$-7Q$,$l$?%^!<%/$H%"%/%7%g%s\e(B
+    "o" refile   (\e$B=>Mh$N%j%U%!%$%k$HF1$8\e(B)
+    "O" copy     (\e$B=>Mh$N%3%T!<$HF1$8\e(B)
+    "d" dispose  (\e$B5l\e(B delete, D \e$B%^!<%/!#\e(Bwl-trash-folder \e$B$K0\F0!#\e(B
+                 wl-dispose-folder-alist \e$B$NCM$K$h$j5sF0$,7h$^$k!#\e(B)
+   \e$B?7$?$KDI2C$5$l$?%^!<%/$H%"%/%7%g%s\e(B
+    "D" delete   (\e$B$$$-$J$j>C5n\e(B)
+    "i" prefetch (\e$B%W%j%U%'%C%A\e(B)
+    "~" resend   (\e$B:FAw\e(B)
+   \e$B%5%^%j$G\e(B x \e$B%-!<$r2!$9$H%^!<%/$KBP1~$7$?%"%/%7%g%s$,$9$Y$F<B9T$5$l$^$9!#\e(B
+   \e$B%^!<%/$H%"%/%7%g%s$O!"?75,JQ?t\e(B wl-summary-mark-action-list \e$B$K$h$C$FDj5A\e(B
+   \e$B$G$-$^$9!#>\$7$/$OF1JQ?t$N\e(B docstring \e$B$r;2>H$7$F$/$@$5$$!#\e(B
+
+** \e$B4X?t\e(B wl-summary-resend-message \e$B$OGQ;_$5$l$^$7$?!#$=$NBe$o$j$K\e(B
+   wl-summary-resend \e$B$r;H$($P:FAw%^!<%/$rIU$1$k$3$H$,$G$-$^$9!#\e(B
+
+** \e$B?75,\e(B face
+
+   wl-highlight-summary-disposed-face
+   wl-highlight-summary-prefetch-face
+   wl-highlight-summary-resend-face
+   wl-highlight-summary-answered-face
+   wl-highlight-action-argument-face
+
+** \e$BGQ;_$5$l$?\e(B face
+
+   wl-highlight-refile-destination-face
+   (wl-highlight-action-argument-face \e$B$KJQL>\e(B)
+
+** \e$BJQ?t\e(B wl-summary-delete-folder-alist \e$B$O\e(B wl-summary-dispose-folder-alist \e$B$K\e(B
+   \e$BL>A0$,JQ99$5$l$^$7$?!#\e(B
+
+** POP3 \e$B%U%)%k%@$NB8:_%A%'%C%/$N%G%U%)%k%H5sF0$r4JN,2=\e(B
+   elmo-pop3-exists-exactly \e$B$N%G%U%)%k%HCM$r\e(B nil \e$B$K$7$^$7$?!#\e(B
+
+** IMAP4 \e$B$K$*$$$F!"\e(BEXPUNGE, CHECK \e$B%3%^%s%I$rHsF14|$GAw?.$9$k$h$&$K$7$^$7$?!#\e(B
+
 ** wl-folder-hierarchy-access-folders \e$B$N=i4|CM$,JQ99$5$l$^$7$?!#\e(B
 
 ** \e$B?7J9%U%)%k%@$N%"%/%;%9%0%k!<%W\e(B "@/" \e$B$,;H$($k$h$&$K$J$j$^$7$?!#\e(B
diff --git a/WL-MK b/WL-MK
index cb0235d..123db2b 100644 (file)
--- a/WL-MK
+++ b/WL-MK
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Texinfo stuff
 
+(defun wl-texinfo-info-file (lang)
+  (symbol-value (intern (format "wl-%s-info" lang))))
+
+(defun wl-texinfo-texi-file (lang)
+  (symbol-value (intern (format "wl-%s-texi" lang))))
+
+(defun wl-texinfo-check-newer (lang)
+  (let ((info-file (expand-file-name (wl-texinfo-info-file lang) DOCDIR)))
+    (and
+     (file-newer-than-file-p info-file
+                            (expand-file-name "version.texi" DOCDIR))
+     (file-newer-than-file-p info-file
+                            (expand-file-name (wl-texinfo-texi-file lang) DOCDIR)))))
+
 (defun wl-texinfo-format-file (lang)
-  (let ((infofile (symbol-value (intern (format "wl-%s-info" lang))))
-       (texifile (symbol-value (intern (format "wl-%s-texi" lang)))))
-    (require 'wl-vars) ;; for 'wl-cs-local
-    (or (file-newer-than-file-p (expand-file-name infofile DOCDIR)
-                               (expand-file-name texifile DOCDIR))
-       (let (obuf beg)
-         ;; Support old texinfmt.el
-         (require 'ptexinfmt (expand-file-name "ptexinfmt.el" UTILSDIR))
-         (find-file (expand-file-name texifile DOCDIR))
-         (setq obuf (current-buffer))
-         ;; We can't know file names if splitted.
-         (texinfo-format-buffer t)
-         ;; Emacs20.2's default is 'raw-text-unix.
-         (and (fboundp 'set-buffer-file-coding-system)
-              (set-buffer-file-coding-system wl-cs-local))
-         (save-buffer)
-         (kill-buffer (current-buffer)) ;; info
-         (kill-buffer obuf)) ;; texi
-       )))
+  (require 'wl-vars) ;; for 'wl-cs-local
+  (or (wl-texinfo-check-newer lang)
+      (let (obuf)
+       ;; Support old texinfmt.el
+       (require 'ptexinfmt (expand-file-name "ptexinfmt.el" UTILSDIR))
+       (find-file (expand-file-name (wl-texinfo-texi-file lang) DOCDIR))
+       (setq obuf (current-buffer))
+       ;; We can't know file names if splitted.
+       (texinfo-format-buffer t)
+       ;; Emacs20.2's default is 'raw-text-unix.
+       (and (fboundp 'set-buffer-file-coding-system)
+            (set-buffer-file-coding-system wl-cs-local))
+       (save-buffer)
+       (kill-buffer (current-buffer)) ;; info
+       (kill-buffer obuf)) ;; texi
+      ))
 
 (defun wl-texinfo-format ()
   (wl-detect-info-directory)
         (wl-texinfo-format-file wl-info-lang))))
 
 (defun wl-texinfo-install-file (lang)
-  (let ((infofile (symbol-value (intern (format "wl-%s-info" lang)))))
+  (let ((infofile (wl-texinfo-info-file lang)))
     (install-file infofile DOCDIR INFODIR nil 'overwrite)))
 
 (defun wl-texinfo-install ()
         (let ((wl-info-lang (car wl-info-lang)))
           (wl-primary-info-file)))
        ((stringp wl-info-lang)
-        (symbol-value (intern (format "wl-%s-info" wl-info-lang))))))
+        (wl-texinfo-info-file wl-info-lang))))
 
 (defun wl-detect-info-directory ()
   (config-wl-package-subr)
index ff68dd0..cf0931b 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -10,6 +10,7 @@
 
 * other tasks
 
+** use hash table for entries in .addresses
 ** mitigate special treatment of NNTP around wl-folder-check-entity-async
 ** organize variable like wl-summary-other-frame-list so as to open
    matched summary in the new frame
index 203280d..d63471f 100644 (file)
@@ -10,6 +10,7 @@
 
 * \e$B$=$NB>$N\e(B TODO
 
+** .addresses \e$B%(%s%H%j$K$D$$$F\e(B hash table \e$B$r;H$&\e(B
 ** wl-folder-check-entity-async \e$B$N$"$?$j$G\e(B NNTP \e$B$,FCJL07$$$K$J$C$F$$$k$N$r\e(B
    \e$B$I$&$K$+$9$k\e(B
 ** wl-summary-other-frame-list \e$B$N$h$&$JJQ?t$r@_$1!"%^%C%A$7$?%5%^%j$O\e(B
index 8b37edd..84e7100 100644 (file)
@@ -1 +1 @@
-\def\versionnumber{2.11.3}
+\def\versionnumber{2.11.9}
index 2d6094d..6b14f43 100644 (file)
@@ -1 +1 @@
-@set VERSION 2.11.3
+@set VERSION 2.11.9
index 9bd0a87..ff41c97 100644 (file)
@@ -1925,7 +1925,8 @@ prefix argument \e$B$r$D$1$k$H!"%9%F%#%C%-!<%5%^%j$KF~$j$^$9!#\e(B
 @item V
 @kindex V (Folder)
 @findex wl-folder-virtual
-\e$B;XDj$7$?>r7o$H9gCW$9$k%a%C%;!<%8$N$_$r4^$`2>A[%U%)%k%@$X0\F0$7$^$9!#\e(B
+\e$B;XDj$7$?>r7o$H9gCW$9$k%a%C%;!<%8$N$_$r4^$`2>A[%U%)%k%@\e(B(\e$B%U%#%k%?%U%)%k%@\e(B)
+\e$B$X0\F0$7$^$9!#\e(B
 (@code{wl-folder-virtual})
 
 @item ?
@@ -2554,7 +2555,7 @@ News \e$B%U%)%k%@$G$O\e(B article \e$BHV9f!"\e(BIMAP \e$B%U%)%k%@$G$O\e(B UID\e$B!"\e(BM
 
 \e$B0l;~E*%^!<%/$O!"%a%C%;!<%8$rA`:n$9$k$?$a%^!<%/$G$9!#\e(B
 
-\e$B0l;~E*%^!<%/$K$O!"\e(B@samp{*}, @samp{D}, @samp{o}, @samp{O} \e$B$,$"$j$^$9!#\e(B
+\e$B0l;~E*%^!<%/$K$O!"\e(B@samp{*}, @samp{d}, @samp{o}, @samp{O} \e$B$,$"$j$^$9!#\e(B
 
 @table @samp
 @item *
@@ -2562,8 +2563,8 @@ News \e$B%U%)%k%@$G$O\e(B article \e$BHV9f!"\e(BIMAP \e$B%U%)%k%@$G$O\e(B UID\e$B!"\e(BM
 @kbd{m} \e$B$G;O$^$k%3%^%s%I$G\e(B @samp{*}\e$B%^!<%/$N$D$$$?%a%C%;!<%8BP$7$F0l3g$7$?=hM}\e(B
 \e$B$,$G$-$^$9!#\e(B
 
-@item D
-\e$B:o=|$9$k%a%C%;!<%8$KIU$/%^!<%/$G$9!#\e(B@kbd{d} \e$B$r2!$9$HIU$-$^$9!#\e(B
+@item d
+\e$B=hJ,$9$k%a%C%;!<%8$KIU$/%^!<%/$G$9!#\e(B@kbd{d} \e$B$r2!$9$HIU$-$^$9!#\e(B
 
 @item o
 \e$B%j%U%!%$%k$9$k%a%C%;!<%8$KIU$/%^!<%/$G$9!#\e(B@kbd{o}\e$B$r2!$9$H!"%j%U%!%$%k@h\e(B
@@ -2574,8 +2575,7 @@ News \e$B%U%)%k%@$G$O\e(B article \e$BHV9f!"\e(BIMAP \e$B%U%)%k%@$G$O\e(B UID\e$B!"\e(BM
 \e$BMh$^$9!#$=$l$KEz$($k$H!"%3%T!<@h$N%U%)%k%@>pJs$,IU$12C$o$j$^$9!#\e(B
 @end table
 
-@kbd{x} \e$B$r2!$9$H!"\e(B@samp{D}, @samp{o}, @samp{O} \e$B$N%^!<%/$,IU$$$F$$$k\e(B
-\e$B%a%C%;!<%8$N:o=|!"%j%U%!%$%k!"%3%T!<$r<B9T$7$^$9!#\e(B
+@kbd{x} \e$B$r2!$9$H!"$=$l$>$l$N0l;~E*%^!<%/$KBP1~$7$?%"%/%7%g%s$r<B9T$7$^$9!#\e(B
 
 @subsection \e$B1JB3E*%^!<%/\e(B
 
@@ -3087,7 +3087,7 @@ prefix argument \e$B$D$-$J$i$P%-%c%C%7%e$,B8:_$7$F$bL5;k$7$F:FFI$_9~$_$7D>$7$^$9!
 @item $
 @kindex $ (Summary)
 @findex wl-summary-mark-as-important
-@samp{$} \e$B%^!<%/$r$D$1$^$9!#4{$K\e(B @samp{$} \e$B%^!<%/$,$"$l$P:o=|$7$^$9!#\e(B
+@samp{$} \e$B%^!<%/$r$D$1$^$9!#4{$K\e(B @samp{$} \e$B%^!<%/$,$"$l$P%^!<%/$r<h$j=|$-$^$9!#\e(B
 (@code{wl-summary-mark-as-important})
 
 @item y
@@ -3256,19 +3256,28 @@ prefix argument \e$B$D$-$G<B9T$9$k$H!"G$0U$NF~NO%"%I%l%9$rEPO?\e(B/\e$BJQ99\e(B/\e$B:
 @item s
 @kindex s (Summary)
 @findex wl-summary-sync
-\e$B%a%C%;!<%8$N0lMwI=<($N99?7%l%s%8\e(B(@samp{all}, @samp{update},
-@samp{rescan}, @samp{cache-status}, @samp{first}, @samp{last})
-\e$B$NF~NO$r<u$1IU$1$?8e!"$=$l$K4p$E$$$F%a%C%;!<%8$N0lMwI=<($r99?7$7$^$9!#\e(B
+\e$B%a%C%;!<%8$N0lMwI=<($N99?7%l%s%8$NF~NO$r<u$1IU$1$?8e!"$=$l$K4p$E$$$F%a%C\e(B
+\e$B%;!<%8$N0lMwI=<($r99?7$7$^$9!#99?7%l%s%8$H$7$F$O0J2<$N$$$:$l$+$r;XDj$G$-\e(B
+\e$B$^$9!#\e(B
 
 @example
 @group
-all            ...\e$B$9$Y$F99?7\e(B
-all-visible    ...\e$B8+$($F$$$k%a%C%;!<%8$K$D$$$F$9$Y$F99?7\e(B
-update         ...\e$B8=:_$NI=<($r99?7\e(B
-rescan         ...\e$B8=:_$N\e(B msgdb \e$B$NFbMF$r:FI=<(\e(B
-rescan-noscore ...\e$B8=:_$N\e(B msgdb \e$B$NFbMF$r:FI=<(\e(B(\e$B%9%3%"$J$7\e(B)
-cache-status   ...\e$B%-%c%C%7%e$N>uBV$r%^!<%/$KH?1G\e(B
-first, last    ...\e$B%U%#%k%?%U%)%k%@$K0\F0\e(B
+all              \e$B8=:_$N\e(B msgdb \e$B$NFbMF$rGK4~$7!"A4>pJs$r<h$j4s$;D>$7$^$9!#\e(B
+                 killed \e$B%a%C%;!<%8$O<h$j4s$;D>$7$^$;$s!#\e(B
+all-entirely     \e$B8=:_$N\e(B msgdb \e$B$NFbMF$rGK4~$7!"A4>pJs$r<h$j4s$;D>$7$^$9!#\e(B
+                 killed \e$B%a%C%;!<%8$b<h$j4s$;D>$7$^$9!#\e(B
+update           \e$BJ];}$7$F$$$k\e(B msgdb \e$B$N>pJs$H:G?7>pJs$N:9J,$r99?7$7$^$9!#\e(B
+                 killed \e$B%a%C%;!<%8$O99?7$7$^$;$s!#\e(B
+update-entirely  \e$BJ];}$7$F$$$k\e(B msgdb \e$B$N>pJs$H:G?7>pJs$N:9J,$r99?7$7$^$9!#\e(B
+                 killed \e$B%a%C%;!<%8$b99?7$7$^$9!#\e(B
+rescan           \e$B8=:_$N\e(B msgdb \e$B$K4p$E$$$F:FI=<($r9T$$$^$9!#\e(B
+rescan-noscore   \e$B8=:_$N\e(B msgdb \e$B$K4p$E$$$F:FI=<($r9T$$$^$9!#\e(B
+                 \e$B%9%3%"$K$h$j>C$($?%a%C%;!<%8$bI=<($7$^$9!#\e(B
+cache-status     \e$B%-%c%C%7%e$N>uBV$r%^!<%/$KH?1G$7$^$9!#\e(B
+mark             \e$B%^!<%/$N>uBV$r:G?7$K$7$^$9!#\e(B
+no-sync          \e$B2?$b$7$^$;$s!#\e(B
+first:\e$B?t;z\e(B       \e$B%U%#%k%?%U%)%k%@$K0\F0$7$^$9!#\e(B
+last:\e$B?t;z\e(B        \e$B%U%#%k%?%U%)%k%@$K0\F0$7$^$9!#\e(B
 @end group
 @end example
 
@@ -3308,8 +3317,8 @@ first, last    ...\e$B%U%#%k%?%U%)%k%@$K0\F0\e(B
 
 @item V
 @kindex V (Summary)
-\e$BM?$($i$l$?>r7o$r;}$D%a%C%;!<%8$N$_$r;}$D2>A[%U%)%k%@$X0\F0$7$^$9!#\e(B
-prefix argument \e$B$D$-$G<B9T$9$k$H2>A[%U%)%k%@$+$iC&=P$7$^$9!#\e(B
+\e$BM?$($i$l$?>r7o$r;}$D%a%C%;!<%8$N$_$r;}$D2>A[%U%)%k%@\e(B(\e$B%U%#%k%?%U%)%k%@\e(B)\e$B$X\e(B
+\e$B0\F0$7$^$9!#\e(Bprefix argument \e$B$D$-$G<B9T$9$k$H2>A[%U%)%k%@$+$iC&=P$7$^$9!#\e(B
 @findex wl-summary-virtual
 (@code{wl-summary-virtual})
 
@@ -3331,17 +3340,10 @@ prefix argument \e$B$D$-$G<B9T$9$k$H2>A[%U%)%k%@$+$iC&=P$7$^$9!#\e(B
 \e$B%+!<%=%k9T$N%a%C%;!<%8$rFI$s$@$3$H$K$7$^$9!#\e(B
 (@code{wl-summary-mark-as-read})
 
-@item i
-@kindex i (Summary)
-\e$B%+!<%=%k9T$N%a%C%;!<%8$r%W%j%U%'%C%A$7$^$9!#\e(B
-prefix argument \e$B$D$-$J$i$P4{$K%-%c%C%7%e$5$l$F$$$k%a%C%;!<%8$b\e(B
-\e$B:FEY%W%j%U%'%C%A$7$^$9!#\e(B
-@findex wl-summary-prefetch
-(@code{wl-summary-prefetch})
-
 @item x
 @kindex x (Summary)
-\e$B$9$Y$F$N\e(B @samp{D}, @samp{o}, @samp{O} \e$B%^!<%/$r<B9T$7$^$9!#\e(B
+\e$B%5%^%j%P%C%U%!$N$9$Y$F$N%a%C%;!<%8$KBP$7$F!"0l;~E*%^!<%/$KBP1~$9$k%"%/%7%g%s\e(B
+\e$B$r<B9T$7$^$9!#\e(B
 @findex wl-summary-exec
 (@code{wl-summary-exec})
 
@@ -3378,19 +3380,39 @@ prefix argument \e$B$D$-$J$i$P4{$K%-%c%C%7%e$5$l$F$$$k%a%C%;!<%8$b\e(B
 
 @item d
 @kindex d (Summary)
+@findex wl-summary-dispose
+\e$B%+!<%=%k9T$N%a%C%;!<%8$K=hJ,%^!<%/$r$D$1$^$9!#\e(B
+\e$B=hJ,$N7k2L$O\e(B @code{wl-dispose-folder-alist} \e$B$G@)8f$G$-!"%G%U%)%k%H$G$O\e(B
+@code{wl-trash-folder} \e$B$K%j%U%!%$%k$5$l$^$9!#\e(B
+(@code{wl-summary-dispose})
+
+@item D
+@kindex D (Summary)
 @findex wl-summary-delete
-\e$B%+!<%=%k9T$N%a%C%;!<%8$K:o=|%^!<%/$r$D$1$^$9!#\e(B
+\e$B%+!<%=%k9T$N%a%C%;!<%8$K6/@):o=|%^!<%/$r$D$1$^$9!#\e(B
 (@code{wl-summary-delete})
 
+@item i
+@kindex i (Summary)
+\e$B%+!<%=%k9T$N%a%C%;!<%8$K%W%j%U%'%C%AM=Ls%^!<%/$rIU$1$^$9!#\e(B
+@findex wl-summary-prefetch
+(@code{wl-summary-prefetch})
+
+@item ~
+@kindex ~ (Summary)
+@findex wl-summary-resend
+\e$B%+!<%=%k9T$N%a%C%;!<%8$K:FAwM=Ls%^!<%/$rIU$1$^$9!#\e(B
+(@code{wl-summary-resend})
+
 @item u
 @kindex u (Summary)
 @findex wl-summary-unmark
-\e$B%+!<%=%k9T$N%a%C%;!<%8$K%^!<%/$,$"$l$P:o=|$7$^$9!#\e(B
+\e$B%+!<%=%k9T$N%a%C%;!<%8$K%^!<%/$,$"$l$P<h$j=|$-$^$9!#\e(B
 (@code{wl-summary-unmark})
 
 @item U
 @kindex U (Summary)
-\e$B;XDj$7$?%^!<%/$r$9$Y$F:o=|$7$^$9!#\e(B
+\e$B;XDj$7$?%^!<%/$r$9$Y$F<h$j=|$-$^$9!#\e(B
 @findex wl-summary-unmark-all
 (@code{wl-summary-unmark-all})
 
@@ -3404,7 +3426,7 @@ prefix argument \e$B$D$-$J$i$P4{$K%-%c%C%7%e$5$l$F$$$k%a%C%;!<%8$b\e(B
 @kindex r $ (Summary)
 @findex wl-summary-mark-as-important-region
 \e$B;XDj%j!<%8%g%s$K$"$k%a%C%;!<%8A4$F$K\e(B @samp{$} \e$B%^!<%/$r$D$1$^$9!#\e(B
-\e$B$9$G$K\e(B @samp{$} \e$B%^!<%/$,$"$l$P:o=|$7$^$9!#\e(B
+\e$B$9$G$K\e(B @samp{$} \e$B%^!<%/$,$"$l$P%^!<%/$r<h$j=|$-$^$9!#\e(B
 (@code{wl-summary-mark-as-important-region})
 
 @item r !
@@ -3413,16 +3435,11 @@ prefix argument \e$B$D$-$J$i$P4{$K%-%c%C%7%e$5$l$F$$$k%a%C%;!<%8$b\e(B
 \e$B;XDj%j!<%8%g%s$K$"$k%a%C%;!<%8$rA4$FFI$^$J$+$C$?$3$H$K$7$^$9!#\e(B
 (@code{wl-summary-mark-as-unread-region})
 
-@item r i
-@kindex r i (Summary)
-@findex wl-summary-prefetch-region
-\e$B;XDj%j!<%8%g%s$K$"$k%a%C%;!<%8$rA4$F%W%j%U%'%C%A$7$^$9!#\e(B
-(@code{wl-summary-prefetch-region})
-
 @item r x
 @kindex r x (Summary)
 @findex wl-summary-exec-region
-\e$B;XDj%j!<%8%g%s$K$"$k%a%C%;!<%8$K$D$$$?\e(B @samp{D}, @samp{o}, @samp{O} \e$B%^!<%/$r<B9T$7$^$9!#\e(B
+\e$B;XDj%j!<%8%g%s$K$"$k%a%C%;!<%8$KBP$7$F!"0l;~E*%^!<%/$KBP1~$9$k%"%/%7%g%s\e(B
+\e$B$r<B9T$7$^$9!#\e(B
 (@code{wl-summary-exec-region})
 
 @item r *
@@ -3445,9 +3462,15 @@ prefix argument \e$B$D$-$J$i$P4{$K%-%c%C%7%e$5$l$F$$$k%a%C%;!<%8$b\e(B
 
 @item r d
 @kindex r d (Summary)
-@findex wl-summary-delete-region
-\e$B;XDj%j!<%8%g%s$K$"$k%a%C%;!<%8$K:o=|%^!<%/$r$D$1$^$9!#\e(B
-(@code{wl-summary-delete-region})
+@findex wl-summary-dispose-region
+\e$B;XDj%j!<%8%g%s$K$"$k%a%C%;!<%8$K=hJ,%^!<%/$r$D$1$^$9!#\e(B
+(@code{wl-summary-dispose-region})
+
+@item r i
+@kindex r i (Summary)
+@findex wl-summary-prefetch-region
+\e$B;XDj%j!<%8%g%s$K$"$k%a%C%;!<%8$K%W%j%U%'%C%AM=Ls%^!<%/$rIU$1$^$9!#\e(B
+(@code{wl-summary-prefetch-region})
 
 @item r u
 @kindex r u (Summary)
@@ -3472,9 +3495,9 @@ prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$rFI$s$
 @kindex t $ (Summary)
 @findex wl-thread-mark-as-important
 \e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$K\e(B @samp{$} \e$B%^!<%/$r$D$1$^$9!#\e(B
-\e$B4{$K\e(B @samp{$} \e$B%^!<%/$,$"$l$P:o=|$7$^$9!#\e(B
-prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%I$K\e(B
-@samp{$} \e$B%^!<%/$r$D$1$k$+:o=|$9$k$+$7$^$9!#\e(B
+\e$B4{$K\e(B @samp{$} \e$B%^!<%/$,$"$l$P%^!<%/$r<h$j=|$-$^$9!#\e(B
+prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4BN$K\e(B
+\e$BE,MQ$7$^$9!#\e(B
 (@code{wl-thread-mark-as-important})
 
 @item t !
@@ -3484,70 +3507,69 @@ prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%I$K\e(B
 prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$rFI$^$J$+$C$?$3$H$K$7$^$9!#\e(B
 (@code{wl-thread-mark-as-unread})
 
-@item t i
-@kindex t i (Summary)
-@findex wl-thread-prefetch
-\e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$r%W%j%U%'%C%A$7$^$9!#\e(B
-prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$r%W%j%U%'%C%A$7$^$9!#\e(B
-(@code{wl-thread-prefetch})
-
 @item t x
 @kindex t x (Summary)
 @findex wl-thread-exec
-\e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$K$D$$$?\e(B @samp{D}, @samp{o}, @samp{O} \e$B%^!<%/$r<B9T$7$^$9!#\e(B
-prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$K$D$$$?\e(B @samp{D}, @samp{o}, @samp{O} \e$B%^!<%/$r<B9T$7$^$9!#\e(B
+\e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$N%a%C%;!<%8$KBP$7$F!"0l;~\e(B
+\e$BE*%^!<%/$KBP1~$9$k%"%/%7%g%s$r<B9T$7$^$9!#\e(B
+prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$K\e(B
+\e$BE,MQ$7$^$9!#\e(B
 (@code{wl-thread-exec})
 
 @item t *
 @kindex t * (Summary)
 @findex wl-thread-target-mark
 \e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$K$^$H$a=hM}MQ%^!<%/$r$D$1$^$9!#\e(B
-prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$K$^$H$a=hM}MQ%^!<%/$r$D$1$^$9!#\e(B
+prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4BN$K\e(B
+\e$BE,MQ$7$^$9!#\e(B
 (@code{wl-thread-target-mark})
 
 @item t o
 @kindex t o (Summary)
 @findex wl-thread-refile
 \e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$K%j%U%!%$%k%^!<%/$r$D$1$^$9!#\e(B
-prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$K%j%U%!%$%k%^!<%/$r$D$1$^$9!#\e(B
+prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4BN$K\e(B
+\e$BE,MQ$7$^$9!#\e(B
 (@code{wl-thread-refile})
 
 @item t O
 @kindex t O (Summary)
 @findex wl-thread-copy
 \e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$K%3%T!<%^!<%/$r$D$1$^$9!#\e(B
-prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$K%3%T!<%^!<%/$r$D$1$^$9!#\e(B
+prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4BN$K\e(B
+\e$BE,MQ$7$^$9!#\e(B
 (@code{wl-thread-copy})
 
 @item t d
 @kindex t d (Summary)
-@findex wl-thread-delete
-\e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$K:o=|%^!<%/$r$D$1$^$9!#\e(B
-prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$K:o=|%^!<%/$r$D$1$^$9!#\e(B
-(@code{wl-thread-delete})
+@findex wl-thread-dispose
+\e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$K=hJ,%^!<%/$r$D$1$^$9!#\e(B
+prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4BN$K\e(B
+\e$BE,MQ$7$^$9!#\e(B
+(@code{wl-thread-dispose})
+
+@item t i
+@kindex t i (Summary)
+@findex wl-thread-prefetch
+\e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$K%W%j%U%'%C%AM=Ls%^!<%/$r\e(B
+\e$BIU$1$^$9!#\e(B
+(@code{wl-thread-prefetch})
 
 @item t u
 @kindex t u (Summary)
 @findex wl-thread-unmark
 \e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$N%a%C%;!<%8$K%^!<%/$,$"$l$P:o=|$7$^$9!#\e(B
-prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4BN$N%a%C%;!<%8$K%^!<%/$,$"$l$P:o=|$7$^$9!#\e(B
+prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4BN$K\e(B
+\e$BE,MQ$7$^$9!#\e(B
 (@code{wl-thread-unmark})
 
 @item t y
 @kindex t y (Summary)
 @findex wl-thread-save
 \e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$rJ]B8$7$^$9!#\e(B
-prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$rJ]B8$7$^$9!#\e(B
+prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4BN$rJ]B8$7$^$9!#\e(B
 (@code{wl-thread-save})
 
-@item m i
-@kindex m i (Summary)
-@findex wl-summary-target-mark-prefetch
-\e$B$^$H$a=hM}MQ%^!<%/\e(B @samp{*} \e$B$N$D$$$?%a%C%;!<%8$rA4$F%W%j%U%'%C%A$7$^$9!#\e(B
-prefix argument \e$B$D$-$J$i$P4{$K%-%c%C%7%e$5$l$F$$$k%a%C%;!<%8$b\e(B
-\e$B:FEY%W%j%U%'%C%A$7$^$9!#\e(B
-(@code{wl-summary-target-mark-prefetch})
-
 @item m R
 @kindex m R (Summary)
 @findex wl-summary-target-mark-mark-as-read
@@ -3558,7 +3580,7 @@ prefix argument \e$B$D$-$J$i$P4{$K%-%c%C%7%e$5$l$F$$$k%a%C%;!<%8$b\e(B
 @kindex m $ (Summary)
 @findex wl-summary-target-mark-mark-as-important
 \e$B$^$H$a=hM}MQ%^!<%/\e(B @samp{*} \e$B$N$D$$$?%a%C%;!<%8$K\e(B @samp{$} \e$B%^!<%/$r$D$1$^$9!#\e(B
-\e$B$9$G$K\e(B @samp{$} \e$B%^!<%/$,$"$l$P:o=|$7$^$9!#\e(B
+\e$B$9$G$K\e(B @samp{$} \e$B%^!<%/$,$"$l$P%^!<%/$r<h$j=|$-$^$9!#\e(B
 (@code{wl-summary-target-mark-mark-as-important})
 
 @item m !
@@ -3581,9 +3603,16 @@ prefix argument \e$B$D$-$J$i$P4{$K%-%c%C%7%e$5$l$F$$$k%a%C%;!<%8$b\e(B
 
 @item m d
 @kindex m d (Summary)
-@findex wl-summary-target-mark-delete
-\e$B$^$H$a=hM}MQ%^!<%/\e(B @samp{*} \e$B$N$D$$$?%a%C%;!<%8$K:o=|%^!<%/$r$D$1$^$9!#\e(B
-(@code{wl-summary-target-mark-delete})
+@findex wl-summary-target-mark-dispose
+\e$B$^$H$a=hM}MQ%^!<%/\e(B @samp{*} \e$B$N$D$$$?%a%C%;!<%8$K=hJ,%^!<%/$r$D$1$^$9!#\e(B
+(@code{wl-summary-target-mark-dispose})
+
+@item m i
+@kindex m i (Summary)
+@findex wl-summary-target-mark-prefetch
+\e$B$^$H$a=hM}MQ%^!<%/\e(B @samp{*} \e$B$N$D$$$?%a%C%;!<%8$K%W%j%U%'%C%AM=Ls%^!<%/$r\e(B
+\e$BIU$1$^$9!#\e(B
+(@code{wl-summary-target-mark-prefetch})
 
 @item m y
 @kindex m y (Summary)
@@ -3655,12 +3684,6 @@ prefix argument \e$B$D$-$J$i$P4{$K%-%c%C%7%e$5$l$F$$$k%a%C%;!<%8$b\e(B
 \e$B;XDj$7$?B>$N%W%m%;%9$K%Q%$%W7PM3$G0z$-EO$7$^$9!#\e(B
 (@code{wl-summary-target-mark-pipe})
 
-@item D
-@kindex D (Summary)
-@findex wl-summary-erase
-\e$B$4$_H"$K0\F0$;$:$K!"$=$N>l$G<B:]$K%a%C%;!<%8$r:o=|$7$^$9!#\e(B
-(@code{wl-summary-erase})
-
 @item M-t
 @kindex M-t (Summary)
 @findex wl-toggle-plugged
@@ -7367,6 +7390,13 @@ Non-nil \e$B$J$i$P!"\e(BWanderlust \e$B=*N;;~$K3NG'$r9T$$$^$9!#\e(B
 \e$B=i4|@_Dj$O\e(B @code{t}\e$B!#\e(B
 Non-nil \e$B$J$i$P!"%a!<%kAw?.;~$KK\Ev$KAw?.$7$FNI$$$+$r3NG'$7$^$9!#\e(B
 
+@item wl-default-sync-range
+@vindex wl-default-sync-range
+\e$B=i4|@_Dj$O\e(B @samp{update}\e$B!#\e(B
+\e$B%G%U%)%k%H$N%5%^%j99?7%l%s%8$G!"\e(B@samp{all}, @samp{update},
+@samp{rescan}, @samp{no-sync} \e$B$N$$$:$l$+$r;XDj$7$^$9!#\e(B
+\e$B%l%s%8$N0UL#$K$D$$$F$O\e(B @code{wl-summary-sync} \e$B$N@bL@$r;2>H$7$F2<$5$$!#\e(B
+
 @item wl-folder-sync-range-alist
 @vindex wl-folder-sync-range-alist
 \e$B=i4|@_Dj$O!"0J2<$NO"A[%j%9%H!#\e(B
@@ -7379,11 +7409,11 @@ Non-nil \e$B$J$i$P!"%a!<%kAw?.;~$KK\Ev$KAw?.$7$FNI$$$+$r3NG'$7$^$9!#\e(B
 @end lisp
 
 @noindent
-\e$B%U%)%k%@L>$N@55,I=8=$H%U%)%k%@0\F0;~$N%5%^%j99?7%l%s%8$H$NO"A[%j%9%H$G$9!#\e(B
-\e$B99?7%l%s%8$K$O\e(B @code{wl-summary-sync} \e$B$GF~NO$G$-$kCM$N$$$:$l$+\e(B
-(@samp{all}, @samp{update}, @samp{rescan}, @samp{rescan-noscore},
-@samp{first}, @samp{last}, @samp{no-sync}) \e$B$r;XDj$7$^$9!#%^%C%A$7$J$+$C$?>l9g$O!"\e(B
-@samp{update} \e$B$H$J$j$^$9!#\e(B
+\e$B%U%)%k%@L>$N@55,I=8=$H%5%^%j99?7%l%s%8$H$NO"A[%j%9%H$G$9!#\e(B
+\e$B99?7%l%s%8$K$O\e(B @samp{all}, @samp{update}, @samp{rescan}, @samp{no-sync}
+\e$B$N$$$:$l$+$r;XDj$7$^$9!#%^%C%A$7$J$+$C$?>l9g$O!"\e(B@code{wl-default-sync-range}
+\e$B$NCM\e(B(\e$B=i4|CM$O\e(B @samp{update})\e$B$r;H$$$^$9!#\e(B
+\e$B%l%s%8$N0UL#$K$D$$$F$O\e(B @code{wl-summary-sync} \e$B$N@bL@$r;2>H$7$F2<$5$$!#\e(B
 
 @item wl-ask-range
 @vindex wl-ask-range
index f3dbd7a..c09e8b6 100644 (file)
@@ -326,9 +326,12 @@ are preserved on all copies.
 
 \section{mark command}
 
+\key{\e$B=hJ,%^!<%/$rIU$1$k\e(B}{d}
+\key{\e$B:o=|%^!<%/$rIU$1$k\e(B}{D}
 \key{\e$B%j%U%!%$%k%^!<%/$rIU$1$k\e(B}{o}
 \key{\e$B%3%T!<%^!<%/$rIU$1$k\e(B}{O}
-\key{\e$B:o=|%^!<%/$rIU$1$k\e(B}{d}
+\key{\e$B%W%j%U%'%C%A%^!<%/$rIU$1$k\e(B}{i}
+\key{\e$B:FAw%^!<%/$rIU$1$k\e(B}{\~{}}
 \key{\e$B=EMW%^!<%/$rIU$1$k\e(B}{\$}
 \key{\e$BI8E*%^!<%/$rIU$1$k\e(B}{*}
 \key{\e$BA4$F$N%a%C%;!<%8$rI8E*$K$9$k\e(B}{m a}
@@ -339,7 +342,7 @@ are preserved on all copies.
 \key{\e$BI8E*$r:o=|\e(B}{m d}
 \key{\e$BI8E*$r0u:~\e(B}{m \#}
 \key{\e$BI8E*$N3F!9$r%Q%$%W$KN.$9\e(B}{m |}
-\key{\e$B%j%U%!%$%k\e(B/\e$B:o=|\e(B/\e$B%3%T!<\e(B \e$B$r<B9T\e(B}{x}
+\key{\e$B0l;~E*%^!<%/$N%"%/%7%g%s$r<B9T\e(B}{x}
 
 \section{prefix arguments for marking}
 
@@ -348,12 +351,6 @@ are preserved on all copies.
 \key{\e$BNN0h$KBP$7$F\e(B}{r}
 
 \newcolumn
-\section{prefetching}
-
-\key{\e$B%W%j%U%'%C%A\e(B}{i}
-\key{\e$BI8E*$r%W%j%U%'%C%A\e(B}{m i}
-\key{\e$BNN0h$r%W%j%U%'%C%A\e(B}{r i}
-
 \section{sticky summary}
 
 \key{\e$B%5%^%j$r%9%F%#%C%-!<$K\e(B}{M-s}
index 7ce7416..2efb662 100644 (file)
@@ -326,9 +326,12 @@ are preserved on all copies.
 
 \section{mark command}
 
+\key{Mark for disposal}{d}
+\key{Mark for deletion}{D}
 \key{Mark for refiling}{o}
 \key{Mark for copying}{O}
-\key{Mark for deleting}{d}
+\key{Mark for prefetching}{i}
+\key{Mark for resending}{\~{}}
 \key{Mark as important}{\$}
 \key{Mark as target}{*}
 \key{Mark all messages as target}{m a}
@@ -339,7 +342,7 @@ are preserved on all copies.
 \key{Mark target messages for deleting}{m d}
 \key{Print target messages}{m \#}
 \key{Send each target message to a pipe}{m |}
-\key{Execute refile/delete/copy}{x}
+\key{Execute action for each temp marks}{x}
 
 \section{prefix arguments for marking}
 
@@ -348,12 +351,6 @@ are preserved on all copies.
 \key{Apply command for region}{r}
 
 \newcolumn
-\section{prefetching}
-
-\key{Prefetch current message}{i}
-\key{Prefetch target messages}{m i}
-\key{Prefetch region}{r i}
-
 \section{sticky summary}
 
 \key{Stick current summary}{M-s}
index 2a2588b..892dc43 100644 (file)
@@ -1905,7 +1905,7 @@ Flush queue.
 @item V
 @kindex V (Folder)
 @findex wl-folder-virtual
-Move to the virtual folder with the condition specified.
+Move to the virtual folder (filter folder) with the condition specified.
 (@code{wl-folder-virtual})
 
 @item ?
@@ -2544,7 +2544,7 @@ message has empty subject field.
 @cindex Mark, Temporary
 
 There are four temporary marks,
-@samp{*}, @samp{D}, @samp{o} and @samp{O}.
+@samp{*}, @samp{d}, @samp{o} and @samp{O}.
 Temporary marks indicates message operations.
 
 @table @samp
@@ -2553,8 +2553,8 @@ Target mark.
 You can execute a command on the all messages that have @samp{*} mark,
 with the key bindings which begins with @kbd{m}.
 
-@item D
-The mark to delete. You can put @samp{D} by typing @kbd{d} key.
+@item d
+The mark to dispose. You can put @samp{d} by typing @kbd{d} key.
 
 @item o
 The mark to refile.
@@ -2568,7 +2568,7 @@ The difference between this mark and refile mark is,
 this mark does not delete the message while latter does.
 @end table
 
-@kbd{x} key executes @samp{D}, @samp{o} and @samp{O} marks.
+@kbd{x} key executes action for temporary marks, respectively.
 
 @subsection Persistent Marks
 
@@ -3094,7 +3094,7 @@ A draft for forwarding the message at current cursor point is prepared.
 @kindex $ (Summary)
 @findex wl-summary-mark-as-important
 Put @samp{$} mark on the message at current cursor point.
-If already marked as @samp{$}, delete it.
+If already marked as @samp{$}, remove the mark.
 (@code{wl-summary-mark-as-important})
 
 @item y
@@ -3268,18 +3268,29 @@ Mark as unread the message at current cursor point.
 @item s
 @kindex s (Summary)
 @findex wl-summary-sync
-Synchronize summary view after prompting the update range
-(@samp{all}, @samp{update}, @samp{rescan}, @samp{first}, @samp{last}).
+Synchronize summary view after prompting the update range.
+You can specify one of the follows.
 
 @example
 @group
-all            ...Discard current summary and update all message.
-all-visible    ...Discard current summary and update all visible message.
-update         ...Update the difference between summary and the folder itself.
-rescan         ...Rescan the msgdb and display again.
-rescan-noscore ...Rescan the msgdb and display again (without scoring).
-cache-status   ...Sync the all marks with the real status of cache.
-first, last    ...Move to the filter folder(partial filter).
+all              Discard present msgdb and retrieve all informations.
+                 Do not retrieve killed messages.
+all-entirely     Discard present msgdb and retrieve all informations.
+                 Retrieve killed messages, too.
+update           Update the difference between informations in present
+                 msgdb and in current folder instance.
+                 Do not retrieve killed messages.
+update-entirely  Update the difference between informations in present
+                 msgdb and in current folder instance.
+                 Retrieve killed messages, too.
+rescan           Redisplay summary by rescanning present msgdb.
+rescan-noscore   Redisplay summary by rescanning present msgdb.
+                 Display messages killed by score, too.
+cache-status     Sync the all marks with the real status of cache.
+mark             Update marks.
+no-sync          Do nothing.
+first:NUM        Move to the filter folder(partial filter).
+last:NUM         Move to the filter folder(partial filter).
 @end group
 @end example
 
@@ -3318,7 +3329,7 @@ Toggle displaying of message window.
 
 @item V
 @kindex V (Summary)
-Move to the virtual folder with the condition specified.
+Move to the virtual folder (filter folder) with the condition specified.
 If called with prefix argument and current folder is virtual, exit it.
 @findex wl-summary-virtual
 (@code{wl-summary-virtual})
@@ -3341,16 +3352,9 @@ Put @samp{*} mark on the messages that satisfies the specified condition.
 Mark as read the message at the current cursor point.
 (@code{wl-summary-mark-as-read})
 
-@item i
-@kindex i (Summary)
-Prefetch the message at the current cursor point.
-With prefix argument, prefetch the message even if it is cached.
-@findex wl-summary-prefetch
-(@code{wl-summary-prefetch})
-
 @item x
 @kindex x (Summary)
-Execute @samp{D}, @samp{o} and @samp{O} marks.
+Execute action for all temporary marks in the summary buffer.
 @findex wl-summary-exec
 (@code{wl-summary-exec})
 
@@ -3387,10 +3391,30 @@ previously specified.
 
 @item d
 @kindex d (Summary)
+@findex wl-summary-dispose
+Put disposal mark on the message at the current cursor point.
+The result of disposal is controlled by @code{wl-dispose-folder-alist},
+refiled to @code{wl-trash-folder} by default.
+(@code{wl-summary-dispose})
+
+@item D
+@kindex D (Summary)
 @findex wl-summary-delete
-Put delete mark on the message at the current cursor point.
+Put force deletion mark on the message at the current cursor point.
 (@code{wl-summary-delete})
 
+@item i
+@kindex i (Summary)
+Put prefetch reservation mark on the message at the current cursor point.
+@findex wl-summary-prefetch
+(@code{wl-summary-prefetch})
+
+@item ~
+@kindex ~ (Summary)
+@findex wl-summary-resend
+Put resend reservation mark on the message at the current cursor point.
+(@code{wl-summary-resend})
+
 @item u
 @kindex u (Summary)
 @findex wl-summary-unmark
@@ -3413,7 +3437,7 @@ Mark as read messages in the specified region.
 @kindex r $ (Summary)
 @findex wl-summary-mark-as-important-region
 Mark as important @samp{$} messages in the specified region.
-If @samp{$} already exists, it is deleted.
+If @samp{$} mark already exists, remove the mark.
 (@code{wl-summary-mark-as-important-region})
 
 @item r !
@@ -3422,16 +3446,10 @@ If @samp{$} already exists, it is deleted.
 Mark as unread messages in the specified region.
 (@code{wl-summary-mark-as-unread-region})
 
-@item r i
-@kindex r i (Summary)
-@findex wl-summary-prefetch-region
-Prefetch messages in the specified region.
-(@code{wl-summary-prefetch-region})
-
 @item r x
 @kindex r x (Summary)
 @findex wl-summary-exec-region
-Execute @samp{D}, @samp{o} and @samp{O} marks on the messages in the
+Execute action for each temporary marks on the messages in the
 specified region.
 (@code{wl-summary-exec-region})
 
@@ -3455,9 +3473,15 @@ Put copy mark on the messages in the specified region.
 
 @item r d
 @kindex r d (Summary)
-@findex wl-summary-delete-region
-Put delete mark on the messages in the specified region.
-(@code{wl-summary-delete-region})
+@findex wl-summary-dispose-region
+Put disposal mark on the messages in the specified region.
+(@code{wl-summary-dispose-region})
+
+@item r i
+@kindex r i (Summary)
+@findex wl-summary-prefetch-region
+Put prefetch reservation mark on messages in the specified region.
+(@code{wl-summary-prefetch-region})
 
 @item r u
 @kindex r u (Summary)
@@ -3483,7 +3507,7 @@ With prefix argument, it affects on the all messages in the thread tree.
 @findex wl-thread-mark-as-important
 Put important mark @samp{$} on the messages which are the
 descendant of the current thread.
-If @samp{$} mark exists, it is deleted.
+If @samp{$} mark exists, remove the mark.
 With prefix argument, it affects on the all messages in the thread tree.
 (@code{wl-thread-mark-as-important})
 
@@ -3494,17 +3518,10 @@ Mark as unread messages which are the descendant of the current thread.
 With prefix argument, it affects on the all messages in the thread tree.
 (@code{wl-thread-mark-as-unread})
 
-@item t i
-@kindex t i (Summary)
-@findex wl-thread-prefetch
-Prefetch messages which are the descendant of the current thread.
-With prefix argument, it affects on the all messages in the thread tree.
-(@code{wl-thread-prefetch})
-
 @item t x
 @kindex t x (Summary)
 @findex wl-thread-exec
-Execute @samp{D}, @samp{o} and @samp{O} marks on the messages which are
+Execute action for temporary marks on the messages which are
 the descendant of the current thread.  With prefix argument, it affects
 on the all messages in the thread tree.
 (@code{wl-thread-exec})
@@ -3533,10 +3550,17 @@ With prefix argument, it affects on the all messages in the thread tree.
 
 @item t d
 @kindex t d (Summary)
-@findex wl-thread-delete
-Put delete mar on the messages which are the descendant of the current thread.
+@findex wl-thread-dispose
+Put disposal mark on the messages which are the descendant of the current thread.
 With prefix argument, it affects on the all messages in the thread tree.
-(@code{wl-thread-delete})
+(@code{wl-thread-dispose})
+
+@item t i
+@kindex t i (Summary)
+@findex wl-thread-prefetch
+Put prefetch reservation mark on messages which are the descendant of
+the current thread.
+(@code{wl-thread-prefetch})
 
 @item t u
 @kindex t u (Summary)
@@ -3553,13 +3577,6 @@ Save messages which are the descendant of the current thread.
 With prefix argument, it affects on the all messages in the thread tree.
 (@code{wl-thread-save})
 
-@item m i
-@kindex m i (Summary)
-@findex wl-summary-target-mark-prefetch
-Prefetch all messages which have target mark @samp{*}.
-With prefix argument, prefetch all targets even if some of them are cached.
-(@code{wl-summary-target-mark-prefetch})
-
 @item m R
 @kindex m R (Summary)
 @findex wl-summary-target-mark-mark-as-read
@@ -3570,7 +3587,7 @@ Mark as read all messages which have target mark @samp{*}.
 @kindex m $ (Summary)
 @findex wl-summary-target-mark-mark-as-important
 Mark as important all messages which have target mark @samp{*}.
-If already marked as @samp{$}, it is deleted.
+If already marked as @samp{$}, remove the mark.
 (@code{wl-summary-target-mark-mark-as-important})
 
 @item m !
@@ -3593,9 +3610,15 @@ Put copy mark on the messages which have target mark @samp{*}.
 
 @item m d
 @kindex m d (Summary)
-@findex wl-summary-target-mark-delete
-Put delete mark on the messages which have target mark @samp{*}.
-(@code{wl-summary-target-mark-delete})
+@findex wl-summary-target-mark-dispose
+Put disposal mark on the messages which have target mark @samp{*}.
+(@code{wl-summary-target-mark-dispose})
+
+@item m i
+@kindex m i (Summary)
+@findex wl-summary-target-mark-prefetch
+Put prefetch reservation mark on messages which have target mark @samp{*}.
+(@code{wl-summary-target-mark-prefetch})
 
 @item m y
 @kindex m y (Summary)
@@ -3666,12 +3689,6 @@ Pipe content of each message with target mark @samp{*} to some specified
 external process.
 (@code{wl-summary-target-mark-pipe})
 
-@item D
-@kindex D (Summary)
-@findex wl-summary-erase
-Actually erase the message at once, without moving it to trash.
-(@code{wl-summary-erase})
-
 @item M-t
 @kindex M-t (Summary)
 @findex wl-toggle-plugged
@@ -7455,6 +7472,13 @@ If non-nil, you are asked for confirmation when Wanderlust terminates.
 The initial setting is @code{t}.
 If non-nil, you are asked for confirmation when mail is sent.
 
+@item wl-default-sync-range
+@vindex wl-default-sync-range
+The initial setting is @samp{update}.
+Default update range of the summary. You can specify
+@samp{all}, @samp{update}, @samp{rescan} or @samp{no-sync}.
+See description of @code{wl-summary-sync} for the meaning of ranges.
+
 @item wl-folder-sync-range-alist
 @vindex wl-folder-sync-range-alist
 The initial setting is the alist shown below:
@@ -7469,9 +7493,10 @@ The initial setting is the alist shown below:
 @noindent
 This is an associative list of regular expressions of folder names and
 update range of the summary.  Update range is one of the @samp{all},
-@samp{update}, @samp{rescan}, @samp{rescan-noscore}, @samp{first},
-@samp{last} and @samp{no-sync}. If a folder do not match, @samp{update}
-is used.
+@samp{update}, @samp{rescan} or @samp{no-sync}. If the folder do not
+match any of them, the value of @code{wl-default-sync-range} is used
+(@samp{update} by default).
+See description of @code{wl-summary-sync} for the meaning of ranges.
 
 @item wl-ask-range
 @vindex wl-ask-range
index 49ece13..dc3523e 100644 (file)
@@ -1,3 +1,210 @@
+2003-08-28  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * elmo-msgdb.el (elmo-msgdb-message-entity-field): Decode value
+       when field is from or subject.
+
+2003-08-23  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-multi.el (elmo-message-entity-parent): Define.
+       (elmo-folder-search): Rewrite.
+
+2003-08-22  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * elmo-multi.el (elmo-message-cached-p): Define.
+
+       * elmo.el (elmo-message-cached-p): New method.
+       (elmo-message-accessible-p): Use it instead of msgdb API directly.
+       (elmo-message-flags): New method.
+       (elmo-message-flagged-p): New function.
+
+       * elmo-version.el (elmo-version): Up to 2.11.9.
+
+2003-08-20  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * elmo-version.el (elmo-version): Up to 2.11.8.
+
+       * elmo.el (elmo-folder-move-messages): Removed unused arguments.
+
+       * elmo-pipe.el (elmo-pipe-drain): Follow the change above.
+
+2003-08-14  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo.el (elmo-folder-detach-messages): Undo last change.
+
+2003-08-13  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo.el (elmo-folder-detach-messages): Don't load msgdb if empty.
+
+       * elmo-pipe.el (elmo-pipe-drain): Bind elmo-inhibit-number-mapping
+       only when src folder type is pop3.
+
+2003-08-12  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-msgdb.el (elmo-msgdb-make-index): Use
+       elmo-msgdb-overview-entity-get-number instead of
+       elmo-message-entity-number.
+
+2003-08-09  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * elmo-version.el (elmo-version): Up to 2.11.7.
+
+2003-08-07  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo.el (elmo-folder-append-msgdb): Rewrite and define as an inline
+       function.
+
+       * elmo-msgdb.el (elmo-msgdb-append): Use elmo-msgdb-make-index-return.
+       (elmo-msgdb-merge): New function.
+       (elmo-msgdb-make-index-return): Renamed from elmo-msgdb-make-index.
+       (elmo-msgdb-make-index): Rewrite.
+
+       * elmo-version.el (elmo-version): Up to 2.11.6.
+
+       * elmo-msgdb.el (elmo-msgdb-list-messages): If argument is a string,
+       use it as a the path for loading message entities.
+
+       * elmo-dop.el (elmo-folder-status-dop): Use elmo-msgdb-list-messages.
+
+2003-08-05  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-filter.el (elmo-folder-set-message-modified): Set 
+       message-modified slot of itself if it does not require target msgdb.
+
+       * elmo-mime.el (elmo-mime-message-display): Display message entirely
+       if folder length is zero.
+       (elmo-mime-display-as-is): Ditto.
+
+       * elmo-filter.el (elmo-folder-set-message-modified): Define.
+
+       * elmo-multi.el (elmo-folder-set-message-modified): Ditto.
+
+2003-08-03  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * elmo.el (elmo-folder-set-message-modified): New method.
+       (elmo-generic-folder-commit): Use it.
+       (elmo-folder-synchronize): Ditto.
+
+       * elmo-pipe.el (elmo-folder-set-message-modified): Define.
+       (elmo-folder-commit): Remove duplicate definition.
+
+2003-08-02  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo.el (elmo-folder-list-message-entities): Ignore killed-list.
+
+2003-08-02  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * elmo.el (elmo-msgdb-load): Use elmo-msgdb-list-messages.
+       (elmo-strict-folder-diff): Ditto.
+       (elmo-folder-set-info-max-by-numdb): Simplify.
+
+       * elmo-nntp.el (elmo-nntp-folder-msgdb-create): Use
+       elmo-msgdb-list-messages.
+
+       * elmo-msgdb.el (elmo-msgdb-seen-save): Abolish.
+       (elmo-msgdb-list-flagged): Fixed problem when `flag' is `read'.
+
+2003-08-02  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo.el (elmo-folder-list-messages): Treat killed-list only when
+       visible-only is non-nil.
+       (elmo-folder-confirm-appends): Changed message.
+       (elmo-folder-synchronize): Added argument disable-killed.
+
+       * elmo-multi.el (elmo-folder-synchronize): Added argument
+       disable-killed.
+
+       * elmo-pipe.el (elmo-folder-synchronize): Ditto.
+
+       * elmo-version.el (elmo-version): Up to 2.11.5.
+
+       * elmo-multi.el (elmo-folder-search): Use nil for 1st argument of
+       elmo-list-filter.
+
+       * elmo-util.el (elmo-list-filter): Simplify.
+
+       * elmo.el (elmo-generic-folder-commit): Use elmo-folder-list-messages.
+       (elmo-folder-set-info-max-by-numdb): Changed argument to number list.
+       (elmo-generic-folder-diff): Abolish argument.
+       (elmo-msgdb-load): Don't use number-alist.
+
+       * elmo-filter.el (elmo-folder-diff): Abolish argument.
+
+       * elmo-pipe.el (elmo-folder-diff): Ditto.
+
+       * elmo-nmz.el (elmo-folder-diff): Ditto.
+
+       * elmo-net.el (elmo-folder-diff): Ditto.
+
+       * elmo-maildir.el (elmo-folder-diff): Ditto.
+
+       * elmo-imap4.el (elmo-folder-diff-async): Ditto.
+
+       * elmo-multi.el (elmo-folder-diff): Ditto
+       (elmo-multi-folder-diff): Rewrite.
+
+2003-08-02  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * elmo-pipe.el (elmo-folder-msgdb): Define.
+
+2003-08-01  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo.el (elmo-message-set-cached): Define as a method.
+
+       * elmo-pipe.el (elmo-message-set-cached): Define.
+       (elmo-find-fetch-strategy): Ditto.
+
+       * elmo-multi.el (elmo-message-set-cached): Define.
+       (elmo-find-fetch-strategy): Rewrite.
+
+       * elmo-mime.el (elmo-mime-message-display): Use elmo-message-entity.
+
+       * elmo-pipe.el (elmo-message-folder): Fixed definition.
+
+2003-07-30  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-msgdb.el (elmo-msgdb-list-messages): Use number of overviews
+       instead of number-alist.
+
+       * elmo-localdir.el (elmo-folder-append-messages): Don't refer
+       mark nor message-id when msgdb of source folder is not loaded.
+
+       * elmo.el (elmo-generic-folder-append-messages): Ditto.
+
+       * elmo-maildir.el (elmo-folder-append-messages): Ditto.
+
+2003-07-29  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo.el (elmo-folder-length): Don't require msgdb.
+
+2003-07-28  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo.el (elmo-message-mark): Cause an error when empty folder.
+       (elmo-message-field): Ditto.
+
+       * elmo-maildir.el (luna-define-class): Added slot `answered-locations'.
+       (elmo-map-folder-list-message-locations): Setup `answered-locations'
+       slot.
+       (elmo-map-folder-list-answereds): Define.
+       (elmo-maildir-list-location): Treat 'R' info.
+       (elmo-folder-msgdb-create): Treat flag-table.
+       (elmo-folder-append-messages): Save flag-table.
+
+2002-05-05  David Smith <ultrasoul@ultrasoul.com>
+
+       * elmo-imap4.el (elmo-imap4-folder-diff-plugged): 
+       Use SELECT when elmo-imap4-use-select-to-update-status is t.
+
+2003-07-24  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * elmo.el (elmo-generic-folder-append-messages): Fixed last change.
+
+       * elmo-localdir.el (elmo-folder-append-messages): Set flag as
+       'read when mark is null.
+
+2003-07-24  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-version.el (elmo-version): Up to 2.11.4.
+
 2003-07-23  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * elmo-pipe.el (elmo-folder-unmark-answered): Define.
index fda2f92..bbacd0a 100644 (file)
@@ -286,13 +286,12 @@ FOLDER is the folder structure."
 
 ;;; Execute as subsutitute for plugged operation.
 (defun elmo-folder-status-dop (folder)
-  (let* ((number-alist (elmo-msgdb-number-load
-                       (elmo-folder-msgdb-path folder)))
-        (number-list (mapcar 'car number-alist))
-        (spool-folder (elmo-dop-spool-folder folder))
-        spool-length
-        (i 0)
-        max-num)
+  (let ((number-list (elmo-msgdb-list-messages
+                     (elmo-folder-msgdb-path folder)))
+       (spool-folder (elmo-dop-spool-folder folder))
+       spool-length
+       (i 0)
+       max-num)
     (setq spool-length (or (car (if (elmo-folder-exists-p spool-folder)
                                    (elmo-folder-status spool-folder))) 0))
     (setq max-num
index 296efb9..2ce03c0 100644 (file)
       (elmo-folder-set-msgdb-internal (elmo-filter-folder-target-internal
                                       folder) nil)))
 
+(luna-define-method elmo-folder-set-message-modified ((folder
+                                                      elmo-filter-folder)
+                                                     modified)
+  (if (elmo-filter-folder-require-msgdb-internal folder)
+      (elmo-folder-set-message-modified-internal
+       (elmo-filter-folder-target-internal folder) modified)
+    (elmo-folder-set-message-modified-internal folder modified)))
+
 (luna-define-method elmo-folder-commit :around ((folder elmo-filter-folder))
   ;; Save target msgdb if it is used.
   (if (elmo-filter-folder-require-msgdb-internal folder)
      (lambda (x) (concat prefix x))
      (elmo-folder-list-subfolders target one-level))))
 
-(luna-define-method elmo-folder-diff :around ((folder elmo-filter-folder)
-                                             &optional numbers)
+(luna-define-method elmo-folder-diff :around ((folder elmo-filter-folder))
   (let ((condition (elmo-filter-folder-condition-internal folder))
        diff)
     (if (vectorp condition)
index 3ab05a3..0a8c707 100644 (file)
@@ -2370,6 +2370,10 @@ If optional argument REMOVE is non-nil, remove FLAG."
     (with-current-buffer (elmo-network-session-buffer session)
       (setq elmo-imap4-status-callback nil)
       (setq elmo-imap4-status-callback-data nil))
+    (if elmo-imap4-use-select-to-update-status
+       (elmo-imap4-session-select-mailbox
+        session
+        (elmo-imap4-folder-mailbox-internal folder)))
     (setq response
          (elmo-imap4-send-command-wait session
                                        (list
@@ -2397,8 +2401,7 @@ If optional argument REMOVE is non-nil, remove FLAG."
 (luna-define-method elmo-folder-diff-plugged ((folder elmo-imap4-folder))
   (elmo-imap4-folder-diff-plugged folder))
 
-(luna-define-method elmo-folder-diff-async ((folder elmo-imap4-folder)
-                                           &optional number-alist)
+(luna-define-method elmo-folder-diff-async ((folder elmo-imap4-folder))
   (setq elmo-imap4-server-diff-async-callback
        elmo-folder-diff-async-callback)
   (setq elmo-imap4-server-diff-async-callback-data
index 4ed3d22..7deaf26 100644 (file)
   ((folder elmo-localdir-folder)
    src-folder numbers &optional same-number)
   (if (elmo-folder-message-file-p src-folder)
-      (let ((dir (elmo-localdir-folder-directory-internal folder))
+      (let ((src-msgdb-exists (not (zerop (elmo-folder-length src-folder))))
+           (dir (elmo-localdir-folder-directory-internal folder))
            (table (elmo-flag-table-load (elmo-folder-msgdb-path folder)))
            (succeeds numbers)
            (next-num (1+ (car (elmo-folder-status folder))))
            mark flag id)
        (while numbers
-         (setq mark (elmo-message-mark src-folder (car numbers))
+         (setq mark (and src-msgdb-exists
+                         (elmo-message-mark src-folder (car numbers)))
                flag (cond
-                     ((null mark) nil)
+                     ((null mark) 'read)
                      ((member mark (elmo-msgdb-answered-marks))
                       'answered)
                      ;;
            (int-to-string
             (if same-number (car numbers) next-num))
            dir))
-         ;; src folder's msgdb is loaded.
-         (when (setq id (elmo-message-field src-folder (car numbers)
-                                            'message-id))
+         ;; save flag-table only when src folder's msgdb is loaded.
+         (when (setq id (and src-msgdb-exists
+                             (elmo-message-field src-folder (car numbers)
+                                                 'message-id)))
            (elmo-flag-table-set table id flag))
          (elmo-progress-notify 'elmo-folder-move-messages)
          (if (and (setq numbers (cdr numbers))
index 151a232..8f61227 100644 (file)
@@ -44,7 +44,9 @@
 (eval-and-compile
   (luna-define-class elmo-maildir-folder
                     (elmo-map-folder)
-                    (directory unread-locations flagged-locations))
+                    (directory unread-locations
+                               flagged-locations
+                               answered-locations))
   (luna-define-internal-accessors 'elmo-maildir-folder))
 
 (luna-define-method elmo-folder-initialize ((folder
@@ -89,38 +91,45 @@ LOCATION."
   (let* ((cur-dir (expand-file-name (or child-dir "cur") dir))
         (cur (directory-files cur-dir
                               nil "^[^.].*$" t))
-        unread-locations flagged-locations seen flagged sym
-        locations)
+        unread-locations flagged-locations answered-locations
+        seen flagged answered sym locations)
     (setq locations
          (mapcar
           (lambda (x)
             (if (string-match "^\\([^:]+\\):\\([^:]+\\)$" x)
                 (progn
-                  (setq seen nil)
+                  (setq seen nil answered nil flagged nil)
                   (save-match-data
                     (cond
-                     ((string-match "S" (elmo-match-string 2 x))
-                      (setq seen t))
                      ((string-match "F" (elmo-match-string 2 x))
-                      (setq flagged t))))
+                      (setq flagged t))
+                     ((string-match "R" (elmo-match-string 2 x))
+                      (setq answered t))
+                     ((string-match "S" (elmo-match-string 2 x))
+                      (setq seen t))))
                   (setq sym (elmo-match-string 1 x))
-                  (unless seen (setq unread-locations
-                                     (cons sym unread-locations)))
-                  (if flagged (setq flagged-locations
-                                    (cons sym flagged-locations)))
+                  (cond
+                   (flagged (setq flagged-locations
+                                  (cons sym flagged-locations)))
+                   (answered (setq answered-locations
+                                   (cons sym answered-locations)))
+                   (seen)
+                   (t
+                    (setq unread-locations (cons sym unread-locations))))
                   sym)
               x))
           cur))
-    (list locations unread-locations flagged-locations)))
+    (list locations unread-locations flagged-locations answered-locations)))
 
 (luna-define-method elmo-map-folder-list-message-locations
   ((folder elmo-maildir-folder))
   (elmo-maildir-update-current folder)
   (let ((locs (elmo-maildir-list-location
               (elmo-maildir-folder-directory-internal folder))))
-    ;; 0: locations, 1: unread-locations, 2: flagged-locations
+    ;; 0: locations, 1: unread-locs, 2: flagged-locs 3: answered-locs
     (elmo-maildir-folder-set-unread-locations-internal folder (nth 1 locs))
     (elmo-maildir-folder-set-flagged-locations-internal folder (nth 2 locs))
+    (elmo-maildir-folder-set-answered-locations-internal folder (nth 3 locs))
     (nth 0 locs)))
 
 (luna-define-method elmo-map-folder-list-unreads
@@ -131,40 +140,106 @@ LOCATION."
   ((folder elmo-maildir-folder))
   (elmo-maildir-folder-flagged-locations-internal folder))
 
+(luna-define-method elmo-map-folder-list-answereds
+  ((folder elmo-maildir-folder))
+  (elmo-maildir-folder-answered-locations-internal folder))
+
 (luna-define-method elmo-folder-msgdb-create 
   ((folder elmo-maildir-folder) numbers flag-table)
   (let* ((unread-list (elmo-maildir-folder-unread-locations-internal folder))
         (flagged-list (elmo-maildir-folder-flagged-locations-internal folder))
+        (answered-list (elmo-maildir-folder-answered-locations-internal
+                        folder))
         (len (length numbers))
         (i 0)
-        overview number-alist mark-alist entity
-        location pair mark)
+        overview number-alist mark-alist entity message-id flag
+        file location pair mark cache-status file-flag)
     (message "Creating msgdb...")
-    (dolist
-       (number numbers)
+    (dolist (number numbers)
       (setq location (elmo-map-message-location folder number))
       (setq entity
            (elmo-msgdb-create-overview-entity-from-file
             number
-            (elmo-maildir-message-file-name folder location)))
+            (setq file
+                  (elmo-maildir-message-file-name folder location))))
       (when entity
        (setq overview
-             (elmo-msgdb-append-element overview entity))
-       (setq number-alist
+             (elmo-msgdb-append-element overview entity)
+             number-alist
              (elmo-msgdb-number-add number-alist
-                                    (elmo-msgdb-overview-entity-get-number
-                                     entity)
-                                    (elmo-msgdb-overview-entity-get-id
-                                     entity)))
-       (cond 
-        ((member location unread-list)
-         (setq mark elmo-msgdb-new-mark)) ; unread!
+                                    (elmo-message-entity-number entity)
+                                    (setq message-id
+                                          (elmo-message-entity-field
+                                           entity 'message-id)))
+             ;; Precede flag-table to file-info.
+             flag (elmo-flag-table-get flag-table message-id)
+             file-flag nil
+             mark nil)
+       (setq cache-status
+             (elmo-file-cache-status (elmo-file-cache-get message-id)))
+       
+       ;; Already flagged on filename (precede it to flag-table).
+       (cond
         ((member location flagged-list)
-         (setq mark elmo-msgdb-important-mark)))
-       (if (setq mark (or (elmo-msgdb-global-mark-get
-                           (elmo-msgdb-overview-entity-get-id
-                            entity))
-                          mark))
+         (setq file-flag 'important
+               mark elmo-msgdb-important-mark))
+        ((member location answered-list)
+         (setq file-flag 'answered
+               mark (elmo-msgdb-mark 'answered cache-status)))
+        ((member location unread-list)
+         (setq file-flag 'unread
+               mark (elmo-msgdb-mark 'unread cache-status)))
+        (t (setq file-flag 'read)))
+
+       ;; Set mark according to flag-table if file status is unread or read.
+       (when (or (eq file-flag 'read)
+                 (eq file-flag 'unread))
+         ;; 
+         (unless (eq 'read flag)
+           (setq mark (elmo-msgdb-mark flag cache-status 'new)))
+         ;; Update filename's info portion according to the flag-table.
+         (cond
+          ((and (or (eq flag 'important)
+                    (setq mark (elmo-msgdb-global-mark-get
+                                (elmo-message-entity-field
+                                 entity 'message-id))))
+                (not (eq file-flag 'important)))
+           (elmo-maildir-set-mark file ?F)
+           ;; Delete from unread location list.
+           (elmo-maildir-folder-set-unread-locations-internal
+            folder
+            (delete location
+                    (elmo-maildir-folder-unread-locations-internal
+                     folder)))
+           ;; Append to flagged location list.
+           (elmo-maildir-folder-set-flagged-locations-internal
+            folder
+            (cons location
+                  (elmo-maildir-folder-flagged-locations-internal
+                   folder))))
+          ((and (eq flag 'answered)
+                (not (eq file-flag 'answered)))
+           (elmo-maildir-set-mark file ?R)
+           ;; Delete from unread locations.
+           (elmo-maildir-folder-set-unread-locations-internal
+            folder
+            (delete location
+                    (elmo-maildir-folder-unread-locations-internal folder)))
+           ;; Append to answered location list.
+           (elmo-maildir-folder-set-answered-locations-internal
+            folder
+            (cons location
+                  (elmo-maildir-folder-answered-locations-internal folder))))
+          ((and (eq flag 'read)
+                (not (eq file-flag 'read)))
+           (elmo-maildir-set-mark file ?S)
+           ;; Delete from unread locations.
+           (elmo-maildir-folder-set-unread-locations-internal
+            folder
+            (delete location
+                    (elmo-maildir-folder-unread-locations-internal
+                     folder))))))
+       (if mark
            (setq mark-alist
                  (elmo-msgdb-mark-append
                   mark-alist
@@ -408,11 +483,21 @@ file name for maildir directories."
   ((folder elmo-maildir-folder)
    src-folder numbers &optional same-number)
   (if (elmo-folder-message-file-p src-folder)
-      (let ((dir (elmo-maildir-folder-directory-internal folder))
+      (let ((src-msgdb-exists (not (zerop (elmo-folder-length src-folder))))
+           (dir (elmo-maildir-folder-directory-internal folder))
+           (table (elmo-flag-table-load (elmo-folder-msgdb-path folder)))
            (succeeds numbers)
-           filename)
+           filename mark flag id)
        (dolist (number numbers)
-         (setq filename (elmo-maildir-temporal-filename dir))
+         (setq mark (and src-msgdb-exists
+                         (elmo-message-mark src-folder (car numbers)))
+               flag (cond
+                     ((null mark) 'read)
+                     ((member mark (elmo-msgdb-answered-marks))
+                      'answered)
+                     ((not (member mark (elmo-msgdb-unread-marks)))
+                      'read))
+               filename (elmo-maildir-temporal-filename dir))
          (elmo-copy-file
           (elmo-message-file-name src-folder number)
           filename)
@@ -421,7 +506,14 @@ file name for maildir directories."
           (expand-file-name
            (concat "new/" (file-name-nondirectory filename))
            dir))
+         ;; src folder's msgdb is loaded.
+         (when (setq id (and src-msgdb-exists
+                             (elmo-message-field src-folder (car numbers)
+                                                 'message-id)))
+           (elmo-flag-table-set table id flag))
          (elmo-progress-notify 'elmo-folder-move-messages))
+       (when (elmo-folder-persistent-p folder)
+         (elmo-flag-table-save (elmo-folder-msgdb-path folder) table))
        succeeds)
     (luna-call-next-method)))
 
@@ -448,8 +540,7 @@ file name for maildir directories."
         (file-directory-p (expand-file-name "cur" basedir))
         (file-directory-p (expand-file-name "tmp" basedir)))))
 
-(luna-define-method elmo-folder-diff ((folder elmo-maildir-folder)
-                                     &optional numbers)
+(luna-define-method elmo-folder-diff ((folder elmo-maildir-folder))
   (let* ((dir (elmo-maildir-folder-directory-internal folder))
         (new-len (length (car (elmo-maildir-list-location dir "new"))))
         (cur-len (length (car (elmo-maildir-list-location dir "cur")))))
index 9efb463..0fa6fa0 100644 (file)
@@ -224,11 +224,11 @@ Return non-nil if not entire message was fetched."
   (let (mime-display-header-hook ; Do nothing.
        (elmo-message-displaying t)
        entity strategy)
-    (setq entity (elmo-msgdb-overview-get-entity number
-                                                (elmo-folder-msgdb
-                                                 folder)))
-    (setq strategy (elmo-find-fetch-strategy folder entity
-                                            ignore-cache))
+    (unless (zerop (elmo-folder-length folder))
+      (setq entity (elmo-message-entity folder number)))
+    (setq strategy (if entity (elmo-find-fetch-strategy folder entity
+                                                       ignore-cache)
+                    (elmo-make-fetch-strategy 'entire)))
     (mime-display-message
      (mime-open-entity
       (if (and strategy
@@ -258,21 +258,23 @@ Return non-nil if cache is used."
                                                (elmo-folder-msgdb folder)))
        mime-display-header-hook ; Do nothing.
        cache-file strategy use-cache)
-    (setq cache-file (elmo-file-cache-get
-                     (elmo-msgdb-overview-entity-get-id entity)))
-    (setq use-cache (and (elmo-message-use-cache-p folder number)
-                        (eq (elmo-file-cache-status cache-file) 'entire)))
+    (when entity
+      (setq cache-file (elmo-file-cache-get
+                       (elmo-msgdb-overview-entity-get-id entity)))
+      (setq use-cache (and (elmo-message-use-cache-p folder number)
+                          (eq (elmo-file-cache-status cache-file) 'entire))))
     (setq strategy (elmo-make-fetch-strategy
-                   'entire use-cache (elmo-message-use-cache-p folder number)
-                   (elmo-file-cache-path
-                    cache-file)))
+                   'entire use-cache
+                   (elmo-message-use-cache-p folder number)
+                   (elmo-file-cache-path cache-file)))
     (elmo-mime-display-as-is-internal
      (mime-open-entity
       'elmo-buffer
       (elmo-make-mime-message-location
        folder number strategy rawbuf unread))
      viewbuf nil keymap original-mode)
-    (elmo-fetch-strategy-use-cache strategy)))
+    (when strategy
+      (elmo-fetch-strategy-use-cache strategy))))
 
 ;; Replacement of mime-display-message.
 (defun elmo-mime-display-as-is-internal (message
index 49f1b45..782215d 100644 (file)
@@ -58,7 +58,6 @@
   :type '(string :tag "Mark")
   :group 'elmo)
 
-;; Not implemented yet.
 (defcustom elmo-msgdb-answered-cached-mark "&"
   "Mark for answered and cached message."
   :type '(string :tag "Mark")
@@ -69,7 +68,7 @@
   :type '(string :tag "Mark")
   :group 'elmo)
 
-(defcustom elmo-msgdb-important-mark"$"
+(defcustom elmo-msgdb-important-mark "$"
   "Mark for important message."
   :type '(string :tag "Mark")
   :group 'elmo)
 ;; LIST-OF-MARKS elmo-msgdb-unread-marks 
 ;; LIST-OF-MARKS elmo-msgdb-answered-marks 
 ;; LIST-OF-MARKS elmo-msgdb-uncached-marks 
-;; elmo-msgdb-seen-save DIR OBJ
 ;; elmo-msgdb-overview-save DIR OBJ
 
 ;; elmo-msgdb-message-entity MSGDB KEY
     (elmo-msgdb-make-index msgdb)
     msgdb))
 
-(defun elmo-msgdb-list-messages (msgdb)
-  "List message numbers in the MSGDB."
-  (mapcar 'car (elmo-msgdb-get-number-alist msgdb)))
+(defun elmo-msgdb-list-messages (msgdb-or-path)
+  "Return a list of message numbers in the msgdb.
+If MSGDB-OR-PATH is a msgdb structure, use it as a msgdb.
+If argument is a string, use it as a path to load message entities."
+  (mapcar 'elmo-msgdb-overview-entity-get-number
+         (if (stringp msgdb-or-path)
+             (elmo-msgdb-overview-load msgdb-or-path)
+           (elmo-msgdb-get-overview msgdb-or-path))))
 
 (defsubst elmo-msgdb-get-mark (msgdb number)
   "Get mark string from MSGDB which corresponds to the message with NUMBER."
@@ -395,12 +398,41 @@ FLAG is a symbol which is one of the following:
    (nconc (car msgdb) (car msgdb-append))
    (nconc (cadr msgdb) (cadr msgdb-append))
    (nconc (caddr msgdb) (caddr msgdb-append))
-   (elmo-msgdb-make-index
+   (elmo-msgdb-make-index-return
     msgdb
     (elmo-msgdb-get-overview msgdb-append)
     (elmo-msgdb-get-mark-alist msgdb-append))
    (nth 4 msgdb)))
 
+(defun elmo-msgdb-merge (folder msgdb-merge)
+  "Return a list of messages which have duplicated message-id."
+  (let (msgdb duplicates)
+    (setq msgdb (or (elmo-folder-msgdb-internal folder)
+                   (elmo-make-msgdb nil nil nil
+                                    (elmo-folder-msgdb-path folder))))
+    (elmo-msgdb-set-overview
+     msgdb
+     (nconc (elmo-msgdb-get-overview msgdb)
+           (elmo-msgdb-get-overview msgdb-merge)))
+    (elmo-msgdb-set-number-alist
+     msgdb
+     (nconc (elmo-msgdb-get-number-alist msgdb)
+           (elmo-msgdb-get-number-alist msgdb-merge)))
+    (elmo-msgdb-set-mark-alist
+     msgdb
+     (nconc (elmo-msgdb-get-mark-alist msgdb)
+           (elmo-msgdb-get-mark-alist msgdb-merge)))
+    (setq duplicates (elmo-msgdb-make-index
+                     msgdb
+                     (elmo-msgdb-get-overview msgdb-merge)
+                     (elmo-msgdb-get-mark-alist msgdb-merge)))
+    (elmo-msgdb-set-path
+     msgdb
+     (or (elmo-msgdb-get-path msgdb)
+        (elmo-msgdb-get-path msgdb-merge)))
+    (elmo-folder-set-msgdb-internal folder msgdb)
+    duplicates))
+
 (defsubst elmo-msgdb-clear (&optional msgdb)
   (if msgdb
       (list
@@ -702,11 +734,6 @@ header separator."
           elmo-msgdb-answered-cached-mark
         elmo-msgdb-answered-uncached-mark)))))
 
-(defsubst elmo-msgdb-seen-save (dir obj)
-  (elmo-object-save
-   (expand-file-name elmo-msgdb-seen-filename dir)
-   obj))
-
 (defsubst elmo-msgdb-overview-save (dir overview)
   (elmo-object-save
    (expand-file-name elmo-msgdb-overview-filename dir)
@@ -989,7 +1016,7 @@ Return CONDITION itself if no entity exists in msgdb."
                (references (aref (cdr entity) 1))
                (size (aref (cdr entity) 7))
                (t (cdr (assoc (symbol-name field) (aref (cdr entity) 8)))))))
-        (if decode
+        (if (and decode (memq field '(from subject)))
             (elmo-msgdb-get-decoded-cache field-value)
           field-value))))
 
@@ -1237,7 +1264,7 @@ Header region is supposed to be narrowed."
       (and (setq number (elmo-msgdb-overview-entity-get-number entity))
           (elmo-clear-hash-val (format "#%d" number) mhash)))))
 
-(defun elmo-msgdb-make-index (msgdb &optional overview mark-alist)
+(defun elmo-msgdb-make-index-return (msgdb &optional overview mark-alist)
   "Append OVERVIEW and MARK-ALIST to the index of MSGDB.
 If OVERVIEW and MARK-ALIST are nil, make index for current MSGDB.
 Return the updated INDEX."
@@ -1269,6 +1296,44 @@ Return the updated INDEX."
       (elmo-msgdb-set-index msgdb index)
       index)))
 
+(defun elmo-msgdb-make-index (msgdb &optional overview mark-alist)
+  "Append OVERVIEW and MARK-ALIST to the index of MSGDB.
+If OVERVIEW and MARK-ALIST are nil, make index for current MSGDB.
+Return a list of message numbers which have duplicated message-ids."
+  (when msgdb
+    (let* ((overview (or overview (elmo-msgdb-get-overview msgdb)))
+          (mark-alist (or mark-alist (elmo-msgdb-get-mark-alist msgdb)))
+          (index (elmo-msgdb-get-index msgdb))
+          (ehash (or (car index) ;; append
+                     (elmo-make-hash (length overview))))
+          (mhash (or (cdr index) ;; append
+                     (elmo-make-hash (length overview))))
+          duplicates)
+      (while overview
+       ;; key is message-id
+       (if (elmo-get-hash-val (caar overview) ehash) ; duplicated.
+           (setq duplicates (cons
+                             (elmo-msgdb-overview-entity-get-number
+                              (car overview))
+                             duplicates)))
+       (if (caar overview)
+           (elmo-set-hash-val (caar overview) (car overview) ehash))
+       ;; key is number
+       (elmo-set-hash-val
+        (format "#%d"
+                (elmo-msgdb-overview-entity-get-number (car overview)))
+        (car overview) ehash)
+       (setq overview (cdr overview)))
+      (while mark-alist
+       ;; key is number
+       (elmo-set-hash-val
+        (format "#%d" (car (car mark-alist)))
+        (car mark-alist) mhash)
+       (setq mark-alist (cdr mark-alist)))
+      (setq index (or index (cons ehash mhash)))
+      (elmo-msgdb-set-index msgdb index)
+      duplicates)))
+
 (defsubst elmo-folder-get-info (folder &optional hashtb)
   (elmo-get-hash-val folder
                     (or hashtb elmo-folder-info-hashtb)))
@@ -1327,10 +1392,10 @@ Return the updated INDEX."
                           (list elmo-msgdb-important-mark))))))
     (when mark-regexp
       (if (eq flag 'read)
-         (dolist (number (elmo-msgdb-get-number-alist msgdb))
-           (unless (string-match mark-regexp (elmo-msgdb-get-mark
-                                              msgdb number))
-             (setq matched (cons number matched))))
+         (dolist (number (elmo-msgdb-list-messages msgdb))
+           (let ((mark (elmo-msgdb-get-mark msgdb number)))
+             (unless (and mark (string-match mark-regexp mark))
+               (setq matched (cons number matched)))))
        (dolist (elem (elmo-msgdb-get-mark-alist msgdb))
          (if (string-match mark-regexp (cadr elem))
              (setq matched (cons (car elem) matched))))))
index 55a6caf..78c5d84 100644 (file)
@@ -43,7 +43,7 @@
 
 (defmacro elmo-multi-real-folder-number (folder number)
   "Returns a cons cell of real FOLDER and NUMBER."
-  (` (cons (nth (- 
+  (` (cons (nth (-
                 (/ (, number)
                    (elmo-multi-folder-divide-number-internal (, folder)))
                 1) (elmo-multi-folder-children-internal (, folder)))
     (elmo-folder-set-msgdb-internal fld nil)))
 
 (luna-define-method elmo-folder-synchronize ((folder elmo-multi-folder)
-                                            &optional ignore-msgdb
+                                            &optional
+                                            disable-killed
+                                            ignore-msgdb
                                             no-check)
   (dolist (fld (elmo-multi-folder-children-internal folder))
-    (elmo-folder-synchronize fld ignore-msgdb no-check))
+    (elmo-folder-synchronize fld disable-killed ignore-msgdb no-check))
   0)
 
 (luna-define-method elmo-folder-expand-msgdb-path ((folder
   (nth (- (/ number (elmo-multi-folder-divide-number-internal folder)) 1)
        (elmo-multi-folder-children-internal folder)))
 
+(luna-define-method elmo-message-cached-p ((folder elmo-multi-folder) number)
+  (let ((pair (elmo-multi-real-folder-number folder number)))
+    (elmo-message-cached-p (car pair) (cdr pair))))
+
+(luna-define-method elmo-message-set-cached ((folder elmo-multi-folder)
+                                            number cached)
+  (let ((pair (elmo-multi-real-folder-number folder number)))
+    (elmo-message-set-cached (car pair) (cdr pair) cached)))
+
+(luna-define-method elmo-find-fetch-strategy
+  ((folder elmo-multi-folder) entity &optional ignore-cache)
+  (let ((pair (elmo-multi-real-folder-number
+              folder
+              (elmo-message-entity-number entity))))
+    (elmo-find-fetch-strategy
+     (car pair)
+     (elmo-message-entity (car pair) (cdr pair)) ignore-cache)))
+
 (luna-define-method elmo-message-entity ((folder elmo-multi-folder) key)
   (cond
    ((numberp key)
        (setq children (cdr children)))
       match))))
 
+(luna-define-method elmo-message-entity-parent ((folder
+                                                elmo-multi-folder) entity)
+  (elmo-message-entity
+   folder
+   (elmo-message-entity-field entity 'references)))
+
 (luna-define-method elmo-message-field ((folder elmo-multi-folder)
                                        number field)
   (let ((pair (elmo-multi-real-folder-number folder number)))
   (dolist (child (elmo-multi-folder-children-internal folder))
     (elmo-folder-process-crosspost child)))
 
-(defsubst elmo-multi-find-fetch-strategy (folder entity ignore-cache)
-  (if entity
-      (let ((pair (elmo-multi-real-folder-number
-                  folder
-                  (elmo-msgdb-overview-entity-get-number entity)))
-           (new-entity (elmo-msgdb-copy-overview-entity entity)))
-       (setq new-entity
-             (elmo-msgdb-overview-entity-set-number new-entity (cdr pair)))
-       (elmo-find-fetch-strategy (car pair) new-entity ignore-cache))
-    (elmo-make-fetch-strategy 'entire)))
-
-(luna-define-method elmo-find-fetch-strategy
-  ((folder elmo-multi-folder)
-   entity &optional ignore-cache)
-  (elmo-multi-find-fetch-strategy folder entity ignore-cache))
-
 (luna-define-method elmo-message-fetch ((folder elmo-multi-folder)
                                        number strategy
                                        &optional section outbuf unseen)
       (setq cur-number (+ 1 cur-number)))
     t))
 
-(luna-define-method elmo-folder-diff ((folder elmo-multi-folder)
-                                     &optional numbers)
-  (elmo-multi-folder-diff folder numbers))
+(luna-define-method elmo-folder-diff ((folder elmo-multi-folder))
+  (elmo-multi-folder-diff folder))
 
-(defun elmo-multi-folder-diff (folder numbers)
+(defun elmo-multi-folder-diff (folder)
   (let ((flds (elmo-multi-folder-children-internal folder))
-       (num-list (and numbers (elmo-multi-split-numbers folder numbers)))
-       (unsync 0)
-       (messages 0)
-       diffs)
+       (news 0)
+       (unreads 0)
+       (alls 0)
+       no-unreads diff)
     (while flds
-      (setq diffs (nconc diffs (list (elmo-folder-diff (car flds)
-                                                      (car num-list)))))
+      (setq diff (elmo-folder-diff (car flds)))
+      (cond
+       ((consp (cdr diff)) ; (new unread all)
+       (setq news    (+ news (nth 0 diff))
+             unreads (+ unreads (nth 1 diff))
+             alls    (+ alls (nth 2 diff))))
+       (t
+       (setq no-unreads t)
+       (setq news    (+ news (car diff))
+             alls    (+ alls (cdr diff)))))
       (setq flds (cdr flds)))
-    (while diffs
-      (and (car (car diffs))
-          (setq unsync (+ unsync (car (car diffs)))))
-      (setq messages  (+ messages (cdr (car diffs))))
-      (setq diffs (cdr diffs)))
-    (elmo-folder-set-info-hashtb folder nil messages)
-    (cons unsync messages)))
+    (if no-unreads
+       (cons news alls)
+      (list news unreads alls))))
 
 (luna-define-method elmo-folder-list-unreads ((folder elmo-multi-folder))
   (let ((cur-number 0)
       t)))
 
 (luna-define-method elmo-folder-search ((folder elmo-multi-folder)
-                                       condition &optional numlist)
+                                       condition &optional numbers)
   (let* ((flds (elmo-multi-folder-children-internal folder))
         (cur-number 0)
-        numlist-list cur-numlist ; for filtered search.
-        ret-val)
-    (if numlist
-       (setq numlist-list
-             (elmo-multi-split-numbers folder numlist t)))
+        numlist
+        matches)
+    (setq numbers (or numbers
+                     (elmo-folder-list-messages folder)))
     (while flds
       (setq cur-number (+ cur-number 1))
-      (when numlist
-       (setq cur-numlist (car numlist-list))
-       (if (null cur-numlist)
-           ;; t means filter all.
-           (setq cur-numlist t)))
-      (setq ret-val (append
-                    ret-val
-                    (elmo-list-filter
-                     cur-numlist
-                     (mapcar
-                      (function
-                       (lambda (x)
-                         (+
-                          (* (elmo-multi-folder-divide-number-internal
-                              folder) cur-number) x)))
-                      (elmo-folder-search
-                       (car flds) condition)))))
-      (when numlist
-       (setq numlist-list (cdr numlist-list)))
+      (setq matches (append matches
+                           (mapcar
+                            (function
+                             (lambda (x)
+                               (+
+                                (* (elmo-multi-folder-divide-number-internal
+                                    folder)
+                                   cur-number)
+                                x)))
+                            (elmo-folder-search
+                             (car flds) condition))))
       (setq flds (cdr flds)))
-    ret-val))
+    (elmo-list-filter numbers matches)))
 
 (luna-define-method elmo-message-use-cache-p ((folder elmo-multi-folder)
                                              number)
              (elmo-folder-list-flagged child flag in-msgdb)))))
     numbers))
 
+(luna-define-method elmo-folder-set-message-modified ((folder
+                                                      elmo-multi-folder)
+                                                     modified)
+  (dolist (child (elmo-multi-folder-children-internal folder))
+    (elmo-folder-set-message-modified child modified)))
+
 (luna-define-method elmo-folder-commit ((folder elmo-multi-folder))
   (dolist (child (elmo-multi-folder-children-internal folder))
     (elmo-folder-commit child)))
index 06c661e..b8c8577 100644 (file)
@@ -385,9 +385,7 @@ Returned value is searched from `elmo-network-stream-type-alist'."
         (elmo-delete-if
          (lambda (number) (memq number deleting))
          ;; current number-list.
-         (mapcar
-          'car
-          (elmo-msgdb-get-number-alist (elmo-folder-msgdb folder))))
+         (elmo-msgdb-list-messages (elmo-folder-msgdb folder)))
         ;; append appending messages
         (mapcar (lambda (x) (* -1 x))
                 (elmo-dop-spool-folder-list-messages folder))))
@@ -598,8 +596,7 @@ Returned value is searched from `elmo-network-stream-type-alist'."
   (if (elmo-folder-plugged-p folder)
       (elmo-folder-send folder 'elmo-folder-check-plugged)))
 
-(luna-define-method elmo-folder-diff :around ((folder elmo-net-folder)
-                                             &optional numbers)
+(luna-define-method elmo-folder-diff :around ((folder elmo-net-folder))
   (if (and (elmo-folder-use-flag-p folder)
           (elmo-folder-plugged-p folder))
       (elmo-folder-send folder 'elmo-folder-diff-plugged)
index 59fe128..4469b7f 100644 (file)
@@ -167,8 +167,7 @@ If the value is a list, all elements are used as index paths for namazu."
   ((folder elmo-nmz-folder))
   t)
 
-(luna-define-method elmo-folder-diff ((folder elmo-nmz-folder)
-                                     &optional numbers)
+(luna-define-method elmo-folder-diff ((folder elmo-nmz-folder))
   (cons nil nil))
 
 (luna-define-method elmo-folder-message-make-temp-files ((folder
index f4fecd5..810da85 100644 (file)
@@ -871,9 +871,7 @@ Don't cache if nil.")
       (elmo-folder-killed-list-internal folder)
       (car (elmo-list-diff
            numbers
-           (mapcar 'car
-                   (elmo-msgdb-get-number-alist
-                    ret-val))))))
+           (elmo-msgdb-list-messages ret-val)))))
     ;; If there are canceled messages, overviews are not obtained
     ;; to max-number(inn 2.3?).
     (when (and (elmo-nntp-max-number-precedes-list-active-p)
index 8c3aa2e..8b645c8 100644 (file)
 
 (defun elmo-pipe-drain (src dst &optional copy ignore-list)
   "Move or copy all messages of SRC to DST."
-  (let ((elmo-inhibit-number-mapping (not copy)) ; No need to use UIDL
+  (let ((elmo-inhibit-number-mapping (and (eq (elmo-folder-type-internal
+                                              src) 'pop3)
+                                         (not copy))) ; No need to use UIDL
        msgs len)
     (message "Checking %s..." (elmo-folder-name-internal src))
     ;; Warnnig: some function requires msgdb
-    ;;  but elmo-folder-open-internal do not load msgdb.
+    ;; but elmo-folder-open-internal do not load msgdb.
     (elmo-folder-open-internal src)
     (setq msgs (elmo-pipe-folder-list-target-messages src ignore-list)
          len (length msgs))
                             "Copying messages..."
                           "Moving messages...")))
     (unwind-protect
-       (elmo-folder-move-messages src msgs dst
-                                  nil nil copy)
+       (elmo-folder-move-messages src msgs dst copy)
       (elmo-progress-clear 'elmo-folder-move-messages))
     (when (and copy msgs)
       (setq ignore-list (elmo-number-set-append-list ignore-list
                      (expand-file-name "pipe" elmo-msgdb-directory)))
    copied-list))
 
+(luna-define-method elmo-folder-msgdb ((folder elmo-pipe-folder))
+  (elmo-folder-msgdb (elmo-pipe-folder-dst-internal folder)))
+
 (luna-define-method elmo-folder-open-internal ((folder elmo-pipe-folder))
   (elmo-folder-open-internal (elmo-pipe-folder-dst-internal folder)))
 
 (luna-define-method elmo-folder-close-internal ((folder elmo-pipe-folder))
   (elmo-folder-close-internal(elmo-pipe-folder-dst-internal folder)))
 
+(luna-define-method elmo-folder-set-message-modified
+  ((folder elmo-pipe-folder) modified)
+  (elmo-folder-set-message-modified-internal
+   (elmo-pipe-folder-dst-internal folder) modified))
+
 (luna-define-method elmo-folder-list-messages ((folder elmo-pipe-folder)
                                               &optional visible-only in-msgdb)
   ;; Use target folder's killed-list in the pipe folder.
 (luna-define-method elmo-folder-list-answereds ((folder elmo-pipe-folder))
   (elmo-folder-list-answereds (elmo-pipe-folder-dst-internal folder)))
 
-(luna-define-method elmo-folder-status ((folder elmo-pipe-folder))
+(luna-define-method elmo-folder-diff ((folder elmo-pipe-folder))
   (elmo-folder-open-internal (elmo-pipe-folder-src-internal folder))
   (elmo-folder-open-internal (elmo-pipe-folder-dst-internal folder))
   (let* ((elmo-inhibit-number-mapping
         (src-length (length (elmo-pipe-folder-list-target-messages
                              (elmo-pipe-folder-src-internal folder)
                              (elmo-pipe-folder-copied-list-load folder))))
-        (dst-list (elmo-folder-list-messages
-                   (elmo-pipe-folder-dst-internal folder))))
-    (prog1 (cons (+ src-length (elmo-max-of-list dst-list))
-                (+ src-length (length dst-list)))
+        (dst-diff (elmo-folder-diff (elmo-pipe-folder-dst-internal folder))))
+    (prog1
+       (cond
+        ((consp (cdr dst-diff)) ; new unread all
+         (mapcar (lambda (number) (+ number src-length)) dst-diff))
+        (t
+         (cons (+ (car dst-diff) src-length)
+               (+ (cdr dst-diff) src-length))))
       ;; No save.
       (elmo-folder-close-internal (elmo-pipe-folder-src-internal folder))
       (elmo-folder-close-internal (elmo-pipe-folder-dst-internal folder)))))
                      (elmo-pipe-folder-dst-internal new-folder))
     (elmo-msgdb-rename-path folder new-folder)))
 
-(luna-define-method elmo-folder-commit ((folder elmo-pipe-folder))
-  (elmo-folder-commit
-   (elmo-pipe-folder-dst-internal folder)))
-
 (luna-define-method elmo-folder-synchronize ((folder elmo-pipe-folder)
-                                            &optional ignore-msgdb
+                                            &optional
+                                            disable-killed
+                                            ignore-msgdb
                                             no-check)
   (let ((src-folder (elmo-pipe-folder-src-internal folder))
        (dst-folder (elmo-pipe-folder-dst-internal folder)))
                            (elmo-pipe-folder-copied-list-load folder)))
        (elmo-pipe-drain src-folder dst-folder))))
   (elmo-folder-synchronize
-   (elmo-pipe-folder-dst-internal folder) ignore-msgdb no-check))
+   (elmo-pipe-folder-dst-internal folder)
+   disable-killed ignore-msgdb no-check))
 
 (luna-define-method elmo-folder-list-flagged ((folder elmo-pipe-folder)
                                              flag
                      number
                      field))
 
+(luna-define-method elmo-message-set-cached ((folder elmo-pipe-folder)
+                                            number cached)
+  (elmo-message-set-cached (elmo-pipe-folder-dst-internal folder)
+                          number cached))
+
+(luna-define-method elmo-find-fetch-strategy
+  ((folder elmo-pipe-folder) entity &optional ignore-cache)
+  (elmo-find-fetch-strategy (elmo-pipe-folder-dst-internal folder)
+                           (elmo-message-entity
+                            (elmo-pipe-folder-dst-internal folder)
+                            (elmo-message-entity-number entity))
+                           ignore-cache))
+
 (luna-define-method elmo-message-entity ((folder elmo-pipe-folder) key)
   (elmo-message-entity (elmo-pipe-folder-dst-internal folder) key))
 
-(luna-define-method elmo-message-folder ((folder elmo-multi-folder)
+(luna-define-method elmo-message-folder ((folder elmo-pipe-folder)
                                         number)
   (elmo-pipe-folder-dst-internal folder))
                                             
index 201c670..8345095 100644 (file)
@@ -914,13 +914,13 @@ If IF-EXISTS is `any-exists', get BIFF session or normal session if exists."
              (error "Deleting message failed")))
        (error "Deleting message failed")))))
 
-(luna-define-method elmo-folder-delete-messages-plugged
-  ((folder elmo-pop3-folder) msgs)
+(luna-define-method elmo-folder-delete-messages-plugged ((folder
+                                                         elmo-pop3-folder)
+                                                        msgs)
   (let ((loc-alist (elmo-pop3-folder-location-alist-internal folder))
        (process (elmo-network-session-process-internal
                  (elmo-pop3-get-session folder))))
-    (mapcar '(lambda (msg) (elmo-pop3-delete-msg
-                           process msg loc-alist))
+    (mapcar '(lambda (msg) (elmo-pop3-delete-msg process msg loc-alist))
            msgs)))
 
 (luna-define-method elmo-message-use-cache-p ((folder elmo-pop3-folder) number)
index 413aaa9..d63c538 100644 (file)
@@ -755,14 +755,8 @@ the directory becomes empty after deletion."
          ))))
 
 (defun elmo-list-filter (l1 l2)
-  "L1 is filter."
-  (if (eq l1 t)
-      ;; t means filter all.
-      nil
-    (if l1
-       (elmo-delete-if (lambda (x) (not (memq x l1))) l2)
-      ;; filter is nil
-      l2)))
+  "Rerurn a list from L2 in which each element is a member of L1."
+  (elmo-delete-if (lambda (x) (not (memq x l1))) l2))
 
 (defsubst elmo-list-delete-if-smaller (list number)
   (let ((ret-val (copy-sequence list)))
index 391984c..8aab3fe 100644 (file)
@@ -40,7 +40,7 @@
 ;; product-define in the first place
 (product-provide 'elmo-version
   ;; Don't forget to check `wl-version.el' and Info.
-  (product-define "ELMO" nil '(2 11 3)))
+  (product-define "ELMO" nil '(2 11 9)))
 
 ;; set version-string
 (product-version-as-string 'elmo-version)
index 7392cdb..241cfdd 100644 (file)
@@ -156,6 +156,7 @@ If optional argument NON-PERSISTENT is non-nil, the folder msgdb is not saved."
   (or (elmo-folder-msgdb-internal folder)
       (elmo-folder-set-msgdb-internal folder
                                      (elmo-msgdb-load folder))))
+
 (luna-define-generic elmo-folder-open (folder &optional load-msgdb)
   "Open and setup (load saved status) FOLDER.
 If optional LOAD-MSGDB is non-nil, msgdb is loaded.
@@ -192,10 +193,8 @@ If optional KEEP-KILLED is non-nil, killed-list is not cleared.")
 (luna-define-generic elmo-folder-use-flag-p (folder)
   "Returns t if FOLDER treats unread/important flag itself.")
 
-(luna-define-generic elmo-folder-diff (folder &optional numbers)
+(luna-define-generic elmo-folder-diff (folder)
   "Get diff of FOLDER.
-If optional NUMBERS is set, it is used as current NUMBERS.
-Otherwise, saved status for folder is used for comparison.
 Return value is cons cell or list:
  - a cons cell (new . all)
  - a list (new unread all)")
@@ -206,6 +205,12 @@ Return value is cons cell or list:
 (luna-define-generic elmo-folder-reserve-status-p (folder)
   "If non-nil, the folder should not close folder after `elmo-folder-status'.")
 
+(luna-define-generic elmo-folder-set-message-modified (folder modified)
+  "Set FOLDER as modified.")
+(luna-define-method elmo-folder-set-message-modified ((folder elmo-folder)
+                                                     modified)
+  (elmo-folder-set-message-modified-internal folder modified))
+
 (luna-define-generic elmo-folder-list-messages (folder &optional visible-only
                                                       in-msgdb)
   "Return a list of message numbers contained in FOLDER.
@@ -216,12 +221,14 @@ If second optional IN-MSGDB is non-nil, only messages in the msgdb are listed.")
   (let ((list (if in-msgdb
                  t
                (elmo-folder-list-messages-internal folder visible-only))))
-    (elmo-living-messages
-     (if (listp list)
-        list
-       ;; Use current list.
-       (elmo-msgdb-list-messages (elmo-folder-msgdb folder)))
-     (elmo-folder-killed-list-internal folder))))
+    (setq list
+         (if (listp list)
+             list
+           ;; Use current list.
+           (elmo-msgdb-list-messages (elmo-folder-msgdb folder))))
+    (if visible-only
+       (elmo-living-messages list (elmo-folder-killed-list-internal folder))
+      list)))
 
 (luna-define-generic elmo-folder-list-unreads (folder)
   "Return a list of unread message numbers contained in FOLDER.")
@@ -620,12 +627,8 @@ FIELD is a symbol of the field name.")
 
 (luna-define-generic elmo-folder-process-crosspost (folder)
   "Process crosspost for FOLDER.
-If NUMBER-ALIST is set, it is used as number-alist.
 Return a cons cell of (NUMBER-CROSSPOSTS . NEW-MARK-ALIST).")
 
-(luna-define-generic elmo-folder-append-msgdb (folder append-msgdb)
-  "Append  APPEND-MSGDB to the current msgdb of the folder.")
-
 (luna-define-generic elmo-folder-newsgroups (folder)
   "Return list of newsgroup name of FOLDER.")
 
@@ -681,9 +684,8 @@ Return a cons cell of (NUMBER-CROSSPOSTS . NEW-MARK-ALIST).")
        (elmo-msgdb-get-number-alist (elmo-folder-msgdb folder)))
       (elmo-folder-set-info-max-by-numdb
        folder
-       (elmo-msgdb-get-number-alist
-       (elmo-folder-msgdb folder)))
-      (elmo-folder-set-message-modified-internal folder nil)
+       (elmo-folder-list-messages folder nil 'in-msgdb))
+      (elmo-folder-set-message-modified folder nil)
       (elmo-msgdb-killed-list-save
        (elmo-folder-msgdb-path folder)
        (elmo-folder-killed-list-internal folder)))
@@ -886,14 +888,13 @@ NUMBERS is a list of message numbers, messages are searched from the list."
                       (list new unread numbers max)
                       elmo-folder-info-hashtb)))
 
-(defun elmo-folder-set-info-max-by-numdb (folder msgdb-number)
+(defun elmo-folder-set-info-max-by-numdb (folder numbers)
   "Set FOLDER info by MSGDB-NUMBER in msgdb."
-  (let ((num-db (sort (mapcar 'car msgdb-number) '<)))
-    (elmo-folder-set-info-hashtb
-     folder
-     (or (nth (max 0 (1- (length num-db))) num-db) 0)
-     nil ;;(length num-db)
-     )))
+  (elmo-folder-set-info-hashtb
+   folder
+   (or (car (sort numbers '>)) 0)
+   nil ;;(length num-db)
+   ))
 
 (defun elmo-folder-get-info-max (folder)
   "Return max number of FODLER from folder info."
@@ -938,17 +939,13 @@ NUMBERS is a list of message numbers, messages are searched from the list."
 
 (defsubst elmo-strict-folder-diff (folder)
   "Return folder diff information strictly from FOLDER."
-  (let* ((dir (elmo-folder-msgdb-path folder))
-        (nalist (elmo-msgdb-get-number-alist (elmo-folder-msgdb folder)))
-        (in-db (sort (mapcar 'car nalist) '<))
-        (in-folder  (elmo-folder-list-messages folder))
-        append-list delete-list diff)
+  (let ((in-db (sort (elmo-msgdb-list-messages (elmo-folder-msgdb folder))
+                    '<))
+       (in-folder  (elmo-folder-list-messages folder))
+       append-list delete-list diff)
     (cons (if (equal in-folder in-db)
              0
-           (setq diff (elmo-list-diff
-                       in-folder in-db
-                       nil
-                       ))
+           (setq diff (elmo-list-diff in-folder in-db nil))
            (setq append-list (car diff))
            (setq delete-list (cadr diff))
            (if append-list
@@ -958,11 +955,10 @@ NUMBERS is a list of message numbers, messages are searched from the list."
                0)))
          (length in-folder))))
 
-(luna-define-method elmo-folder-diff ((folder elmo-folder)
-                                     &optional numbers)
-  (elmo-generic-folder-diff folder numbers))
+(luna-define-method elmo-folder-diff ((folder elmo-folder))
+  (elmo-generic-folder-diff folder))
 
-(defun elmo-generic-folder-diff (folder numbers)
+(defun elmo-generic-folder-diff (folder)
   (if (elmo-string-match-member (elmo-folder-name-internal folder)
                                elmo-strict-diff-folder-list)
       (elmo-strict-folder-diff folder)
@@ -971,19 +967,15 @@ NUMBERS is a list of message numbers, messages are searched from the list."
          (in-db t)
          unsync messages
          in-db-max)
-      (if numbers
-         (setq in-db-max (or (nth (max 0 (1- (length numbers))) numbers)
-                             0))
-       (if (not cached-in-db-max)
-           (let ((number-list (mapcar 'car
-                                      (elmo-msgdb-number-load
-                                       (elmo-folder-msgdb-path folder)))))
-             ;; No info-cache.
-             (setq in-db (sort number-list '<))
-             (setq in-db-max (or (nth (max 0 (1- (length in-db))) in-db)
-                                 0))
-             (elmo-folder-set-info-hashtb folder in-db-max nil))
-         (setq in-db-max cached-in-db-max)))
+      (if (not cached-in-db-max)
+         (let ((number-list (elmo-folder-list-messages folder
+                                                       nil 'in-msgdb)))
+           ;; No info-cache.
+           (setq in-db (sort number-list '<))
+           (setq in-db-max (or (nth (max 0 (1- (length in-db))) in-db)
+                               0))
+           (elmo-folder-set-info-hashtb folder in-db-max nil))
+       (setq in-db-max cached-in-db-max))
       (setq unsync (if (and in-db (car in-folder))
                       (- (car in-folder) in-db-max)
                     (if (and in-folder (null in-db))
@@ -1019,26 +1011,29 @@ NUMBERS is a list of message numbers, messages are searched from the list."
 
 (defun elmo-generic-folder-append-messages (folder src-folder numbers
                                                   same-number)
-  (let (unseen table flag mark
-              succeed-numbers failure cache)
+  (let ((src-msgdb-exists (not (zerop (elmo-folder-length src-folder))))
+       unseen table flag mark
+       succeed-numbers failure cache id)
     (setq table (elmo-flag-table-load (elmo-folder-msgdb-path folder)))
     (with-temp-buffer
       (set-buffer-multibyte nil)
       (while numbers
        (setq failure nil
-             mark (elmo-message-mark src-folder (car numbers))
-             flag (cond
-                   ((null mark) nil)
-                   ((member mark (elmo-msgdb-answered-marks))
-                    'answered)
-                   ;;
-                   ((not (member mark (elmo-msgdb-unread-marks)))
-                    'read)))
+             id (and src-msgdb-exists
+                     (elmo-message-field src-folder (car numbers)
+                                         'message-id))
+             mark (and src-msgdb-exists
+                       (elmo-message-mark src-folder (car numbers)))
+             flag (and id
+                       (cond
+                        ((null mark) 'read)
+                        ((member mark (elmo-msgdb-answered-marks))
+                         'answered)
+                        ;;
+                        ((not (member mark (elmo-msgdb-unread-marks)))
+                         'read))))
        (condition-case nil
-           (setq cache (elmo-file-cache-get
-                        (elmo-message-field src-folder
-                                            (car numbers)
-                                            'message-id))
+           (setq cache (elmo-file-cache-get id)
                  failure
                  (not
                   (and
@@ -1065,12 +1060,8 @@ NUMBERS is a list of message numbers, messages are searched from the list."
          (error (setq failure t)))
        ;; FETCH & APPEND finished
        (unless failure
-         (when flag
-           (elmo-flag-table-set table
-                                (elmo-message-field
-                                 src-folder (car numbers)
-                                 'message-id)
-                                flag))
+         (when id
+           (elmo-flag-table-set table id flag))
          (setq succeed-numbers (cons (car numbers) succeed-numbers)))
        (elmo-progress-notify 'elmo-folder-move-messages)
        (setq numbers (cdr numbers)))
@@ -1080,11 +1071,9 @@ NUMBERS is a list of message numbers, messages are searched from the list."
 
 ;; Arguments should be reduced.
 (defun elmo-folder-move-messages (src-folder msgs dst-folder
-                                            &optional msgdb
-                                            no-delete-info
+                                            &optional
                                             no-delete
-                                            same-number
-                                            save-unread)
+                                            same-number)
   (save-excursion
     (let* ((messages msgs)
           (elmo-inhibit-display-retrieval-progress t)
@@ -1131,18 +1120,27 @@ NUMBERS is a list of message numbers, messages are searched from the list."
        folder
        (elmo-folder-expand-msgdb-path folder))))
 
+(luna-define-generic elmo-message-cached-p (folder number)
+  "Return non-nil if the message is cached.")
+
+(luna-define-method elmo-message-cached-p ((folder elmo-folder) number)
+  (elmo-msgdb-get-cached (elmo-folder-msgdb folder) number))
+
 (defun elmo-message-accessible-p (folder number)
   "Get accessibility of the message.
 Return non-nil when message is accessible."
   (or (elmo-folder-plugged-p folder)
       (elmo-folder-local-p folder)
-      (elmo-msgdb-get-cached (elmo-folder-msgdb folder) number)))
+      (elmo-message-cached-p folder number)))
 
-(defun elmo-message-set-cached (folder number cached)
+(luna-define-generic elmo-message-set-cached (folder number cached)
   "Set cache status of the message in the msgdb.
 FOLDER is the ELMO folder structure.
 NUMBER is a number of the message.
-If CACHED is t, message is set as cached."
+If CACHED is t, message is set as cached.")
+
+(luna-define-method elmo-message-set-cached ((folder elmo-folder)
+                                            number cached)
   (when (elmo-msgdb-set-cached (elmo-folder-msgdb folder)
                               number
                               cached
@@ -1180,7 +1178,7 @@ ENTITY is the message-entity to get the parent.")
   ;; List all message entities in the FOLDER.
   (mapcar
    (lambda (number) (elmo-message-entity folder number))
-   (elmo-folder-list-messages folder t t)))
+   (elmo-folder-list-messages folder nil t))) ; XXX killed-list is not used.
 
 (defmacro elmo-folder-do-each-message-entity (spec &rest form)
   "Iterator for message entity in the folder.
@@ -1225,6 +1223,35 @@ Return a list of numbers (`new' `unread' `answered')")
        (incf answered))))
     (list new unreads answered)))
 
+(luna-define-generic elmo-message-flags (folder number)
+  "Return a list of flags.
+FOLDER is a ELMO folder structure.
+NUMBER is a number of the message.")
+
+(luna-define-method elmo-message-flags ((folder elmo-folder) number)
+  ;; This is a provisional implement.
+  (let ((mark (elmo-message-mark folder number)))
+    (append
+     (and (string= mark elmo-msgdb-new-mark)
+         '(new))
+     (and (string= mark elmo-msgdb-important-mark)
+         '(important))
+     (and (member mark (elmo-msgdb-unread-marks))
+         '(unread))
+     (and (member mark (elmo-msgdb-answered-marks))
+         '(answered)))))
+
+(defsubst elmo-message-flagged-p (folder number flag)
+  "Return non-nil if the message is set FLAG.
+FOLDER is a ELMO folder structure.
+NUMBER is a message number to test."
+  (let ((cur-flags (elmo-message-flags folder number)))
+    (case flag
+      (read
+       (not (memq 'unread cur-flags)))
+      (t
+       (memq flag cur-flags)))))
+
 (defun elmo-message-set-flag (folder number flag)
   "Set message flag.
 FOLDER is a ELMO folder structure.
@@ -1255,6 +1282,8 @@ FOLDER is the ELMO folder structure.
 NUMBER is a number of the message.")
 
 (luna-define-method elmo-message-mark ((folder elmo-folder) number)
+  (when (zerop (elmo-folder-length folder))
+    (error "Cannot treat this folder correctly."))
   (elmo-msgdb-get-mark (elmo-folder-msgdb folder) number))
 
 (luna-define-generic elmo-message-field (folder number field)
@@ -1264,6 +1293,8 @@ NUMBER is a number of the message.
 FIELD is a symbol of the field.")
 
 (luna-define-method elmo-message-field ((folder elmo-folder) number field)
+  (when (zerop (elmo-folder-length folder))
+    (error "Cannot treat this folder correctly."))
   (elmo-msgdb-get-field (elmo-folder-msgdb folder) number field))
 
 (luna-define-method elmo-message-use-cache-p ((folder elmo-folder) number)
@@ -1337,53 +1368,25 @@ FIELD is a symbol of the field.")
 ;;                                                            flag-table)
 ;;  "Append ENTITY to the folder.")
 
-(defun elmo-generic-folder-append-msgdb (folder append-msgdb)
+(defsubst elmo-folder-append-msgdb (folder append-msgdb)
   (if append-msgdb
-      (let* ((number-alist (elmo-msgdb-get-number-alist append-msgdb))
-            (all-alist (copy-sequence (append
-                                       (elmo-msgdb-get-number-alist
-                                        (elmo-folder-msgdb folder))
-                                       number-alist)))
-            (cur number-alist)
-            pair overview
-            to-be-deleted
-            mark-alist)
-       (elmo-folder-set-msgdb-internal folder
-                                       (elmo-msgdb-append
-                                        (elmo-folder-msgdb folder)
-                                        append-msgdb))
-       (while cur
-         (setq all-alist (delq (car cur) all-alist))
-         ;; same message id exists.
-         (if (setq pair (rassoc (cdr (car cur)) all-alist))
-             (setq to-be-deleted (nconc to-be-deleted (list (car pair)))))
-         (setq cur (cdr cur)))
+      (let ((duplicates (elmo-msgdb-merge folder append-msgdb)))
        (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)))
+              ;; Let duplicates be a temporary killed message.
+              (elmo-folder-kill-messages folder duplicates)
               ;; Should be mark as read.
-              (elmo-folder-mark-as-read folder to-be-deleted)
-              (elmo-msgdb-set-overview append-msgdb overview))
+              (elmo-folder-mark-as-read folder duplicates))
              ((eq (elmo-folder-process-duplicates-internal folder)
                   'read)
               ;; Mark as read duplicates.
-              (elmo-folder-mark-as-read folder to-be-deleted))
+              (elmo-folder-mark-as-read folder duplicates))
              (t
               ;; Do nothing.
-              (setq to-be-deleted nil)))
-       (length to-be-deleted))
+              (setq duplicates nil)))
+       (length duplicates))
     0))
 
-(luna-define-method elmo-folder-append-msgdb ((folder elmo-folder)
-                                             append-msgdb)
-  (elmo-generic-folder-append-msgdb folder append-msgdb))
-
 (defun elmo-folder-confirm-appends (appends)
   (let ((len (length appends))
        in)
@@ -1400,8 +1403,9 @@ FIELD is a symbol of the field.")
                    in (string-to-int in))
              (if (< len in)
                  (throw 'end len))
-             (if (y-or-n-p (format "%d messages are not appeared.  OK? "
-                                   (max (- len in) 0)))
+             (if (y-or-n-p (format
+                            "%d messages are killed (not appeared). OK? "
+                            (max (- len in) 0)))
                  (throw 'end in))))
          (nthcdr (max (- len in) 0) appends))
       (if (and elmo-folder-update-threshold
@@ -1482,40 +1486,45 @@ FIELD is a symbol of the field.")
   (elmo-folder-set-msgdb-internal folder (elmo-msgdb-clear)))
 
 (luna-define-generic elmo-folder-synchronize (folder
-                                             &optional ignore-msgdb
+                                             &optional
+                                             disable-killed
+                                             ignore-msgdb
                                              no-check)
   "Synchronize the folder data to the newest status.
 FOLDER is the ELMO folder structure.
 
+If optional DISABLE-KILLED is non-nil, killed messages are also synchronized.
 If optional IGNORE-MSGDB is non-nil, current msgdb is thrown away except
-flag status. If IGNORE-MSGDB is 'visible-only, only visible messages
-\(the messages which are not in the killed-list\) are thrown away and
-synchronized.
+flag status.
 If NO-CHECK is non-nil, rechecking folder is skipped.
 Return a list of a cross-posted message number.
 If update process is interrupted, return nil.")
 
 (luna-define-method elmo-folder-synchronize ((folder elmo-folder)
-                                            &optional ignore-msgdb no-check)
+                                            &optional
+                                            disable-killed
+                                            ignore-msgdb
+                                            no-check)
   (let ((killed-list (elmo-folder-killed-list-internal folder))
        (before-append t)
-       number-alist
        old-msgdb diff diff-2 delete-list new-list new-msgdb mark
-       flag-table crossed after-append numbers)
+       flag-table crossed after-append)
     (setq old-msgdb (elmo-folder-msgdb folder))
     (setq flag-table (elmo-flag-table-load (elmo-folder-msgdb-path folder)))
     (when ignore-msgdb
       (elmo-msgdb-flag-table (elmo-folder-msgdb folder) flag-table)
-      (elmo-folder-clear folder (eq ignore-msgdb 'visible-only)))
-    (setq numbers (sort (elmo-folder-list-messages folder nil t) '<))
+      (elmo-folder-clear folder (not disable-killed)))
     (unless no-check (elmo-folder-check folder))
     (condition-case nil
        (progn
          (message "Checking folder diff...")
          (setq diff (elmo-list-diff (elmo-folder-list-messages
                                      folder
-                                     (eq 'visible-only ignore-msgdb))
-                                    numbers))
+                                     (not disable-killed))
+                                    (elmo-folder-list-messages
+                                     folder
+                                     (not disable-killed)
+                                     'in-msgdb)))
          (message "Checking folder diff...done")
          (setq new-list (elmo-folder-confirm-appends (car diff)))
          ;; Set killed list as ((1 . MAX-OF-DISAPPEARED))
@@ -1552,7 +1561,7 @@ If update process is interrupted, return nil.")
              ;; process crosspost.
              ;; Return a cons cell of (NUMBER-CROSSPOSTS . NEW-MARK-ALIST).
              (elmo-folder-process-crosspost folder)
-             (elmo-folder-set-message-modified-internal folder t)
+             (elmo-folder-set-message-modified folder t)
              (elmo-folder-set-mark-modified-internal folder t))
            ;; return value.
            (or crossed 0)))
@@ -1573,15 +1582,17 @@ If update process is interrupted, return nil.")
   "Return number of messages in the FOLDER.")
 
 (luna-define-method elmo-folder-length ((folder elmo-folder))
-  (elmo-msgdb-length (elmo-folder-msgdb folder)))
+  (if (elmo-folder-msgdb-internal folder)
+      (elmo-msgdb-length (elmo-folder-msgdb folder))
+    0))
 
 (defun elmo-msgdb-load (folder &optional silent)
   (unless silent
     (message "Loading msgdb for %s..." (elmo-folder-name-internal folder)))
   (let ((msgdb (elmo-load-msgdb (elmo-folder-msgdb-path folder))))
-    (elmo-folder-set-info-max-by-numdb folder
-                                      (elmo-msgdb-get-number-alist msgdb))
-
+    (elmo-folder-set-info-max-by-numdb
+     folder
+     (elmo-msgdb-list-messages msgdb))
     (unless silent
       (message "Loading msgdb for %s...done"
               (elmo-folder-name-internal folder)))
@@ -1678,7 +1689,6 @@ Return a hashtable for newsgroups."
   (error "Cannot rename %s folder"
         (symbol-name (elmo-folder-type-internal folder))))
 
-
 ;;; Define folders.
 (elmo-define-folder ?% 'imap4)
 (elmo-define-folder ?-  'nntp)
index 1808c6a..d34dd22 100644 (file)
 2.8.0  Something
 2.8.1  Something
 
-2.9.x   Unchained Melody
-2.9.15  Undercover Of The Night
+2.9.x  Unchained Melody
 
 2.10.0 Venus
 2.10.1 Watching The Wheels
 
-2.11.x  Wonderwall
+2.11.x Wonderwall
 2.11.3  Wanted Dead Or Alive
index cedef09..b59ea0a 100644 (file)
 
 ;;; [[ Special Setting ]]
 
-;; bind "b" in Summary to resend-message (ala mutt's "b"ounce)
-;(add-hook 'wl-summary-mode-hook
-;        '(lambda ()
-;           (define-key wl-summary-mode-map "b" 'wl-summary-resend-message)
-;           ))
-
 ;; open unread group folder after checking.
 ;(add-hook 'wl-folder-check-entity-hook
 ;        '(lambda ()
index dd262c2..65b2372 100644 (file)
 
 ;;; [[ \e$BFC<l$J@_Dj\e(B ]]
 
-;; \e$B%5%^%j$G$N\e(B "b" \e$B$r%a%C%;!<%8:FAw$K$9$k\e(B (mutt \e$B$N\e(B "b"ounce)
-;(add-hook 'wl-summary-mode-hook
-;        '(lambda ()
-;           (define-key wl-summary-mode-map "b" 'wl-summary-resend-message)
-;           ))
-
 ;; \e$B%0%k!<%W$r\e(Bcheck\e$B$7$?8e$KL$FI$,$"$k%U%)%k%@$N%0%k!<%W$r<+F0E*$K3+$/\e(B
 ;(add-hook 'wl-folder-check-entity-hook
 ;        '(lambda ()
index 6a81000..5b1e026 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-31  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * check-modules.el (test-shimbun): Check `shimbun-server'.
+
 2003-02-10  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * check-modules.el (test-semi-mime-edit): Check
index 17898c0..9f4104d 100644 (file)
 (luna-define-method test-semi-mime-play ((case check-modules))
   (require 'mime-play)
   (lunit-assert (fboundp 'mime-store-message/partial-piece)))
+
+;; emacs-w3m >= 1.3.4
+(luna-define-method test-shimbun ((case check-modules))
+  (when (locate-library "shimbun")
+    (require 'shimbun)
+    (lunit-assert (fboundp 'shimbun-server))))
index 913d1b7..8b03a16 100644 (file)
@@ -1,3 +1,353 @@
+2003-08-28  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-refile.el (wl-refile-get-field-value): Call
+       `elmo-message-entity-field' with 3rd argument is non-nil.
+
+2003-08-26  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-vars.el (wl-draft-preview-attributes): New user option.
+       (wl-draft-preview-attributes-list): Ditto.
+       (wl-draft-preview-attributes-buffer-lines): Ditto.
+       (wl-draft-preview-attributes-buffer-name): Ditto.
+
+       * wl-mime.el (wl-draft-preview-message): Display attributes.
+
+2003-08-26  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-summary.el (wl-summary-detect-mark-position): Bind
+       wl-summary-flag-priority-list to '(new).
+
+2003-08-23  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-highlight.el (wl-highlight-summary-line-face-spec): New
+       funtion.
+       (wl-highlight-summary-line-string): Use it.
+       (wl-highlight-summary-current-line): Ditto.
+
+2003-08-23  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-summary.el (wl-summary-update-persistent-mark): Highlight the
+       line even when the mark string is not changed.
+
+       * wl-thread.el (wl-thread-update-line-on-buffer-sub): Follow the
+       argument change in the wl-summary-create-line.
+       (wl-thread-insert-entity-sub): Ditto.
+
+       * wl-summary.el (wl-summary-detect-mark-position): Follow the
+       argument change in the wl-summary-create-line.
+       (wl-summary-insert-sequential): Ditto.
+       (wl-summary-update-thread): Ditto.
+       (wl-summary-persistent-mark-string): New inline function.
+       (wl-summary-message-mark): Use it.
+       (wl-summary-create-line): Abolish argument wl-persistent-mark
+       and added wl-flags, wl-cached.
+
+       * wl-highlight.el (wl-highlight-summary-line-string): Changed argument
+       mark to flags.
+       (wl-highlight-summary-current-line): Decide the face not by the 
+       persistent mark but flags.
+
+2003-08-22  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-vars.el (wl-summary-new-mark, wl-summary-important-mark,
+       wl-summary-unread-uncached-mark, wl-summary-unread-cached-mark,
+       wl-summary-read-uncached-mark): Revive.
+       (wl-summary-answered-cached-mark,
+       wl-summary-answered-uncached-mark): New user option.
+       (wl-summary-score-marks): Follow the change above.
+       (wl-summary-auto-refile-skip-marks): Ditto.
+       (wl-summary-incorporate-marks): Ditto.
+       (wl-summary-expire-reserve-marks): Ditto.
+       (wl-summary-flag-priority-list): New user option.
+
+       * wl-summary.el (wl-summary-sync-marks): Follow the variable name
+       changes.
+       (wl-summary-auto-select-msg-p): Use elmo-message-flagged-p instead
+       of elmo-message-mark.
+       (wl-summary-mark-as-read-internal): Ditto.
+       (wl-summary-mark-as-answered): Ditto.
+       (wl-summary-mark-as-important): Ditto.
+       (wl-summary-redisplay-internal): Ditto.
+       (wl-summary-redisplay-no-mime-internal): Ditto.
+       (wl-summary-message-mark): New function.
+       (wl-summary-insert-sequential): Use wl-summary-message-mark
+       instead of elmo-message-mark.
+       (wl-summary-update-thread): Ditto.
+       (wl-summary-persistent-mark): Ditto.
+       (wl-summary-cursor-move-surface): Use elmo-message-accessible-p
+       instead of elmo-message-mark.
+
+       * wl-thread.el (wl-thread-update-line-on-buffer-sub): Use
+       wl-summary-message-mark instead of elmo-message-mark.
+       (wl-thread-insert-entity-sub): Ditto.
+       (wl-thread-get-children-msgs-uncached): Ditto.
+
+       * wl-highlight.el (wl-highlight-summary-line-string): Follow the
+       variable name changes.
+       (wl-highlight-summary-current-line): Ditto.
+
+       * wl-action.el (wl-summary-no-auto-refile-message-p): Use
+       wl-summary-message-mark instead of elmo-message-mark.
+
+       * wl-expire.el (wl-expire-message-p): Ditto.
+
+       * wl-score.el (wl-score-headers): Ditto.
+
+       * Version number is increased to 2.11.9.
+
+       * wl-summary.el (wl-summary-buffer-msgdb): Abolish.
+       (wl-summary-sync-update): Follow the change above.
+       (wl-summary-switch-to-clone-buffer): Ditto.
+       (wl-summary-open-folder): Ditto.
+
+2003-08-20  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-summary.el (wl-summary-cursor-move-surface): Don't skip
+       `elmo-msgdb-answered-cached-mark' when the folder is unplugged.
+
+       * Version number is increased to 2.11.8.
+
+       * wl-summary.el (wl-summary-buffer-msgdb): Abolish.
+
+       * wl-expire.el (wl-expire-refile): Follow the API change on
+       `elmo-folder-move-messages'.
+       (wl-expire-refile-with-copy-reserve-msg): Ditto.
+
+       * wl-action.el (wl-summary-move-mark-list-messages): Ditto.
+       (wl-summary-exec-action-refile): Ditto.
+       (wl-summary-exec-action-copy): Ditto.
+       (wl-summary-no-auto-refile-message-p): No use
+       `wl-summary-buffer-msgdb'.
+       (wl-summary-auto-refile): Ditto.
+
+2003-08-19  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * wl-summary.el (wl-summary-sync): Fix regexp for last: and first:.
+
+2003-08-19  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-summary.el (wl-summary-sync): Treat no-sync.
+
+       * wl-vars.el (wl-folder-sync-range-alist): Removed first: and last:.
+       (wl-default-sync-range): Ditto.
+
+2003-08-18  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-refile.el (wl-refile-subject-learn): Call
+       `elmo-message-entity-field' with 3rd argument is non-nil.
+       (wl-refile-guess-by-subject): Use `elmo-message-entity-field'
+       instead of `elmo-msgdb-overview-entity-get-subject'.
+
+2003-08-12  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-summary.el (wl-summary-goto-folder-subr): Rescan if
+       scan-type is rescan.
+       (wl-summary-delete-all-temp-marks): Remove scored mark too when
+       new optional argument force is non-nil.
+       (wl-summary-save-view-cache): Call it with force argument non-nil.
+
+       * wl-action.el (wl-summary-unset-mark): Added optional argument FORCE.
+
+2003-08-12  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-action.el (wl-summary-print-argument): Fixed last change.
+
+2003-08-11  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-summary.el (wl-summary-target-mark-mark-as-read): Fixed and
+       simplified.
+       (wl-summary-target-mark-mark-as-unread): Likewise.
+       (wl-summary-target-mark-mark-as-important): Likewise.
+
+2003-08-11  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * wl-thread.el (wl-thread-msg-mark-as-important): Abolished.
+       * wl-summary.el (wl-summary-mark-as-important): Arranged.
+       (wl-summary-mark-as-important-region): Change accordingly.
+       (wl-summary-target-mark-mark-as-important): Ditto.
+
+2003-08-09  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-vars.el (wl-summary-print-argument-within-window): New variable.
+
+       * wl-action.el (wl-summary-print-argument): Print argument to
+       right side of window if `wl-summary-print-argument-within-window'
+       is non-nil.
+
+2003-08-09  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-action.el (wl-summary-set-mark): Use
+       `wl-summary-message-visible-p' to check visibility of the message
+       and jump to message only when the message line is visible and have
+       different number; Call wl-summary-unset-mark with number argument.
+       (wl-summary-unset-mark): 
+       Use `wl-summary-message-visible-p'
+       to check visibility of the message and jump to message only when
+       the message line is visible and have different number;
+
+2003-08-09  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * Version number is increased to 2.11.7.
+
+       * wl.el (wl-check-variables-2): Don't check wl-summary-line-format
+       and wl-folder-summary-line-format.
+
+       * wl-summary.el (wl-summary-message-visible-p): New inline function.
+       (wl-summary-put-temp-mark): Rename from wl-summary-mark-line.
+       (wl-summary-set-score-mark): Use it.
+       (wl-summary-target-mark-mark-as-read): Ditto.
+       (wl-summary-target-mark-mark-as-unread): Ditto.
+       (wl-summary-target-mark-mark-as-important): Ditto.
+       (wl-summary-target-mark-msgs): Simplified.
+       (wl-summary-detect-mark-position): Fixed problem when
+       summary-line-format no contain persisten/temp mark spec.
+       (wl-summary-temp-mark): Ditto.
+       (wl-summary-persistent-mark): Ditto.
+       (wl-summary-update-persistent-mark): Ditto.
+
+       * wl-action.el (wl-summary-set-mark): Ditto.
+       (wl-summary-unset-mark): Ditto.
+       All other related portions are changed.
+
+2003-08-07  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * Version number is increased to 2.11.6.
+
+2003-08-05  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-util.el (wl-current-message-buffer): Define as function;
+       Don't use the value of wl-messge-buffer.
+
+       * wl-summary.el (wl-summary-redisplay-no-mime-internal): Update
+       persistent mark.
+
+       * wl-mime.el (wl-draft-yank-current-message-entity): If there's
+       no current message, cause an error.
+
+2003-08-03  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-summary.el (wl-summary-set-message-modified): Use
+       elmo-folder-set-message-modified instead of
+       elmo-folder-set-message-modified-internal.
+
+2003-08-03  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-summary.el (wl-summary-sync): Call wl-summary-sync-marks
+       interactively.
+       (wl-summary-sync): nokill->entirely.
+       (wl-summary-sync-marks): Fixed message.
+       (wl-summary-input-range): Added mark, nokill->entirely.
+
+       * wl-score.el (wl-summary-score-update-all-lines): Set expunged
+       messages as read.
+
+2003-08-02  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-summary.el (wl-summary-input-range): Abolish all-noscore and
+       update-noscore.
+       (wl-summary-sync): Follow the change above.
+
+2003-08-02  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-action.el (wl-summary-target-mark-all): Use
+       elmo-folder-list-messages.
+
+2003-08-02  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-summary.el (wl-summary-rescan): Added argument disable-kill
+       (wl-summary-rescan): Set wl-summary-scored as nil.
+       (wl-summary-sync-force-update): Follow the change above.
+       (wl-summary-sync): Ditto.
+       (wl-summary-sync-update): Added argument disable-killed.
+       (wl-summary-insert-headers): Set visible-only argument for
+       elmo-folder-list-messages.
+       (wl-summary-input-range): Added update-nokill, update-noscore,
+       all-nokill, all-noscore and mark.
+
+       * Version number is increased to 2.11.5.
+
+       * wl-draft.el (wl-draft): Set buffer-undo-list as nil.
+
+2003-08-01  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * wl-summary.el (wl-summary-prefetch-msg): Update persistent mark.
+       (wl-summary-prefetch-region-no-mark): Change accordingly.
+       * wl-action.el (wl-summary-exec-action-prefetch): Ditto.
+
+2003-07-31  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * wl-address.el (wl-complete-field-to): Abolished.
+       (wl-complete-address): Completion function for completing-read.
+       * wl-action.el (wl-summary-get-resend-address): Use it.
+
+       * wl-summary.el (wl-summary-update-persistent-mark): Renamed from
+       wl-summary-update-mark and abolish unused argument.
+       (wl-summary-prefetch-region-no-mark, wl-summary-mark-as-read-all)
+       (wl-summary-delete-cache, wl-summary-resume-cache-status)
+       (wl-summary-update-status-marks, wl-summary-mark-as-read-internal)
+       (wl-summary-mark-as-important, wl-summary-redisplay-internal)
+       (wl-summary-mark-as-answered-internal, wl-summary-reply): Use it.
+       * wl-draft.el (wl-draft-kill): Ditto.
+
+       * wl-summary.el: Remove unused binding of case-fold-search.
+       (wl-summary-replace-status-marks): Abolished.
+
+2003-07-29  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-action.el (wl-summary-set-mark): Cause an error when no message
+       is specified or folder length is zero.
+
+2003-07-29  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-expire.el (wl-folder-expire-current-entity): Specify folder type.
+       (wl-folder-archive-current-entity): Ditto.
+
+2003-07-28  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-summary.el (wl-summary-update-mark): Ignore errors while
+       retrieving message mark.
+       (wl-summary-redisplay-internal): Ditto.
+
+       * wl-message.el (wl-message-buffer-display): Ignore errors while
+       retrieving message-id field.
+
+       * wl-expire.el (wl-summary-expire): Fixed 2nd argument for `wl-append'.
+       (Reported by Shinichiro HIDA <shinichiro@stained-g.net>)
+       (wl-expire-refile-with-copy-reserve-msg): Follow the change in the
+       order of the arguments for `wl-expire-message-p'.
+       (Reported by Shinichiro HIDA <shinichiro@stained-g.net>)
+
+       * wl-summary.el (wl-summary-target-mark-reply-with-citation): 
+       Check return value of wl-summary-reply.
+       (wl-summary-reply): Recover window configuration when an error occured.
+
+2003-07-27  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * wl-summary.el (wl-summary-resend-message): Abolished, the
+       feature is inherited by wl-summary-resend (put resend mark).
+
+2003-07-27  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-summary.el (wl-summary-toggle-disp-msg): Set
+       wl-message-buffer to nil when the message is hide.
+
+2003-07-26  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * .cvsignore: New file.
+
+2003-07-26  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * wl-action.el (wl-summary-action-docstring): Add more info.
+       (wl-summary-target-mark, wl-summary-target-mark-region): Remove
+       duplicate definition.
+       (wl-summary-define-mark-action): Functions wl-summary-*-region
+       keep current position.
+       (wl-summary-unregister-target-mark): Store result to the variable.
+
+2003-07-24  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * Version number is increased to 2.11.4.
+
 2003-07-24  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-summary.el (wl-summary-cleanup-temp-marks): Use
index e954bf3..5a5ad78 100644 (file)
 
 (require 'wl-summary)
 
+(eval-when-compile
+  (defalias-maybe 'wl-summary-target-mark 'ignore)
+  (defalias-maybe 'wl-summary-target-mark-region 'ignore))
+
 (defsubst wl-summary-action-mark (action)
   (nth 0 action))
 (defsubst wl-summary-action-symbol (action)
@@ -44,7 +48,8 @@
 (defsubst wl-summary-action-face (action)
   (nth 5 action))
 (defsubst wl-summary-action-docstring (action)
-  (nth 6 action))
+  (concat (nth 6 action)
+         "\nThis function is defined by `wl-summary-define-mark-action'."))
 
 ;; Set mark
 (defun wl-summary-set-mark (&optional set-mark number interactive data)
@@ -59,16 +64,21 @@ Return number if put mark succeed"
         (current (wl-summary-message-number))
         (action (assoc set-mark wl-summary-mark-action-list))
         visible mark cur-mark)
+    (when (zerop (elmo-folder-length wl-summary-buffer-elmo-folder))
+      (error "Set mark failed"))
     (prog1
        (save-excursion
          ;; Put mark
-         (setq visible (or
-                        ;; not-interactive and visible
-                        (and number (wl-summary-jump-to-msg number))
-                        ;; interactive
-                        (and (null number) current))
-               number (or number current)
-               cur-mark (nth 1 (wl-summary-registered-temp-mark number)))
+         (if number
+             ;; Jump to message if cursor is not on the message.
+             (when (and (setq visible (wl-summary-message-visible-p number))
+                        (not (eq number current)))
+               (wl-summary-jump-to-msg number))
+           (setq visible t
+                 number current))
+         (setq cur-mark (nth 1 (wl-summary-registered-temp-mark number)))
+         (unless number
+           (error "No message"))
          (if (wl-summary-reserve-temp-mark-p cur-mark)
              (when interactive
                (error "Already marked as `%s'" cur-mark))
@@ -78,18 +88,19 @@ Return number if put mark succeed"
              (setq data (funcall (wl-summary-action-argument-function action)
                                  (wl-summary-action-symbol action)
                                  number)))
+           ;; Unset the current mark.
            (wl-summary-unset-mark number)
-           (when visible
-             (wl-summary-mark-line set-mark)
-             (when wl-summary-highlight
-               (wl-highlight-summary-current-line))
-             (when data
-               (wl-summary-print-argument number data)))
            ;; Set action.
            (funcall (wl-summary-action-set-function action)
                     number
                     (wl-summary-action-mark action)
                     data)
+           (when visible
+             (wl-summary-put-temp-mark set-mark)
+             (when wl-summary-highlight
+               (wl-highlight-summary-current-line))
+             (when data
+               (wl-summary-print-argument number data)))
            (set-buffer-modified-p nil)
            ;; Return value.
            number))
@@ -105,7 +116,8 @@ Return number if put mark succeed"
            (cons number wl-summary-buffer-target-mark-list))))
 
 (defun wl-summary-unregister-target-mark (number)
-  (delq number wl-summary-buffer-target-mark-list))
+  (setq wl-summary-buffer-target-mark-list
+       (delq number wl-summary-buffer-target-mark-list)))
 
 (defun wl-summary-have-target-mark-p (number)
   (memq number wl-summary-buffer-target-mark-list))
@@ -131,7 +143,7 @@ Return number if put mark succeed"
            (let (wl-summary-buffer-disp-msg)
              (when (setq number (wl-summary-message-number))
                (wl-summary-set-mark (wl-summary-action-mark action)
-                                    number nil data)
+                                    nil nil data)
                (setq wl-summary-buffer-target-mark-list
                      (delq number wl-summary-buffer-target-mark-list)))))
          (forward-line 1))
@@ -200,11 +212,12 @@ Return number if put mark succeed"
       mark-list)))
 
 ;; Unset mark
-(defun wl-summary-unset-mark (&optional number interactive)
+(defun wl-summary-unset-mark (&optional number interactive force)
   "Unset temporary mark of the message with NUMBER.
 NUMBER is the message number to unset the mark.
 If not specified, the message on the cursor position is treated.
 Optional INTERACTIVE is non-nil when it should be called interactively.
+If optional FORCE is non-nil, remove scored mark too.
 Return number if put mark succeed"
   (interactive)
   (save-excursion
@@ -212,25 +225,28 @@ Return number if put mark succeed"
     (let ((buffer-read-only nil)
          visible mark action)
       (if number
-         (setq visible (wl-summary-jump-to-msg number))
-       (setq visible t))
-      (setq number (or number (wl-summary-message-number)))
+         ;; Jump to message
+         (when (and (setq visible (wl-summary-message-visible-p number))
+                    (not (eq number (wl-summary-message-number))))
+           (wl-summary-jump-to-msg number))
+       (setq visible t
+             number (wl-summary-message-number)))
+      (setq mark (wl-summary-temp-mark))
+      ;; Remove from temporal mark structure.
+      (wl-summary-unregister-target-mark number)
+      (wl-summary-unregister-temp-mark number)
       ;; Delete mark on buffer.
       (when visible
-       (setq mark (wl-summary-temp-mark))
        (unless (string= mark " ")
-         (delete-backward-char 1)
-         (insert (or (wl-summary-get-score-mark number)
-                     " "))
+         (wl-summary-put-temp-mark
+          (or (unless force (wl-summary-get-score-mark number))
+              " "))
          (setq action (assoc mark wl-summary-mark-action-list))
          (when wl-summary-highlight
            (wl-highlight-summary-current-line))
          (when (wl-summary-action-argument-function action)
            (wl-summary-remove-argument)))
-       (set-buffer-modified-p nil))
-      ;; Remove from temporal mark structure.
-      (wl-summary-unregister-target-mark number)
-      (wl-summary-unregister-temp-mark number)))
+       (set-buffer-modified-p nil))))
   ;; Move the cursor.
   ;;  (if (or interactive (interactive-p))
   ;;      (if (eq wl-summary-move-direction-downward nil)
@@ -276,12 +292,7 @@ Return number if put mark succeed"
                          refiles
                          (if (eq folder-name 'null)
                              'null
-                           (wl-folder-get-elmo-folder folder-name))
-                         (wl-summary-buffer-msgdb)
-                         (not (null (cdr dst-msgs)))
-                         nil ; no-delete
-                         nil ; same-number
-                         t))
+                           (wl-folder-get-elmo-folder folder-name))))
          (error nil))
        (when result            ; succeeded.
          ;; update buffer.
@@ -354,16 +365,17 @@ Return number if put mark succeed"
          `(lambda (beg end)
             ,(wl-summary-action-docstring action)
             (interactive "r")
-            (goto-char beg)
-            (wl-summary-mark-region-subr
-             (quote ,(intern (format "wl-summary-%s"
-                                     (wl-summary-action-symbol action))))
-             beg end
-             (if (quote ,(wl-summary-action-argument-function action))
-                 (funcall (function 
-                           ,(wl-summary-action-argument-function action))
-                          (quote ,(wl-summary-action-symbol action))
-                          (wl-summary-message-number))))))
+            (save-excursion
+              (goto-char beg)
+              (wl-summary-mark-region-subr
+               (quote ,(intern (format "wl-summary-%s"
+                                       (wl-summary-action-symbol action))))
+               beg end
+               (if (quote ,(wl-summary-action-argument-function action))
+                   (funcall (function
+                             ,(wl-summary-action-argument-function action))
+                            (quote ,(wl-summary-action-symbol action))
+                            (wl-summary-message-number)))))))
     (fset (intern (format "wl-summary-target-mark-%s"
                          (wl-summary-action-symbol action)))
          `(lambda ()
@@ -459,13 +471,7 @@ Return number if put mark succeed"
            (setq result (elmo-folder-move-messages
                          wl-summary-buffer-elmo-folder
                          (cdr (car dst-msgs))
-                         (wl-folder-get-elmo-folder
-                          (car (car dst-msgs)))
-                         (wl-summary-buffer-msgdb)
-                         (not (null (cdr dst-msgs)))
-                         nil ; no-delete
-                         nil ; same-number
-                         t))
+                         (wl-folder-get-elmo-folder (car (car dst-msgs)))))
          (error nil))
        (if result              ; succeeded.
            (progn
@@ -503,15 +509,10 @@ Return number if put mark succeed"
        (setq result nil)
        (condition-case nil
            (setq result (elmo-folder-move-messages
-                           wl-summary-buffer-elmo-folder
-                           (cdr (car dst-msgs))
-                           (wl-folder-get-elmo-folder
-                            (car (car dst-msgs)))
-                           (wl-summary-buffer-msgdb)
-                           (not (null (cdr dst-msgs)))
-                           t ; t is no-delete (copy)
-                           nil ; same-number
-                           t))
+                         wl-summary-buffer-elmo-folder
+                         (cdr (car dst-msgs))
+                         (wl-folder-get-elmo-folder (car (car dst-msgs)))
+                         'no-delete))
          (error nil))
        (if result              ; succeeded.
            (progn
@@ -530,29 +531,18 @@ Return number if put mark succeed"
 ;; Prefetch.
 (defun wl-summary-exec-action-prefetch (mark-list)
   (save-excursion
-    (let* ((buffer-read-only nil)
-          (count 0)
+    (let* ((count 0)
           (length (length mark-list))
           (mark-list-copy (copy-sequence mark-list))
           (pos (point))
-          (failures 0)
-          new-mark)
+          (failures 0))
       (dolist (mark-info mark-list-copy)
        (message "Prefetching...(%d/%d)"
                 (setq count (+ 1 count)) length)
-       (setq new-mark (wl-summary-prefetch-msg (car mark-info)))
-       (if new-mark
+       (if (wl-summary-prefetch-msg (car mark-info))
            (progn
              (wl-summary-unset-mark (car mark-info))
-             (when (wl-summary-jump-to-msg (car mark-info))
-               (wl-summary-persistent-mark) ; move
-               (delete-backward-char 1)
-               (insert new-mark)
-               (when wl-summary-highlight
-                 (wl-highlight-summary-current-line))
-               (save-excursion
-                 (goto-char pos)
-                 (sit-for 0))))
+             (sit-for 0))
          (incf failures)))
       (message "Prefetching...done")
       0)))
@@ -560,7 +550,7 @@ Return number if put mark succeed"
 ;; Resend.
 (defun wl-summary-get-resend-address (action number)
   "Decide resend address."
-  (wl-complete-field-to "Resend message to: "))
+  (completing-read "Resend message to: " 'wl-complete-address))
 
 (defun wl-summary-exec-action-resend (mark-list)
   (let ((failure 0))
@@ -755,14 +745,28 @@ Return number if put mark succeed"
          (search-forward "\r")
          (forward-char -1)
          (setq re (point))
-         (setq c 0)
-         (while (< c len)
-           (forward-char -1)
-           (setq c (+ c (char-width (following-char)))))
-         (and (> c len) (setq folder (concat " " folder)))
-         (setq rs (point))
-         (when wl-summary-width
-           (put-text-property rs re 'invisible t))
+         (let ((width (cond (wl-summary-width
+                             (1- wl-summary-width))
+                            (wl-summary-print-argument-within-window
+                             (1- (window-width)))))
+               (c (current-column))
+               (padding 0))
+           (if (and width (> (+ c len) width))
+               (progn
+                 (move-to-column width)
+                 (setq c (current-column))
+                 (while (> (+ c len) width)
+                   (forward-char -1)
+                   (setq c (current-column)))
+                 (when (< (+ c len) width)
+                   (setq folder (concat " " folder)))
+                 (setq rs (point))
+                 (put-text-property rs re 'invisible t))
+             (when (and width
+                        (> (setq padding (- width len c)) 0))
+               (setq folder (concat (make-string padding ?\ )
+                                    folder)))
+             (setq rs (1- re))))
          (put-text-property rs re 'wl-summary-action-argument t)
          (goto-char re)
          (wl-highlight-action-argument-string folder)
@@ -777,14 +781,13 @@ Return number if put mark succeed"
   "Refile message to previously refiled destination."
   (interactive)
   (funcall (symbol-function 'wl-summary-refile)
-          wl-summary-buffer-prev-refile-destination
-          (wl-summary-message-number))
+          wl-summary-buffer-prev-refile-destination)
   (if (eq wl-summary-move-direction-downward nil)
       (wl-summary-prev)
     (wl-summary-next)))
 
-(defsubst wl-summary-no-auto-refile-message-p (msg)
-  (member (elmo-msgdb-get-mark (wl-summary-buffer-msgdb) msg)
+(defsubst wl-summary-no-auto-refile-message-p (number)
+  (member (wl-summary-message-mark wl-summary-buffer-elmo-folder number)
          wl-summary-auto-refile-skip-marks))
 
 (defun wl-summary-auto-refile (&optional open-all)
@@ -815,8 +818,8 @@ Return number if put mark succeed"
                     (setq dst
                           (wl-folder-get-realname
                            (wl-refile-guess-by-rule
-                            (elmo-msgdb-overview-get-entity
-                             number (wl-summary-buffer-msgdb)))))
+                            (elmo-message-entity wl-summary-buffer-elmo-folder
+                                                 number))))
                     (not (equal dst spec))
                     (let ((pair (assoc dst checked-dsts))
                           ret)
@@ -845,12 +848,6 @@ If optional argument NUMBER is specified, unmark message specified by NUMBER."
   (interactive)
   (wl-summary-unset-mark number (interactive-p)))
 
-(defun wl-summary-target-mark (&optional number)
-  "Put target mark '*' on current message.
-If optional argument NUMBER is specified, mark message specified by NUMBER."
-  (interactive)
-  (wl-summary-set-mark "*" number (interactive-p)))
-
 (defun wl-summary-unmark-region (beg end)
   (interactive "r")
   (save-excursion
@@ -887,26 +884,22 @@ If optional argument NUMBER is specified, mark message specified by NUMBER."
                     children)
                (if (wl-thread-entity-get-opened entity)
                    ;; opened...delete line.
-                   (funcall function number data)
+                   (funcall function nil data)
                  ;; closed
                  (setq children (wl-thread-get-children-msgs number))
                  (while children
                    (funcall function (pop children) data)))
                (forward-line 1))))
        (while (not (eobp))
-         (funcall function (wl-summary-message-number) data)
+         (funcall function nil data)
          (forward-line 1))))))
 
-(defun wl-summary-target-mark-region (beg end)
-  (interactive "r")
-  (wl-summary-mark-region-subr 'wl-summary-target-mark beg end nil))
-
 (defun wl-summary-target-mark-all ()
   (interactive)
   (wl-summary-target-mark-region (point-min) (point-max))
   (setq wl-summary-buffer-target-mark-list
-       (mapcar 'car
-               (elmo-msgdb-get-number-alist (wl-summary-buffer-msgdb)))))
+       (elmo-folder-list-messages wl-summary-buffer-elmo-folder
+                                  nil 'in-msgdb)))
 
 (defun wl-summary-delete-all-mark (mark)
   (goto-char (point-min))
index a7d0125..16082f9 100644 (file)
@@ -274,12 +274,18 @@ Matched address lists are append to CL."
       (setq entries (cdr entries)))
     (append result cl)))
 
-(defun wl-complete-field-to (prompt)
-  (interactive)
-  (let ((cl wl-address-completion-list))
-    (if cl
-       (completing-read (or prompt "To: ") cl)
-      (read-string (or prompt "To: ")))))
+(defun wl-complete-address (string predicate flag)
+  "Completion function for completing-read (comma separated addresses)."
+  (if (string-match "^\\(.*,\\)\\(.*\\)$" string)
+      (let* ((str1 (match-string 1 string))
+            (str2 (match-string 2 string))
+            (str2-comp (wl-complete-address str2 predicate flag)))
+       (if (and (not flag) (stringp str2-comp))
+           (concat str1 str2-comp)
+         str2-comp))
+    (if (not flag)
+       (try-completion string wl-address-list)
+      (all-completions string wl-address-list))))
 
 (defalias 'wl-address-quote-specials 'elmo-address-quote-specials)
 
index b75cccf..8c5a236 100644 (file)
@@ -772,8 +772,8 @@ Reply to author if WITH-ARG is non-nil."
                                folder-name)))
                (with-current-buffer buffer
                  (elmo-folder-unmark-answered folder (list number))
-                 (wl-summary-jump-to-msg number)
-                 (wl-summary-update-mark number))
+                 (when (wl-summary-jump-to-msg number)
+                   (wl-summary-update-persistent-mark)))
              (elmo-folder-open folder 'load-msgdb)
              (elmo-folder-unmark-answered folder (list number))
              (elmo-folder-close folder))))
@@ -1644,6 +1644,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed"
     (if (interactive-p)
        (run-hooks 'wl-mail-setup-hook))
     (goto-char (point-min))
+    (setq buffer-undo-list nil)
     (wl-user-agent-compose-internal) ;; user-agent
     (cond ((and
            (interactive-p)
index 588249e..79e7038 100644 (file)
 (defsubst wl-expire-message-p (folder number)
   "Return non-nil when a message in the FOLDER with NUMBER can be expired."
   (cond ((consp wl-summary-expire-reserve-marks)
-        (let ((mark (elmo-message-mark folder number)))
+        (let ((mark (wl-summary-message-mark folder number)))
           (not (or (member mark wl-summary-expire-reserve-marks)
                    (and wl-summary-buffer-disp-msg
                         (eq number wl-summary-buffer-current-msg))))))
        ((eq wl-summary-expire-reserve-marks 'all)
-        (not (or (elmo-message-mark folder number)
+        (not (or (wl-summary-message-mark folder number)
                  (and wl-summary-buffer-disp-msg
                       (eq number wl-summary-buffer-current-msg)))))
        ((eq wl-summary-expire-reserve-marks 'none)
          (if (elmo-folder-move-messages folder
                                         refile-list
                                         dst-folder
-                                        nil ; XXX
-                                        t
                                         copy
-                                        preserve-number
-                                        wl-expire-add-seen-list)
+                                        preserve-number)
              (progn
                (wl-expire-append-log
                 (elmo-folder-name-internal folder)
@@ -196,7 +193,7 @@ If REFILE-LIST includes reserve mark message, so copy."
        (error "%s: create folder failed" (elmo-folder-name-internal
                                           dst-folder)))
        (while (setq msg (wl-pop msglist))
-         (unless (wl-expire-message-p msg folder)
+         (unless (wl-expire-message-p folder msg)
            (setq msg-id (elmo-message-field folder msg 'message-id))
            (if (assoc msg-id wl-expired-alist)
                ;; reserve mark message already refiled or expired
@@ -213,11 +210,8 @@ If REFILE-LIST includes reserve mark message, so copy."
                    (elmo-folder-move-messages folder
                                               refile-list
                                               dst-folder
-                                              nil ;
-                                              t
                                               copy-reserve-message
-                                              preserve-number
-                                              wl-expire-add-seen-list))
+                                              preserve-number))
            (error "Expire: move msgs to %s failed"
                   (elmo-folder-name-internal dst-folder)))
          (wl-expire-append-log (elmo-folder-name-internal folder)
@@ -661,7 +655,7 @@ ex. +ml/wl/1999_11/, +ml/wl/1999_12/."
                       key-date
                       (elmo-message-entity-field entity 'date))
                  (wl-append delete-list
-                            (elmo-message-entity-number entity))))))
+                            (list (elmo-message-entity-number entity)))))))
           (t
            (error "%s: not supported" val-type)))
          (when delete-list
@@ -749,16 +743,17 @@ ex. +ml/wl/1999_11/, +ml/wl/1999_12/."
 
 (defun wl-folder-expire-current-entity ()
   (interactive)
-  (let ((entity-name
-        (or (wl-folder-get-folder-name-by-id
-             (get-text-property (point) 'wl-folder-entity-id))
-            (wl-folder-get-entity-from-buffer))))
+  (let ((entity-name (wl-folder-get-entity-from-buffer))
+       (type (if (wl-folder-buffer-group-p)
+                 'group
+               'folder)))
     (when (and entity-name
               (or (not (interactive-p))
                   (y-or-n-p (format "Expire %s? " entity-name))))
       (wl-folder-expire-entity
        (wl-folder-search-entity-by-name entity-name
-                                       wl-folder-entity))
+                                       wl-folder-entity
+                                       type))
       (if (get-buffer wl-summary-buffer-name)
          (kill-buffer wl-summary-buffer-name))
       (message "Expiring %s is done" entity-name))))
@@ -767,16 +762,17 @@ ex. +ml/wl/1999_11/, +ml/wl/1999_12/."
 
 (defun wl-folder-archive-current-entity ()
   (interactive)
-  (let ((entity-name
-        (or (wl-folder-get-folder-name-by-id
-             (get-text-property (point) 'wl-folder-entity-id))
-            (wl-folder-get-entity-from-buffer))))
+  (let ((entity-name (wl-folder-get-entity-from-buffer))
+       (type (if (wl-folder-buffer-group-p)
+                 'group
+               'folder)))
     (when (and entity-name
               (or (not (interactive-p))
                   (y-or-n-p (format "Archive %s? " entity-name))))
       (wl-folder-archive-entity
        (wl-folder-search-entity-by-name entity-name
-                                       wl-folder-entity))
+                                       wl-folder-entity
+                                       type))
       (message "Archiving %s is done" entity-name))))
 
 (defun wl-archive-number1 (folder archive-list &optional dst-folder-arg)
index ef60fbf..ff027e0 100644 (file)
              (put-text-property bol (match-end 0) 'face face)))
        (put-text-property bol eol 'face text-face)))))
 
-(defun wl-highlight-summary-line-string (line mark temp-mark indent)
-  (let (fsymbol action)
-    (cond ((and (string= temp-mark wl-summary-score-over-mark)
-               (member mark (list elmo-msgdb-unread-cached-mark
-                                  elmo-msgdb-unread-uncached-mark
-                                  elmo-msgdb-new-mark)))
-          (setq fsymbol 'wl-highlight-summary-high-unread-face))
-         ((and (string= temp-mark wl-summary-score-below-mark)
-               (member mark (list elmo-msgdb-unread-cached-mark
-                                  elmo-msgdb-unread-uncached-mark
-                                  elmo-msgdb-new-mark)))
-          (setq fsymbol 'wl-highlight-summary-low-unread-face))
-         ((setq action (assoc temp-mark wl-summary-mark-action-list))
-          (setq fsymbol (nth 5 action)))
-         ((string= mark elmo-msgdb-new-mark)
-          (setq fsymbol 'wl-highlight-summary-new-face))
-         ((member mark (list elmo-msgdb-unread-cached-mark
-                             elmo-msgdb-unread-uncached-mark))
-          (setq fsymbol 'wl-highlight-summary-unread-face))
-         ((member mark (list elmo-msgdb-answered-cached-mark
-                             elmo-msgdb-answered-uncached-mark))
-          (setq fsymbol 'wl-highlight-summary-answered-face))
-         ((or (string= mark elmo-msgdb-important-mark))
-          (setq fsymbol 'wl-highlight-summary-important-face))
-         ((string= temp-mark wl-summary-score-below-mark)
-          (setq fsymbol 'wl-highlight-summary-low-read-face))
-         ((string= temp-mark wl-summary-score-over-mark)
-          (setq fsymbol 'wl-highlight-summary-high-read-face))
-         (t (if (zerop (length indent))
-                (setq fsymbol 'wl-highlight-summary-thread-top-face)
-              (setq fsymbol 'wl-highlight-summary-normal-face))))
+(defsubst wl-highlight-summary-line-face-spec (flags temp-mark indent)
+  "Return a cons cell of (face . argument)."
+  (let (action)
+    (if (setq action (assoc temp-mark wl-summary-mark-action-list))
+       (cons (nth 5 action) (nth 2 action))
+      (cond
+       ((and (string= temp-mark wl-summary-score-over-mark)
+            (or (memq 'new flags) (memq 'unread flags)))
+       '(wl-highlight-summary-high-unread-face))
+       ((and (string= temp-mark wl-summary-score-below-mark)
+            (or (memq 'new flags) (memq 'unread flags)))
+       '(wl-highlight-summary-low-unread-face))
+       ((let ((priorities wl-summary-flag-priority-list)
+             result)
+         (while (and (null result) priorities)
+           (when (memq (car priorities) flags)
+             (setq result
+                   (case (car priorities)
+                     (new
+                      '(wl-highlight-summary-new-face))
+                     (important
+                      '(wl-highlight-summary-important-face))
+                     (answered
+                      '(wl-highlight-summary-answered-face))
+                     (unread
+                      '(wl-highlight-summary-unread-face)))))
+           (setq priorities (cdr priorities)))
+         result))
+       ((string= temp-mark wl-summary-score-below-mark)
+       '(wl-highlight-summary-low-read-face))
+       ((string= temp-mark wl-summary-score-over-mark)
+       '(wl-highlight-summary-high-read-face))
+       (t (if indent
+             '(wl-highlight-summary-normal-face)
+           '(wl-highlight-summary-thread-top-face)))))))
+
+(defun wl-highlight-summary-line-string (line flags temp-mark indent)
+  (let ((fsymbol (car (wl-highlight-summary-line-face-spec
+                      flags
+                      temp-mark
+                      (> (length indent) 0)))))
     (put-text-property 0 (length line) 'face fsymbol line))
   (if wl-use-highlight-mouse-line
       (put-text-property 0 (length line) 'mouse-face 'highlight line)))
   (interactive)
   (save-excursion
     (let ((inhibit-read-only t)
-         (case-fold-search nil) temp-mark status-mark
+         (case-fold-search nil)
          (deactivate-mark nil)
-         fsymbol action bol eol matched thread-top looked-at dest ds)
+         (number (wl-summary-message-number))
+         bol eol spec)
       (end-of-line)
       (setq eol (point))
       (beginning-of-line)
       (setq bol (point))
-      (setq status-mark (wl-summary-persistent-mark))
-      (setq temp-mark (wl-summary-temp-mark))
-      (when (setq action (assoc temp-mark wl-summary-mark-action-list))
-       (setq fsymbol (nth 5 action))
-       (setq dest (nth 2 action)))
-      (if (not fsymbol)
-         (cond
-          ((and (string= temp-mark wl-summary-score-over-mark)
-                (member status-mark (list elmo-msgdb-unread-cached-mark
-                                          elmo-msgdb-unread-uncached-mark
-                                          elmo-msgdb-new-mark)))
-           (setq fsymbol 'wl-highlight-summary-high-unread-face))
-          ((and (string= temp-mark wl-summary-score-below-mark)
-                (member status-mark (list elmo-msgdb-unread-cached-mark
-                                          elmo-msgdb-unread-uncached-mark
-                                          elmo-msgdb-new-mark)))
-           (setq fsymbol 'wl-highlight-summary-low-unread-face))
-          ((string= status-mark elmo-msgdb-new-mark)
-           (setq fsymbol 'wl-highlight-summary-new-face))
-          ((member status-mark (list elmo-msgdb-unread-cached-mark
-                                     elmo-msgdb-unread-uncached-mark))
-           (setq fsymbol 'wl-highlight-summary-unread-face))
-          ((member status-mark (list elmo-msgdb-answered-cached-mark
-                                     elmo-msgdb-answered-uncached-mark))
-           (setq fsymbol 'wl-highlight-summary-answered-face))
-          ((string= status-mark elmo-msgdb-important-mark)
-           (setq fsymbol 'wl-highlight-summary-important-face))
-          ;; score mark
-          ((string= temp-mark wl-summary-score-below-mark)
-           (setq fsymbol 'wl-highlight-summary-low-read-face))
-          ((string= temp-mark wl-summary-score-over-mark)
-           (setq fsymbol 'wl-highlight-summary-high-read-face))
-          ;;
-          (t (if (null
-                  (wl-thread-entity-get-parent-entity
-                   (wl-thread-get-entity (wl-summary-message-number))))
-                 (setq fsymbol 'wl-highlight-summary-thread-top-face)
-               (setq fsymbol 'wl-highlight-summary-normal-face)))))
-      (put-text-property bol eol 'face fsymbol)
-      (when dest
+      (setq spec (wl-highlight-summary-line-face-spec
+                 (elmo-message-flags wl-summary-buffer-elmo-folder
+                                     number)
+                 (wl-summary-temp-mark)
+                 (wl-thread-entity-get-parent-entity
+                  (wl-thread-get-entity number))))
+      (when (car spec)
+       (put-text-property bol eol 'face (car spec)))
+      (when (cdr spec)
        (put-text-property (next-single-property-change
                            (next-single-property-change
                             bol 'wl-summary-action-argument
                           eol
                           'face
                           'wl-highlight-action-argument-face))
-      (if wl-use-highlight-mouse-line
-         (put-text-property bol
-                            eol 'mouse-face 'highlight))
-      (if wl-use-dnd
-         (wl-dnd-set-drag-starter bol eol)))))
+      (when wl-use-highlight-mouse-line
+       (put-text-property bol eol 'mouse-face 'highlight))
+      (when wl-use-dnd
+       (wl-dnd-set-drag-starter bol eol)))))
 
 (defun wl-highlight-folder (start end)
   "Highlight folder between start and end.
index 4a243eb..ba7d3c6 100644 (file)
@@ -468,7 +468,8 @@ Returns non-nil if bottom of message."
 ;; Use message buffer cache.
 (defun wl-message-buffer-display (folder number flag
                                         &optional force-reload unread)
-  (let* ((msg-id (elmo-message-field folder number 'message-id))
+  (let* ((msg-id (ignore-errors (elmo-message-field folder number
+                                                   'message-id)))
         (fname (elmo-folder-name-internal folder))
         (hit (wl-message-buffer-cache-hit (list fname number msg-id)))
         (read nil)
index d6f467b..ef80d00 100644 (file)
@@ -59,8 +59,11 @@ has Non-nil value\)"
                     (function wl-draft-yank-to-draft-buffer))))
        (mime-preview-following-method-alist
         (list (cons 'wl-original-message-mode
-                    (function wl-draft-yank-to-draft-buffer)))))
-    (if (get-buffer (wl-current-message-buffer))
+                    (function wl-draft-yank-to-draft-buffer))))
+       (message-buffer (wl-current-message-buffer)))
+    (unless message-buffer
+      (error "No message."))
+    (if (get-buffer message-buffer)
        (save-excursion
          (set-buffer (wl-current-message-buffer))
          (save-restriction
@@ -143,7 +146,8 @@ It calls following-method selected from variable
 (defun wl-draft-preview-message ()
   "Preview editing message."
   (interactive)
-  (let* (recipients-message
+  (let* (wl-recipients
+        (orig-buffer (current-buffer))
         (current-point (point))
         (config-exec-flag wl-draft-config-exec-flag)
         (parent-folder wl-draft-parent-folder)
@@ -164,10 +168,9 @@ It calls following-method selected from variable
                     (wl-draft-parent-folder parent-folder))
                 (goto-char current-point)
                 (run-hooks 'wl-draft-send-hook)
-                (setq recipients-message
+                (setq wl-recipients
                       (condition-case err
-                          (concat "Recipients: "
-                                  (mapconcat
+                          (concat (mapconcat
                                    'identity
                                    (wl-draft-deduce-address-list
                                     (current-buffer)
@@ -191,7 +194,51 @@ It calls following-method selected from variable
       (when wl-highlight-body-too
        (wl-highlight-body))
       (run-hooks 'wl-draft-preview-message-hook))
-    (message "%s" recipients-message)))
+    (make-local-variable 'kill-buffer-hook)
+    (add-hook 'kill-buffer-hook
+             (lambda ()
+               (when (get-buffer-window
+                      wl-draft-preview-attributes-buffer-name)
+                 (select-window (get-buffer-window
+                                 wl-draft-preview-attributes-buffer-name))
+                 (delete-window))
+               (when (get-buffer wl-draft-preview-attributes-buffer-name)
+                 (kill-buffer (get-buffer
+                               wl-draft-preview-attributes-buffer-name)))))
+    (if (not wl-draft-preview-attributes)
+       (message (concat "Recipients: " wl-recipients))
+;      (ignore-errors ; in case when the window is too small
+       (let* ((cur-win (selected-window))
+              (size (min
+                     (- (window-height cur-win)
+                        window-min-height 1)
+                     (- (window-height cur-win)
+                        (max
+                         window-min-height
+                         (1+ wl-draft-preview-attributes-buffer-lines))))))
+         (split-window cur-win (if (> size 0) size window-min-height))
+         (select-window (next-window))
+         (let ((pop-up-windows nil))
+           (switch-to-buffer (get-buffer-create
+                              wl-draft-preview-attributes-buffer-name)))
+         (with-current-buffer
+             (get-buffer wl-draft-preview-attributes-buffer-name)
+           (setq buffer-read-only t)
+           (let (buffer-read-only)
+             (erase-buffer)
+             (dolist (attr wl-draft-preview-attributes-list)
+               (insert (capitalize (symbol-name attr)) ": "
+                       (or
+                        (with-current-buffer orig-buffer
+                          (format "%s"
+                                  (symbol-value
+                                   (intern
+                                    (concat "wl-" (symbol-name attr))))))
+                        "")
+                       "\n"))
+             (goto-char (point-min))
+             (wl-highlight-headers)))
+         (select-window cur-win)))));)
 
 (defalias 'wl-draft-caesar-region  'mule-caesar-region)
 
index 9d78fb6..feb8282 100644 (file)
 
 (defun wl-refile-subject-learn (entity dst)
   (let ((subject (funcall wl-summary-subject-filter-function
-                         (elmo-message-entity-field entity 'subject)))
+                         (elmo-message-entity-field entity 'subject 'decode)))
        hit)
     (setq dst (elmo-string dst))
     (if (and subject (not (string= subject "")))
@@ -198,7 +198,7 @@ If RULE does not match ENTITY, returns nil."
 
 (defun wl-refile-get-field-value (entity field)
   "Get FIELD value from ENTITY."
-  (elmo-message-entity-field entity (intern (downcase field))))
+  (elmo-message-entity-field entity (intern (downcase field)) 'decode))
 
 (defun wl-refile-guess-by-rule (entity)
   (let ((rules wl-refile-rule-alist)
@@ -250,7 +250,7 @@ If RULE does not match ENTITY, returns nil."
 
 (defun wl-refile-guess-by-subject (entity)
   (cdr (assoc (funcall wl-summary-subject-filter-function
-                      (elmo-msgdb-overview-entity-get-subject entity))
+                      (elmo-message-entity-field entity 'subject 'decode))
              wl-refile-subject-alist)))
 
 (require 'product)
index 8fc34a5..20dd43c 100644 (file)
@@ -407,7 +407,7 @@ Set `wl-score-cache' nil."
       (setq num (elmo-message-entity-number entity))
       (when (and (not (assq num wl-summary-scored))
                 (or (memq num force-msgs)
-                    (member (elmo-message-mark folder num)
+                    (member (wl-summary-message-mark folder num)
                             wl-summary-score-marks)))
        (setq wl-scores-messages
              (cons (cons entity (or wl-summary-default-score 0))
@@ -1233,16 +1233,15 @@ Set `wl-score-cache' nil."
           'wl-summary-score-update-all-lines "Updating score..."
           (/ (* i 100) count))))
       (when dels
-       ;;(let ((marks dels))
-       ;;(while marks
-       ;;(elmo-message-set-flag wl-summary-buffer-elmo-folder
-       ;;                                 (pop marks) 'read)))
+       (dolist (del dels)
+         (elmo-message-set-flag wl-summary-buffer-elmo-folder
+                                del 'read))
        (elmo-folder-kill-messages wl-summary-buffer-elmo-folder dels)
        (wl-summary-delete-messages-on-buffer dels))
       (when (and update update-unread)
        ;; Update Folder mode
        (wl-folder-set-folder-updated (wl-summary-buffer-folder-name)
-                                     (list 
+                                     (list
                                       0
                                       (let ((pair
                                              (wl-summary-count-unread)))
index 17370cd..5b0f82f 100644 (file)
   (` (and wl-summary-buffer-elmo-folder
          (elmo-folder-name-internal wl-summary-buffer-elmo-folder))))
 
-(defmacro wl-summary-buffer-msgdb ()
-  (` (and wl-summary-buffer-elmo-folder
-         (elmo-folder-msgdb wl-summary-buffer-elmo-folder))))
-
 (defvar wl-summary-buffer-disp-msg    nil)
 (defvar wl-summary-buffer-disp-folder nil)
 (defvar wl-summary-buffer-temp-mark-list nil)
 (defvar wl-summary-buffer-exit-function nil)
 (defvar wl-summary-buffer-next-message-function nil)
 (defvar wl-summary-buffer-number-list nil)
-(defvar wl-summary-buffer-msgdb nil)
 (defvar wl-summary-buffer-folder-name nil)
 (defvar wl-summary-buffer-line-formatter nil)
 (defvar wl-summary-buffer-line-format nil)
 (make-variable-buffer-local 'wl-summary-buffer-exit-function)
 (make-variable-buffer-local 'wl-summary-buffer-next-message-function)
 (make-variable-buffer-local 'wl-summary-buffer-number-list)
-(make-variable-buffer-local 'wl-summary-buffer-msgdb)
 (make-variable-buffer-local 'wl-summary-buffer-folder-name)
 (make-variable-buffer-local 'wl-summary-buffer-line-formatter)
 (make-variable-buffer-local 'wl-summary-buffer-line-format)
@@ -290,6 +284,7 @@ See also variable `wl-use-petname'."
      ["Set dispose mark" wl-summary-dispose t]
      ["Set refile mark" wl-summary-refile t]
      ["Set copy mark"   wl-summary-copy t]
+     ["Set resend mark" wl-summary-resend t]
      ["Prefetch"        wl-summary-prefetch t]
      ["Set target mark" wl-summary-target-mark t]
      ["Unmark"          wl-summary-unmark t]
@@ -297,7 +292,6 @@ See also variable `wl-use-petname'."
      ["Cancel posted news" wl-summary-cancel-message t]
      ["Supersedes message" wl-summary-supersedes-message t]
      ["Resend bounced mail" wl-summary-resend-bounced-mail t]
-     ["Resend message" wl-summary-resend-message t]
      ["Enter the message" wl-summary-jump-to-current-message t]
      ["Pipe message" wl-summary-pipe-message t]
      ["Print message" wl-summary-print-message t])
@@ -550,6 +544,12 @@ See also variable `wl-use-petname'."
    "Menu used in Summary mode."
    wl-summary-mode-menu-spec))
 
+(defsubst wl-summary-message-visible-p (number)
+  "Return non-nil if the message with NUMBER is visible."
+  (or (eq wl-summary-buffer-view 'sequence)
+      (not (wl-thread-entity-parent-invisible-p
+           (wl-thread-get-entity number)))))
+
 (defun wl-status-update ()
   (interactive)
   (wl-address-init))
@@ -659,60 +659,12 @@ you."
        (t
        (message "Does not appear to be a rejected letter."))))))
 
-(defun wl-summary-resend-message (address)
-  "Resend the current message to ADDRESS."
-  (interactive "sResend message to: ")
-  (if (or (null address) (string-match "^[ \t]*$" address))
-      (message "No address specified.")
-    (message "Resending message to %s..." address)
-    (save-excursion
-      (let ((original (wl-summary-get-original-buffer)))
-       ;; We first set up a normal mail buffer.
-       (set-buffer (get-buffer-create " *wl-draft-resend*"))
-       (buffer-disable-undo (current-buffer))
-       (erase-buffer)
-       (setq wl-sent-message-via nil)
-       ;; Insert our usual headers.
-       (wl-draft-insert-from-field)
-       (wl-draft-insert-date-field)
-       (insert "to: " address "\n")
-       (goto-char (point-min))
-       ;; Rename them all to "Resent-*".
-       (while (re-search-forward "^[A-Za-z]" nil t)
-         (forward-char -1)
-         (insert "Resent-"))
-       (widen)
-       (forward-line)
-       (delete-region (point) (point-max))
-       (let ((beg  (point)))
-         ;; Insert the message to be resent.
-         (insert-buffer-substring original)
-         (goto-char (point-min))
-         (search-forward "\n\n")
-         (forward-char -1)
-         (save-restriction
-           (narrow-to-region beg (point))
-           (wl-draft-delete-fields wl-ignored-resent-headers)
-           (goto-char (point-max)))
-         (insert mail-header-separator)
-         ;; Rename all old ("Previous-")Resent headers.
-         (while (re-search-backward "^\\(Previous-\\)*Resent-" beg t)
-           (beginning-of-line)
-           (insert "Previous-"))
-         ;; Quote any "From " lines at the beginning.
-         (goto-char beg)
-         (when (looking-at "From ")
-           (replace-match "X-From-Line: ")))
-       ;; Send it.
-       (wl-draft-dispatch-message)
-       (kill-buffer (current-buffer)))
-      (message "Resending message to %s...done" address))))
-
 (defun wl-summary-detect-mark-position ()
   (let ((column wl-summary-buffer-number-column)
        (formatter wl-summary-buffer-line-formatter)
        (dummy-temp (char-to-string 200))
-       (dummy-persistent (char-to-string 201))
+       (wl-summary-new-mark (char-to-string 201)) ; bind only for the check.
+       (wl-summary-flag-priority-list '(new))     ; ditto.
        temp persistent)
     (with-temp-buffer
       (setq wl-summary-buffer-number-column column
@@ -726,14 +678,15 @@ you."
         :size 100)
        nil
        dummy-temp
-       dummy-persistent))
+       '(new)
+       nil))
       (goto-char (point-min))
       (setq temp (save-excursion
-                  (search-forward dummy-temp nil t)
-                  (current-column))
+                  (when (search-forward dummy-temp nil t)
+                    (current-column)))
            persistent (save-excursion
-                        (search-forward dummy-persistent nil t)
-                        (current-column))))
+                        (when (search-forward wl-summary-new-mark nil t)
+                          (current-column)))))
     (setq wl-summary-buffer-temp-mark-column temp
          wl-summary-buffer-persistent-mark-column persistent)))
 
@@ -896,7 +849,8 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'."
         (or ml-name (setq ml-name (match-string 1 delivered-to))))
     (and (setq mailing-list
               (elmo-message-entity-field entity 'mailing-list))
-        (string-match "\\(^\\|; \\)contact \\([^@]+\\)-[^-@]+@" mailing-list)  ; *-help@, *-owner@, etc.
+        ;; *-help@, *-owner@, etc.
+        (string-match "\\(^\\|; \\)contact \\([^@]+\\)-[^-@]+@" mailing-list)
         (or ml-name (setq ml-name (match-string 2 mailing-list))))
     (cons (and ml-name (car (split-string ml-name " ")))
          (and ml-count (string-to-int ml-count)))))
@@ -929,7 +883,7 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'."
   (interactive)
   (wl-summary-rescan "list-info"))
 
-(defun wl-summary-rescan (&optional sort-by)
+(defun wl-summary-rescan (&optional sort-by disable-killed)
   "Rescan current folder without updating."
   (interactive)
   (let ((elmo-mime-charset wl-summary-buffer-mime-charset)
@@ -939,7 +893,7 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'."
        (inhibit-read-only t)
        (buffer-read-only nil)
        (numbers (elmo-folder-list-messages wl-summary-buffer-elmo-folder
-                                           nil t)) ; in-msgdb
+                                           (not disable-killed) t)) ; in-msgdb
        expunged)
     (erase-buffer)
     (message "Re-scanning...")
@@ -959,6 +913,7 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'."
     (setq wl-thread-entity-hashtb (elmo-make-hash (* num 2))
          wl-thread-entity-list nil
          wl-thread-entities nil
+         wl-summary-scored nil
          wl-summary-buffer-number-list nil
          wl-summary-buffer-target-mark-list nil
          wl-summary-buffer-temp-mark-list nil
@@ -994,7 +949,6 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'."
          (wl-thread-insert-top)
          (message "Inserting thread...done")))
     (when wl-use-scoring
-      (setq wl-summary-scored nil)
       (wl-summary-score-headers (wl-summary-rescore-msgs
                                 wl-summary-buffer-number-list)
                                t)
@@ -1050,7 +1004,7 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'."
       "folder mode"))
 
 (defun wl-summary-set-message-modified ()
-  (elmo-folder-set-message-modified-internal
+  (elmo-folder-set-message-modified
    wl-summary-buffer-elmo-folder t)
   (setq wl-summary-buffer-message-modified t)
   (wl-summary-set-mark-modified))
@@ -1182,7 +1136,7 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'."
 
 (defun wl-summary-sync-force-update (&optional unset-cursor no-check)
   (interactive)
-  (wl-summary-sync-update unset-cursor nil no-check))
+  (wl-summary-sync-update unset-cursor nil nil no-check))
 
 (defsubst wl-summary-sync-all-init ()
   (wl-summary-cleanup-temp-marks)
@@ -1206,30 +1160,33 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'."
         (msgdb-dir (elmo-folder-msgdb-path folder))
         (range (or force-range (wl-summary-input-range
                                 (elmo-folder-name-internal folder)))))
-    (cond ((string= range "rescan")
-          (let ((msg (wl-summary-message-number)))
-            (wl-summary-rescan)
-            (and msg (wl-summary-jump-to-msg msg))))
-         ((string= range "rescan-noscore")
+    (cond ((string-match "rescan" range)
           (let ((msg (wl-summary-message-number))
-                wl-use-scoring)
-            (wl-summary-rescan)
+                (wl-use-scoring (if (string-match "noscore" range)
+                                    nil
+                                  wl-use-scoring)))
+            (wl-summary-rescan nil
+                               (string-match "noscore" range))
+            (and msg (wl-summary-jump-to-msg msg))))
+         ((string= range "mark")
+          (let ((msg (wl-summary-message-number)))
+            (call-interactively 'wl-summary-sync-marks)
             (and msg (wl-summary-jump-to-msg msg))))
          ((string= range "cache-status")
           (let ((msg (wl-summary-message-number)))
             (wl-summary-resume-cache-status)
             (and msg (wl-summary-jump-to-msg msg))))
-         ((or (string-match "last:" range)
-              (string-match "first:" range))
+         ((string= range "no-sync"))
+         ((or (string-match "^last:" range)
+              (string-match "^first:" range))
           (wl-summary-goto-folder-subr (concat "/" range "/"
                                                (elmo-folder-name-internal
                                                 folder))
-           'force-update nil nil t))
+                                       'force-update nil nil t))
          (t
           (wl-summary-sync-update unset-cursor
-                                  (cond ((string= range "all") 'all)
-                                        ((string= range "all-visible")
-                                         'visible-only)))))))
+                                  (string-match "entirely" range)
+                                  (string-match "all" range))))))
 
 (defvar wl-summary-edit-addresses-candidate-fields
   ;; First element becomes default.
@@ -1358,13 +1315,11 @@ If ARG is non-nil, checking is omitted."
                                      wl-summary-incorporate-marks))
 
 (defun wl-summary-prefetch-msg (number &optional arg)
-  "Returns status-mark. if skipped, returns nil."
+  "Prefetch message and return non-nil value. If skipped, return nil."
   ;; prefetching procedure.
   (save-excursion
     (let* ((size (elmo-message-field wl-summary-buffer-elmo-folder
                                     number 'size))
-          (inhibit-read-only t)
-          (buffer-read-only nil)
           (file-cached (elmo-file-cache-exists-p
                         (elmo-message-field wl-summary-buffer-elmo-folder
                                             number 'message-id)))
@@ -1400,8 +1355,6 @@ If ARG is non-nil, checking is omitted."
                                "??")))))) " ]")
                        size))))
              (message ""))             ; flush.
-           (setq mark (or (elmo-message-mark wl-summary-buffer-elmo-folder
-                                             number) " "))
            (if force-read
                (save-excursion
                  (save-match-data
@@ -1412,18 +1365,17 @@ If ARG is non-nil, checking is omitted."
                         number))
                    (elmo-message-set-cached wl-summary-buffer-elmo-folder
                                             number t)
-                   (setq new-mark
-                         (or (elmo-message-mark wl-summary-buffer-elmo-folder
-                                                number)
-                             " "))
-                   (unless (string= new-mark mark)
+                   (when (and (wl-summary-jump-to-msg number)
+                              (wl-summary-update-persistent-mark))
+                     (sit-for 0)
                      (wl-summary-count-unread)
                      (wl-summary-update-modeline)
                      (wl-folder-update-unread
                       (wl-summary-buffer-folder-name)
                       (+ wl-summary-buffer-unread-count
                          wl-summary-buffer-new-count))))
-                 new-mark)))))))
+                 t)
+             nil))))))
 
 (defun wl-summary-prefetch-region-no-mark (beg end &optional prefetch-marks)
   (interactive "r")
@@ -1463,30 +1415,15 @@ If ARG is non-nil, checking is omitted."
        (setq length (length targets))
        (message "Prefetching...")
        (while targets
-         (setq mark (if (not (wl-thread-entity-parent-invisible-p
-                              (wl-thread-get-entity (car targets))))
-                        (progn
-                          (wl-summary-jump-to-msg (car targets))
-                          (wl-summary-prefetch-msg
-                           (wl-summary-message-number)))
-                      (wl-summary-prefetch-msg (car targets))))
-         (if (if prefetch-marks
-                 (string= mark elmo-msgdb-unread-cached-mark)
-               (or (string= mark elmo-msgdb-unread-cached-mark)
-                   (string= mark " ")))
-             (message "Prefetching... %d/%d message(s)"
-                      (setq count (+ 1 count)) length))
-         ;; redisplay!
-         (when mark
-           (save-excursion
-             (setq pos (point))
-             (when (wl-summary-jump-to-msg (car targets))
-               (wl-summary-update-mark (car targets)))
-             (goto-char start-pos)
-             (if (pos-visible-in-window-p pos)
-                 (save-restriction
-                   (widen)
-                   (sit-for 0)))))
+         (when (if (not (wl-thread-entity-parent-invisible-p
+                         (wl-thread-get-entity (car targets))))
+                   (progn
+                     (wl-summary-jump-to-msg (car targets))
+                     (wl-summary-prefetch-msg
+                      (wl-summary-message-number)))
+                 (wl-summary-prefetch-msg (car targets)))
+           (message "Prefetching... %d/%d message(s)"
+                    (setq count (+ 1 count)) length))
          (setq targets (cdr targets)))
        (message "Prefetched %d/%d message(s)" count length)
        (cons count length)))))
@@ -1574,7 +1511,7 @@ If ARG is non-nil, checking is omitted."
                  (setq children
                        (delq number (wl-thread-get-children-msgs number)))
                  (while children
-                   (wl-thread-msg-mark-as-important (car children))
+                   (wl-summary-mark-as-important (car children))
                    (setq children (cdr children))))
                (forward-line 1))))
        (while (not (eobp))
@@ -1587,12 +1524,8 @@ If ARG is non-nil, checking is omitted."
   (interactive)
   (if (or (not (interactive-p))
          (y-or-n-p "Mark all messages as read? "))
-      (let* ((folder wl-summary-buffer-elmo-folder)
-            (cur-buf (current-buffer))
-            (inhibit-read-only t)
-            (buffer-read-only nil)
-            (case-fold-search nil)
-            msg mark new-mark)
+      (let ((folder wl-summary-buffer-elmo-folder)
+           (cur-buf (current-buffer)))
        (message "Setting all msgs as read...")
        (elmo-folder-mark-as-read folder
                                  (elmo-folder-list-unreads
@@ -1600,80 +1533,47 @@ If ARG is non-nil, checking is omitted."
        (save-excursion
          (goto-char (point-min))
          (while (not (eobp))
-           (setq msg (wl-summary-message-number)
-                 mark (wl-summary-persistent-mark)
-                 new-mark (or (elmo-message-mark folder msg) " "))
-           (unless (string= mark new-mark)
-             (delete-backward-char 1)
-             ;; New mark and unread-uncached mark
-             (insert new-mark)
-             (if wl-summary-highlight
-                 (wl-highlight-summary-current-line)))
+           (wl-summary-update-persistent-mark)
            (forward-line 1)))
        (wl-folder-update-unread (wl-summary-buffer-folder-name) 0)
        (setq wl-summary-buffer-unread-count 0)
        (setq wl-summary-buffer-new-count    0)
        (wl-summary-update-modeline)
-       (message "Setting all msgs as read...done")
-       (set-buffer-modified-p nil))))
+       (message "Setting all msgs as read...done"))))
 
 (defun wl-summary-delete-cache ()
   "Delete cache of current message."
   (interactive)
   (save-excursion
-    (let* ((inhibit-read-only t)
-          (buffer-read-only nil)
-          (folder wl-summary-buffer-elmo-folder)
-          (case-fold-search nil)
-          new-mark mark number unread)
+    (let* ((folder wl-summary-buffer-elmo-folder)
+          number)
       (setq number (wl-summary-message-number))
       (elmo-message-set-cached folder number nil)
-      (setq new-mark (elmo-message-mark folder number)
-           mark (wl-summary-persistent-mark))
-      (unless (string= new-mark mark)
-       (delete-backward-char 1)
-       (insert new-mark)
+      (when (wl-summary-update-persistent-mark)
        (elmo-file-cache-delete
         (elmo-file-cache-get-path
          (elmo-message-field wl-summary-buffer-elmo-folder
                              number
-                             'message-id)))
-       (if wl-summary-highlight
-           (wl-highlight-summary-current-line))
-       (set-buffer-modified-p nil)))))
+                             'message-id)))))))
 
 (defun wl-summary-resume-cache-status ()
   "Resume the cache status of all messages in the current folder."
   (interactive)
   (let ((folder wl-summary-buffer-elmo-folder)
-       (buffer-read-only nil)
-       (case-fold-search nil)
-       number msgid set-mark mark)
+       number msgid)
     (message "Resuming cache status...")
     (save-excursion
       (goto-char (point-min))
       (while (not (eobp))
        (setq number (wl-summary-message-number))
-       (setq mark (wl-summary-persistent-mark))
        (setq msgid (elmo-message-field folder number 'message-id))
-       (setq set-mark nil)
-       (if (elmo-file-cache-exists-p msgid)
-           (when (member mark (elmo-msgdb-uncached-marks))
-             (elmo-message-set-cached folder number t)
-             (setq set-mark (elmo-message-mark folder number)))
-         (unless (member mark (elmo-msgdb-uncached-marks))
-           (elmo-message-set-cached folder number nil)
-           (setq set-mark (or (elmo-message-mark folder number) " "))))
-       (when set-mark
-         (delete-backward-char 1)
-         (insert set-mark)
-         (if wl-summary-highlight
-             (wl-highlight-summary-current-line)))
+       (elmo-message-set-cached folder number
+                                (elmo-file-cache-exists-p msgid))
+       (wl-summary-update-persistent-mark)
        (forward-line 1))
       (wl-summary-count-unread)
       (wl-summary-update-modeline)
-      (message "Resuming cache status...done")
-      (set-buffer-modified-p nil))))
+      (message "Resuming cache status...done"))))
 
 (defun wl-summary-delete-messages-on-buffer (msgs &optional deleting-info)
   (interactive)
@@ -1720,38 +1620,14 @@ If ARG is non-nil, checking is omitted."
             (+ wl-summary-buffer-unread-count wl-summary-buffer-new-count)
             (elmo-folder-length wl-summary-buffer-elmo-folder))))))
 
-(defun wl-summary-replace-status-marks (before after)
-  "Replace the status marks on buffer."
-  (save-excursion
-    (goto-char (point-min))
-    (let ((inhibit-read-only t)
-         (buffer-read-only nil))
-      (while (not (eobp))
-       (when (string= (wl-summary-persistent-mark) before)
-         (delete-backward-char 1)
-         (insert after)
-         (if wl-summary-highlight
-             (wl-highlight-summary-current-line)))
-       (forward-line 1)))))
-
 (defun wl-summary-update-status-marks ()
   "Synchronize status marks on current buffer to the msgdb."
   (interactive)
   (save-excursion
     (goto-char (point-min))
-    (let ((inhibit-read-only t)
-         (buffer-read-only nil)
-         mark)
-      (while (not (eobp))
-       (unless (string= (wl-summary-persistent-mark)
-                        (setq mark (or (elmo-message-mark
-                                        wl-summary-buffer-elmo-folder
-                                        (wl-summary-message-number))
-                                       " ")))
-         (delete-backward-char 1)
-         (insert mark)
-         (if wl-summary-highlight (wl-highlight-summary-current-line)))
-       (forward-line 1)))))
+    (while (not (eobp))
+      (wl-summary-update-persistent-mark)
+      (forward-line 1))))
 
 (defun wl-summary-insert-message (&rest args)
   (if (eq wl-summary-buffer-view 'thread)
@@ -1800,7 +1676,7 @@ If ARG is non-nil, checking is omitted."
       (setq mes (format "Updated (-%d" (length diffs)))
       (while diffs
        (wl-summary-mark-as-important (car diffs)
-                                     elmo-msgdb-important-mark
+                                     wl-summary-important-mark
                                      'no-server)
        (setq diffs (cdr diffs)))
       (setq diffs (car diff)) ; important-appends
@@ -1819,7 +1695,7 @@ If ARG is non-nil, checking is omitted."
        (wl-summary-mark-as-unanswered (car diffs) 'no-modeline)
        (setq diffs (cdr diffs)))
       (setq diffs (car diff)) ; unread-appends
-      (setq mes (concat mes (format "/+%d) answered mark(s)." (length diffs))))
+      (setq mes (concat mes (format "/+%d) answered mark(s)," (length diffs))))
       (while diffs
        (wl-summary-mark-as-answered (car diffs) 'no-modeline)
        (setq diffs (cdr diffs)))
@@ -1840,11 +1716,13 @@ If ARG is non-nil, checking is omitted."
        (setq diffs (cdr diffs)))
       (if (interactive-p) (message "%s" mes)))))
 
-(defun wl-summary-sync-update (&optional unset-cursor sync-all no-check)
+(defun wl-summary-sync-update (&optional unset-cursor
+                                        disable-killed
+                                        sync-all
+                                        no-check)
   "Update the summary view to the newest folder status."
   (interactive)
   (let* ((folder wl-summary-buffer-elmo-folder)
-        (case-fold-search nil)
         (elmo-mime-charset wl-summary-buffer-mime-charset)
         (inhibit-read-only t)
         (buffer-read-only nil)
@@ -1864,19 +1742,22 @@ If ARG is non-nil, checking is omitted."
          ;;(wl-summary-flush-pending-append-operations seen-list))
          (goto-char (point-max))
          (wl-folder-confirm-existence folder (elmo-folder-plugged-p folder))
-         (setq crossed (elmo-folder-synchronize folder sync-all no-check))
+         (setq crossed (elmo-folder-synchronize folder
+                                                disable-killed
+                                                sync-all
+                                                no-check))
          (if crossed
              (progn
                ;; Setup sync-all
                (if sync-all (wl-summary-sync-all-init))
                (setq diff (elmo-list-diff (elmo-folder-list-messages
                                            folder
-                                           'visible-only
+                                           (not disable-killed)
                                            'in-msgdb)
                                           wl-summary-buffer-number-list))
                (setq append-list (car diff))
                (setq delete-list (cadr diff))
-               
+
                (when delete-list
                  (wl-summary-delete-messages-on-buffer delete-list))
                (wl-summary-update-status-marks)
@@ -1990,7 +1871,6 @@ If ARG is non-nil, checking is omitted."
                                  wl-summary-partial-highlight-above-lines
                                  wl-summary-highlight-partial-threshold)))
                (wl-highlight-summary (point) (point-max))))))
-      (setq wl-summary-buffer-msgdb (elmo-folder-msgdb folder))
       (wl-delete-all-overlays)
       (set-buffer-modified-p nil)
       (if mes (message "%s" mes)))))
@@ -1998,17 +1878,11 @@ If ARG is non-nil, checking is omitted."
 (defun wl-summary-set-score-mark (mark)
   (save-excursion
     (beginning-of-line)
-    (let ((inhibit-read-only t)
-         (buffer-read-only nil)
-         msg-num
-         cur-mark)
-      (setq msg-num (wl-summary-message-number))
-      (setq cur-mark (wl-summary-temp-mark))
+    (let ((cur-mark (wl-summary-temp-mark)))
       (when (member cur-mark (list " "
                                   wl-summary-score-below-mark
                                   wl-summary-score-over-mark))
-       (delete-backward-char 1)
-       (insert mark)
+       (wl-summary-put-temp-mark mark)
        (if wl-summary-highlight
            (wl-highlight-summary-current-line))
        (set-buffer-modified-p nil)))))
@@ -2076,8 +1950,7 @@ If ARG is non-nil, checking is omitted."
                            (length dels)))
          (progn
            (message "Deleting...")
-           (elmo-folder-delete-messages
-            wl-summary-buffer-elmo-folder dels)
+           (elmo-folder-delete-messages wl-summary-buffer-elmo-folder dels)
            (elmo-folder-detach-messages wl-summary-buffer-elmo-folder dels)
            (wl-summary-set-message-modified)
            (wl-folder-set-folder-updated (wl-summary-buffer-folder-name)
@@ -2190,7 +2063,6 @@ If ARG, without confirm."
                   wl-summary-buffer-message-modified
                   wl-summary-buffer-thread-modified
                   wl-summary-buffer-number-list
-                  wl-summary-buffer-msgdb
                   wl-summary-buffer-folder-name
                   wl-summary-buffer-line-formatter)
                 (and (eq wl-summary-buffer-view 'thread)
@@ -2256,11 +2128,9 @@ If ARG, without confirm."
 
 (defun wl-summary-auto-select-msg-p (unread-msg)
   (and unread-msg
-       (not (string=
-            (elmo-message-mark
-             wl-summary-buffer-elmo-folder
-             unread-msg)
-            elmo-msgdb-important-mark))))
+       (not (elmo-message-flagged-p wl-summary-buffer-elmo-folder
+                                   unread-msg
+                                   'important))))
 
 (defsubst wl-summary-open-folder (folder)
   ;; Select folder
@@ -2268,7 +2138,6 @@ If ARG, without confirm."
     (unwind-protect
        (elmo-folder-open folder 'load-msgdb)
       ;; For compatibility
-      (setq wl-summary-buffer-msgdb (elmo-folder-msgdb folder))
       (setq wl-summary-buffer-folder-name (elmo-folder-name-internal
                                           folder)))))
 
@@ -2319,8 +2188,7 @@ If ARG, without confirm."
          (setq wl-summary-buffer-disp-msg nil)
          (setq wl-summary-buffer-last-displayed-msg nil)
          (setq wl-summary-buffer-current-msg nil)
-         (let ((case-fold-search nil)
-               (inhibit-read-only t)
+         (let ((inhibit-read-only t)
                (buffer-read-only nil))
            (erase-buffer)
            ;; Resume summary view
@@ -2375,6 +2243,8 @@ If ARG, without confirm."
               ((eq scan-type 'all)
                (wl-summary-sync 'unset-cursor "all"))
               ((eq scan-type 'no-sync))
+              ((eq scan-type 'rescan)
+               (wl-summary-rescan))
               ((or (eq scan-type 'force-update)
                    (eq scan-type 'update))
                (setq mes (wl-summary-sync-force-update
@@ -2496,24 +2366,26 @@ If ARG, without confirm."
 
 (defun wl-summary-insert-sequential (entity folder &rest args)
   (let ((inhibit-read-only t)
+       (number (elmo-message-entity-number entity))
        buffer-read-only)
     (goto-char (point-max))
     (wl-summary-insert-line
      (wl-summary-create-line entity nil nil
-                            (elmo-message-mark
-                             folder
-                             (elmo-message-entity-number
-                              entity))))
+                            (elmo-message-flags
+                             wl-summary-buffer-elmo-folder
+                             number)
+                            (elmo-message-cached-p
+                             wl-summary-buffer-elmo-folder
+                             number)))
     (setq wl-summary-buffer-number-list
          (wl-append wl-summary-buffer-number-list
                     (list (elmo-message-entity-number entity))))
     nil))
 
 (defun wl-summary-default-subject-filter (subject)
-  (let ((case-fold-search t))
-    (setq subject (elmo-replace-in-string subject "[ \t]*\\(re\\|was\\)[:>]" ""))
-    (setq subject (elmo-replace-in-string subject "[ \t]" ""))
-    (elmo-replace-in-string subject "^\\[.*\\]" "")))
+  (setq subject (elmo-replace-in-string subject "[ \t]*\\(re\\|was\\)[:>]" ""))
+  (setq subject (elmo-replace-in-string subject "[ \t]" ""))
+  (elmo-replace-in-string subject "^\\[.*\\]" ""))
 
 (defun wl-summary-subject-equal (subject1 subject2)
   (string= (funcall wl-summary-subject-filter-function subject1)
@@ -2529,7 +2401,7 @@ If ARG, without confirm."
                        wl-summary-alike-hashtb)))
 
 (defun wl-summary-insert-headers (folder func mime-decode)
-  (let ((numbers (elmo-folder-list-messages folder t t))
+  (let ((numbers (elmo-folder-list-messages folder nil t))
        ov this last alike)
     (buffer-disable-undo (current-buffer))
     (make-local-variable 'wl-summary-alike-hashtb)
@@ -2610,8 +2482,7 @@ If ARG, without confirm."
 
 (defun wl-summary-insert-thread (entity folder update
                                        &optional force-insert)
-  (let ((case-fold-search t)
-       (depth 0)
+  (let ((depth 0)
        this-id parent-entity parent-number relatives anumber
        cur number cur-entity linked retval delayed-entity
        update-list entity-stack)
@@ -2705,23 +2576,18 @@ If ARG, without confirm."
          entity
          parent-entity
          nil
-         (elmo-message-mark wl-summary-buffer-elmo-folder number)
+         (elmo-message-flags wl-summary-buffer-elmo-folder number)
+         (elmo-message-cached-p wl-summary-buffer-elmo-folder number)
          (wl-thread-maybe-get-children-num number)
          (wl-thread-make-indent-string thr-entity)
          (wl-thread-entity-get-linked thr-entity)))))))
 
 (defun wl-summary-target-mark-msgs (msgs)
   "Return the number of marked messages."
-  (let ((i 0) num)
-    (while msgs
-      (if (eq wl-summary-buffer-view 'thread)
-         (wl-thread-jump-to-msg (car msgs))
-       (wl-summary-jump-to-msg (car msgs)))
-      (setq num (wl-summary-message-number))
-      (when (eq num (car msgs))
-       (wl-summary-target-mark num)
-       (setq i (1+ i)))
-      (setq msgs (cdr msgs)))
+  (let ((i 0))
+    (dolist (number msgs)
+      (when (wl-summary-target-mark number)
+       (setq i (1+ i))))
     i))
 
 (defun wl-summary-pick (&optional from-list delete-marks)
@@ -2776,17 +2642,18 @@ If ARG, exit virtual folder."
                                 'update nil nil t)
     (run-hooks 'wl-summary-virtual-hook)))
 
-(defun wl-summary-delete-all-temp-marks (&optional no-msg)
+(defun wl-summary-delete-all-temp-marks (&optional no-msg force)
   "Erase all temp marks from buffer."
   (interactive)
   (when (or wl-summary-buffer-target-mark-list
-           wl-summary-buffer-temp-mark-list)
+           wl-summary-buffer-temp-mark-list
+           wl-summary-scored)
     (save-excursion
       (goto-char (point-min))
       (unless no-msg
        (message "Unmarking..."))
       (while (not (eobp))
-       (wl-summary-unset-mark)
+       (wl-summary-unset-mark nil nil force)
        (forward-line 1))
       (unless no-msg
        (message "Unmarking...done"))
@@ -2794,24 +2661,67 @@ If ARG, exit virtual folder."
       (setq wl-summary-buffer-temp-mark-list nil))))
 
 (defsubst wl-summary-temp-mark ()
-  "Move to the temp-mark column and return mark string."
-  (move-to-column wl-summary-buffer-temp-mark-column)
-  (buffer-substring (- (point) 1) (point)))
+  "Return temp-mark string of current line."
+  (let ((number (wl-summary-message-number))
+       info)
+    (or (and (wl-summary-have-target-mark-p number)
+            "*")
+       (and (setq info (wl-summary-registered-temp-mark number))
+            (nth 1 info))
+       (wl-summary-get-score-mark number)
+       " ")))
+
+(defsubst wl-summary-persistent-mark-string (folder flags cached)
+  "Return the persistent mark string.
+The mark is decided according to the FOLDER, FLAGS and CACHED."
+  (let ((priorities wl-summary-flag-priority-list)
+       mark)
+    (while (and (null mark) priorities)
+      (when (memq (car priorities) flags)
+       (setq mark
+             (case (car priorities)
+               (new
+                wl-summary-new-mark)
+               (important
+                wl-summary-important-mark)
+               (answered
+                (if cached
+                    wl-summary-answered-cached-mark
+                  wl-summary-answered-uncached-mark))
+               (unread
+                (if cached
+                    wl-summary-unread-cached-mark
+                  wl-summary-unread-uncached-mark)))))
+      (setq priorities (cdr priorities)))
+    (or mark
+       (if (or cached (elmo-folder-local-p folder))
+           nil
+         wl-summary-read-uncached-mark))))
+
+(defsubst wl-summary-message-mark (folder number)
+  "Return mark of the message."
+  (ignore-errors
+    (wl-summary-persistent-mark-string
+     folder
+     (elmo-message-flags folder number)
+     (elmo-message-cached-p folder number))))
 
 (defsubst wl-summary-persistent-mark ()
-  "Move to the persistent-mark column and return mark string."
-  (move-to-column wl-summary-buffer-persistent-mark-column)
-  (buffer-substring (- (point) 1) (point)))
-
-(defun wl-summary-mark-line (mark)
-  "Put MARK on current line."
-  (save-excursion
-    (beginning-of-line)
-    (let ((inhibit-read-only t)
-         (buffer-read-only nil))
-      (wl-summary-temp-mark) ; mark
-      (delete-backward-char 1)
-      (insert mark))))
+  "Return persistent-mark string of current line."
+  (or (wl-summary-message-mark wl-summary-buffer-elmo-folder
+                              (wl-summary-message-number))
+      " "))
+
+(defun wl-summary-put-temp-mark (mark)
+  "Put temp MARK on current line."
+  (when wl-summary-buffer-temp-mark-column
+    (save-excursion
+      (beginning-of-line)
+      (let ((inhibit-read-only t)
+           (buffer-read-only nil))
+       (move-to-column wl-summary-buffer-temp-mark-column)
+       (delete-backward-char 1)
+       (insert mark)))))
 
 (defun wl-summary-next-buffer ()
   "Switch to next summary buffer."
@@ -2842,28 +2752,10 @@ If ARG, exit virtual folder."
     (let ((inhibit-read-only t)
          (buffer-read-only nil)
          wl-summary-buffer-disp-msg
-         number mlist)
-      (while (not (eobp))
-       (when (string= (wl-summary-temp-mark) "*")
-         ;; delete target-mark from buffer.
-         (delete-backward-char 1)
-         (insert " ")
-         (setq number (wl-summary-message-number))
-         (setq mlist (append mlist (list number)))
-         (if wl-summary-highlight
-             (wl-highlight-summary-current-line))
-         (if number
-             (setq wl-summary-buffer-target-mark-list
-                   (delq number wl-summary-buffer-target-mark-list))))
-       (forward-line 1))
-      (wl-summary-mark-as-read mlist)
-      ;; closed
-      (when (setq mlist wl-summary-buffer-target-mark-list)
-       (wl-summary-mark-as-read mlist)
-       (while mlist
-         (setq wl-summary-buffer-target-mark-list
-               (delq (car mlist) wl-summary-buffer-target-mark-list))
-         (setq mlist (cdr mlist)))))))
+         (mlist wl-summary-buffer-temp-mark-list))
+      (dolist (number mlist)
+       (wl-summary-unset-mark number))
+      (wl-summary-mark-as-read mlist))))
 
 (defun wl-summary-target-mark-mark-as-unread ()
   (interactive)
@@ -2872,27 +2764,10 @@ If ARG, exit virtual folder."
     (let ((inhibit-read-only t)
          (buffer-read-only nil)
          wl-summary-buffer-disp-msg
-         number mlist)
-      (while (not (eobp))
-       (when (string= (wl-summary-temp-mark) "*")
-         (delete-backward-char 1)
-         (insert " ")
-         (setq number (wl-summary-message-number))
-         (setq mlist (append mlist (list number)))
-         (if wl-summary-highlight
-             (wl-highlight-summary-current-line))
-         (if number
-             (setq wl-summary-buffer-target-mark-list
-                   (delq number wl-summary-buffer-target-mark-list))))
-       (forward-line 1))
-      (wl-summary-mark-as-unread mlist)
-      ;; closed
-      (when (setq mlist wl-summary-buffer-target-mark-list)
-       (wl-summary-mark-as-unread mlist)
-       (while mlist
-         (setq wl-summary-buffer-target-mark-list
-               (delq (car mlist) wl-summary-buffer-target-mark-list))
-         (setq mlist (cdr mlist)))))))
+         (mlist wl-summary-buffer-target-mark-list))
+      (dolist (number mlist)
+       (wl-summary-unset-mark number))
+      (wl-summary-mark-as-unread mlist))))
 
 (defun wl-summary-target-mark-mark-as-important ()
   (interactive)
@@ -2901,26 +2776,10 @@ If ARG, exit virtual folder."
     (let ((inhibit-read-only t)
          (buffer-read-only nil)
          wl-summary-buffer-disp-msg
-         number mlist)
-      (while (not (eobp))
-       (when (string= (wl-summary-temp-mark) "*")
-         ;; delete target-mark from buffer.
-         (delete-backward-char 1)
-         (insert " ")
-         (setq number (wl-summary-mark-as-important))
-         (if wl-summary-highlight
-             (wl-highlight-summary-current-line))
-         (if number
-             (setq wl-summary-buffer-target-mark-list
-                   (delq number wl-summary-buffer-target-mark-list))))
-       (forward-line 1))
-      (setq mlist wl-summary-buffer-target-mark-list)
-      (while mlist
-       (wl-summary-mark-as-important (car mlist))
-       (wl-thread-msg-mark-as-important (car mlist))
-       (setq wl-summary-buffer-target-mark-list
-             (delq (car mlist) wl-summary-buffer-target-mark-list))
-       (setq mlist (cdr mlist)))
+         (mlist wl-summary-buffer-target-mark-list))
+      (dolist (number mlist)
+       (wl-summary-unset-mark number)
+       (wl-summary-mark-as-important number))
       (wl-summary-count-unread)
       (wl-summary-update-modeline))))
 
@@ -2935,43 +2794,47 @@ If ARG, exit virtual folder."
     (while (setq number (car wl-summary-buffer-target-mark-list))
       (wl-thread-jump-to-msg number)
       (wl-summary-save t wl-save-dir)
-      (wl-summary-unmark number))))
+      (wl-summary-unmark))))
 
 (defun wl-summary-target-mark-pick ()
   (interactive)
   (wl-summary-pick wl-summary-buffer-target-mark-list 'delete))
 
-(defun wl-summary-update-mark (&optional number)
-  "Synch up persistent mark of current line with msgdb's."
-  (let ((number (or number (wl-summary-message-number)))
-       buffer-read-only cur-mark)
-    (setq cur-mark (elmo-message-mark wl-summary-buffer-elmo-folder number))
-    (save-excursion
-      ;; set mark on buffer
-      (unless (string= (wl-summary-persistent-mark) cur-mark)
-       (delete-backward-char 1)
-       (insert (or cur-mark " ")))
-      (when wl-summary-highlight
-       (wl-highlight-summary-current-line))
-      (set-buffer-modified-p nil))))
+(defun wl-summary-update-persistent-mark ()
+  "Synch up persistent mark of current line with msgdb's.
+Return non-nil if the mark is updated"
+  (if wl-summary-buffer-persistent-mark-column
+      (save-excursion
+       (move-to-column wl-summary-buffer-persistent-mark-column)
+       (let ((inhibit-read-only t)
+             (buffer-read-only nil)
+             (mark (buffer-substring (- (point) 1) (point)))
+             (new-mark (wl-summary-persistent-mark)))
+         (unless (string= new-mark mark)
+           (delete-backward-char 1)
+           (insert new-mark))
+         (when wl-summary-highlight
+           (wl-highlight-summary-current-line))
+         (set-buffer-modified-p nil)
+         t))
+    (when wl-summary-highlight
+      (wl-highlight-summary-current-line))
+    (set-buffer-modified-p nil)))
 
 (defsubst wl-summary-mark-as-read-internal (inverse
                                            number-or-numbers
                                            no-folder-mark
                                            no-modeline-update)
   (save-excursion
-    (let ((inhibit-read-only t)
-         (buffer-read-only nil)
-         (folder wl-summary-buffer-elmo-folder)
-         (case-fold-search nil)
+    (let ((folder wl-summary-buffer-elmo-folder)
          unread-message number
-         number-list mark visible new-mark)
+         number-list visible)
       (setq number-list (cond ((numberp number-or-numbers)
                               (setq unread-message
-                                    (member (elmo-message-mark 
-                                             folder
-                                             number-or-numbers)
-                                            (elmo-msgdb-unread-marks)))
+                                    (elmo-message-flagged-p
+                                     folder
+                                     number-or-numbers
+                                     'unread))
                               (list number-or-numbers))
                              ((and (not (null number-or-numbers))
                                    (listp number-or-numbers))
@@ -2979,8 +2842,10 @@ If ARG, exit virtual folder."
                              ((setq number (wl-summary-message-number))
                               ;; interactive
                               (setq unread-message
-                                    (member (elmo-message-mark folder number)
-                                            (elmo-msgdb-unread-marks)))
+                                    (elmo-message-flagged-p
+                                     folder
+                                     number
+                                     'unread))
                               (list number))))
       (if (null number-list)
          (message "No message.")
@@ -2988,19 +2853,13 @@ If ARG, exit virtual folder."
            (elmo-folder-unmark-read folder number-list no-folder-mark)
          (elmo-folder-mark-as-read folder number-list no-folder-mark))
        (dolist (number number-list)
-         (setq visible (wl-summary-jump-to-msg number)
-               new-mark (elmo-message-mark folder number))
+         (setq visible (wl-summary-jump-to-msg number))
          (unless inverse
            (when unread-message
              (run-hooks 'wl-summary-unread-message-hook)))
          ;; set mark on buffer
          (when visible
-           (unless (string= (wl-summary-persistent-mark) (or new-mark " "))
-             (delete-backward-char 1)
-             (insert (or new-mark " ")))
-           (if (and visible wl-summary-highlight)
-               (wl-highlight-summary-current-line))
-           (set-buffer-modified-p nil)))
+           (wl-summary-update-persistent-mark)))
        (unless no-modeline-update
          ;; Update unread numbers.
          ;; should elmo-folder-mark-as-read return unread numbers?
@@ -3033,11 +2892,8 @@ If ARG, exit virtual folder."
                                                number-or-numbers
                                                no-modeline-update)
   (save-excursion
-    (let ((inhibit-read-only t)
-         (buffer-read-only nil)
-         (folder wl-summary-buffer-elmo-folder)
-         (case-fold-search nil)
-         number number-list mark visible new-mark)
+    (let ((folder wl-summary-buffer-elmo-folder)
+         number number-list visible)
       (setq number-list (cond ((numberp number-or-numbers)
                               (list number-or-numbers))
                              ((and (not (null number-or-numbers))
@@ -3052,16 +2908,10 @@ If ARG, exit virtual folder."
            (elmo-folder-unmark-answered folder number-list)
          (elmo-folder-mark-as-answered folder number-list))
        (dolist (number number-list)
-         (setq visible (wl-summary-jump-to-msg number)
-               new-mark (elmo-message-mark folder number))
+         (setq visible (wl-summary-jump-to-msg number))
          ;; set mark on buffer
          (when visible
-           (unless (string= (wl-summary-persistent-mark) (or new-mark " "))
-             (delete-backward-char 1)
-             (insert (or new-mark " ")))
-           (if (and visible wl-summary-highlight)
-               (wl-highlight-summary-current-line))
-           (set-buffer-modified-p nil)))
+           (wl-summary-update-persistent-mark)))
        (unless no-modeline-update
          ;; Update unread numbers.
          ;; should elmo-folder-mark-as-read return unread numbers?
@@ -3077,9 +2927,9 @@ If ARG, exit virtual folder."
   (interactive)
   (wl-summary-mark-as-answered-internal
    (and (interactive-p)
-       (member (elmo-message-mark wl-summary-buffer-elmo-folder
-                                  (wl-summary-message-number))
-               (elmo-msgdb-answered-marks)))
+       (elmo-message-flagged-p wl-summary-buffer-elmo-folder
+                               (wl-summary-message-number)
+                               'answered))
    number-or-numbers
    no-modeline-update))
 
@@ -3097,70 +2947,53 @@ If ARG, exit virtual folder."
          'internal)
       (error "Cannot process mark in this folder"))
   (save-excursion
-    (let* (eol
-         (inhibit-read-only t)
-         (buffer-read-only nil)
-         (folder wl-summary-buffer-elmo-folder)
-         message-id visible cur-mark)
-      (if number
-         (progn
-           (setq visible (wl-summary-jump-to-msg number))
-           (setq mark (or mark (elmo-message-mark 
-                                wl-summary-buffer-elmo-folder number))))
-       (setq visible t))
-      (when visible
-       (if (null (setq number (wl-summary-message-number)))
+    (let* ((folder wl-summary-buffer-elmo-folder)
+          message-id visible cur-mark)
+      (cond (number
+            (setq visible (wl-summary-jump-to-msg number))
+            (setq cur-mark (or mark
+                               (wl-summary-message-mark
+                                wl-summary-buffer-elmo-folder number)
+                               " ")))
+           ((setq number (wl-summary-message-number))
+            (setq visible t)
+            (setq cur-mark (or mark (wl-summary-persistent-mark))))
+           (t
+            (error "No message")))
+      (when (or visible
+               ;; already exists in msgdb.
+               (elmo-message-entity wl-summary-buffer-elmo-folder
+                                    number))
+       (setq message-id (elmo-message-field
+                         wl-summary-buffer-elmo-folder
+                         number
+                         'message-id))
+       (if (string= cur-mark wl-summary-important-mark)
            (progn
-             (message "No message.")
-             (setq visible nil))
-         (end-of-line)
-         (setq eol (point))
-         (wl-summary-goto-previous-message-beginning)))
-      (if (or (and (not visible)
-                  ;; already exists in msgdb.
-                  (elmo-message-entity wl-summary-buffer-elmo-folder
-                                       number))
-             (setq cur-mark (wl-summary-persistent-mark)))
-         (progn
-           (setq number (or number (wl-summary-message-number)))
-           (setq mark (or mark cur-mark))
-           (setq message-id (elmo-message-field
-                             wl-summary-buffer-elmo-folder
-                             number
-                             'message-id))
-           (if (string= mark elmo-msgdb-important-mark)
-               (progn
-                 ;; server side mark
-                 (save-match-data
-                   (elmo-folder-unmark-important folder (list number)
-                                                 no-server-update)
-                   (unless no-server-update
-                     (elmo-msgdb-global-mark-delete message-id))
-                   ;; Remove cache if local folder.
-                   (if (and (elmo-folder-local-p folder)
-                            (not (eq 'mark
-                                     (elmo-folder-type-internal folder))))
-                       (elmo-file-cache-delete
-                        (elmo-file-cache-get-path message-id))))
-                 (when visible
-                   (delete-backward-char 1)
-                   (insert (or (elmo-message-mark folder number) " "))))
              ;; server side mark
-             (elmo-folder-mark-as-important folder (list number)
-                                            no-server-update)
-             (when visible
-               (delete-backward-char 1)
-               (insert elmo-msgdb-important-mark))
-             (if (eq (elmo-file-cache-exists-p message-id) 'entire)
-                 (elmo-folder-mark-as-read folder (list number))
-               ;; Force cache message.
-               (elmo-message-encache folder number 'read))
-             (unless no-server-update
-               (elmo-msgdb-global-mark-set message-id
-                                           elmo-msgdb-important-mark)))))
-      (if (and visible wl-summary-highlight)
-         (wl-highlight-summary-current-line))))
-  (set-buffer-modified-p nil)
+             (save-match-data
+               (elmo-folder-unmark-important folder (list number)
+                                             no-server-update)
+               (unless no-server-update
+                 (elmo-msgdb-global-mark-delete message-id))
+               ;; Remove cache if local folder.
+               (if (and (elmo-folder-local-p folder)
+                        (not (eq 'mark
+                                 (elmo-folder-type-internal folder))))
+                   (elmo-file-cache-delete
+                    (elmo-file-cache-get-path message-id)))))
+         ;; server side mark
+         (elmo-folder-mark-as-important folder (list number)
+                                        no-server-update)
+         (if (eq (elmo-file-cache-exists-p message-id) 'entire)
+             (elmo-folder-mark-as-read folder (list number))
+           ;; Force cache message.
+           (elmo-message-encache folder number 'read))
+         (unless no-server-update
+           (elmo-msgdb-global-mark-set message-id
+                                       elmo-msgdb-important-mark))))
+      (when visible
+       (wl-summary-update-persistent-mark))))
   number)
 
 ;;; Summary line.
@@ -3279,17 +3112,22 @@ If ARG, exit virtual folder."
 (defun wl-summary-create-line (wl-message-entity
                               wl-parent-message-entity
                               wl-temp-mark
-                              wl-persistent-mark
+                              wl-flags
+                              wl-cached
                               &optional
                               wl-thr-children-number
                               wl-thr-indent-string
                               wl-thr-linked)
   "Create a summary line."
   (let ((wl-mime-charset wl-summary-buffer-mime-charset)
+       (wl-persistent-mark (wl-summary-persistent-mark-string
+                            wl-summary-buffer-elmo-folder
+                            wl-flags
+                            wl-cached))
        (elmo-mime-charset wl-summary-buffer-mime-charset)
        (elmo-lang wl-summary-buffer-weekday-name-lang)
        (wl-datevec (or (ignore-errors (timezone-fix-time
-                                       (elmo-msgdb-overview-entity-get-date 
+                                       (elmo-msgdb-overview-entity-get-date
                                         wl-message-entity)
                                        nil
                                        wl-summary-fix-timezone))
@@ -3311,11 +3149,11 @@ If ARG, exit virtual folder."
     (setq line (concat line
                       "\r"
                       (number-to-string
-                       (elmo-msgdb-overview-entity-get-number 
+                       (elmo-msgdb-overview-entity-get-number
                         wl-message-entity))))
     (if wl-summary-highlight
        (wl-highlight-summary-line-string line
-                                         wl-persistent-mark
+                                         wl-flags
                                          wl-temp-mark
                                          wl-thr-indent-string))
     line))
@@ -3425,10 +3263,11 @@ If ARG, exit virtual folder."
                      wl-summary-buffer-target-mark-list mark-list
                      wl-summary-buffer-temp-mark-list temp-list
                      wl-summary-buffer-temp-mark-column temp-column)
-               (wl-summary-delete-all-temp-marks 'no-msg)
+               (wl-summary-delete-all-temp-marks 'no-msg 'force)
                (encode-coding-region
                 (point-min) (point-max)
-                (or (and wl-on-mule ; one in mcs-ltn1(apel<10.4) cannot take 2 arg.
+                (or (and wl-on-mule
+                         ;; one in mcs-ltn1(apel<10.4) cannot take 2 arg.
                          (mime-charset-to-coding-system charset 'LF))
                     ;; Mule 2 doesn't have `*ctext*unix'.
                     (mime-charset-to-coding-system charset)))
@@ -3456,9 +3295,17 @@ If ARG, exit virtual folder."
 (defun wl-summary-input-range (folder)
   "returns update or all or rescan."
   ;; for the case when parts are expanded in the bottom of the folder
-  (let ((input-range-list '("update" "all" "rescan" "first:" "last:"
+  (let ((input-range-list '("no-sync"
+                           "first:"
+                           "last:"
                            "cache-status"
-                           "no-sync" "rescan-noscore" "all-visible"))
+                           "mark"
+                           "rescan"
+                           "rescan-noscore"
+                           "update"
+                           "update-entirely"
+                           "all"
+                           "all-entirely"))
        (default (or (wl-get-assoc-list-value
                      wl-folder-sync-range-alist
                      folder)
@@ -3600,6 +3447,7 @@ If ARG, exit virtual folder."
          (wl-message-select-buffer wl-message-buffer)
          (delete-window)
          (select-window (get-buffer-window cur-buf))
+         (setq wl-message-buffer nil)
          (run-hooks 'wl-summary-toggle-disp-off-hook))
 ;;;    (switch-to-buffer cur-buf)
        )))
@@ -3705,26 +3553,26 @@ Return t if message exists."
        start-point
        draft-buf)
     (wl-summary-jump-to-msg (car mlist))
-    (wl-summary-reply arg t)
-    (goto-char (point-max))
-    (setq start-point (point-marker))
-    (setq draft-buf (current-buffer))
-    (save-window-excursion
-      (while mlist
-       (set-buffer summary-buf)
-       (delete-other-windows)
-       (wl-summary-jump-to-msg (car mlist))
-       (wl-summary-redisplay)
-       (set-buffer draft-buf)
-       (goto-char (point-max))
-       (wl-draft-yank-original)
-       (setq mlist (cdr mlist)))
-      (goto-char start-point)
-      (save-excursion
-       (set-buffer summary-buf)
-       (wl-summary-delete-all-temp-marks)))
-    (wl-draft-reply-position wl-draft-reply-default-position)
-    (run-hooks 'wl-mail-setup-hook)))
+    (when (wl-summary-reply arg t)
+      (goto-char (point-max))
+      (setq start-point (point-marker))
+      (setq draft-buf (current-buffer))
+      (save-window-excursion
+       (while mlist
+         (set-buffer summary-buf)
+         (delete-other-windows)
+         (wl-summary-jump-to-msg (car mlist))
+         (wl-summary-redisplay)
+         (set-buffer draft-buf)
+         (goto-char (point-max))
+         (wl-draft-yank-original)
+         (setq mlist (cdr mlist)))
+       (goto-char start-point)
+       (save-excursion
+         (set-buffer summary-buf)
+         (wl-summary-delete-all-temp-marks)))
+      (wl-draft-reply-position wl-draft-reply-default-position)
+      (run-hooks 'wl-mail-setup-hook))))
 
 (defun wl-summary-reply-with-citation (&optional arg)
   (interactive "P")
@@ -3928,21 +3776,26 @@ Reply to author if invoked with ARG."
   (let ((folder wl-summary-buffer-elmo-folder)
        (number (wl-summary-message-number))
        (summary-buf (current-buffer))
+       (winconf (current-window-configuration))
        mes-buf)
     (when number
       (save-excursion
        (wl-summary-redisplay-internal folder number))
-      (elmo-folder-mark-as-answered folder (list number))
-      (wl-summary-update-mark number)
       (setq mes-buf wl-message-buffer)
       (wl-message-select-buffer wl-message-buffer)
       (set-buffer mes-buf)
       (goto-char (point-min))
-      (when (setq mes-buf (wl-message-get-original-buffer))
-       (wl-draft-reply mes-buf arg summary-buf number)
-       (wl-draft-reply-position wl-draft-reply-default-position)
-       (unless without-setup-hook
-         (run-hooks 'wl-mail-setup-hook)))
+      (condition-case err
+         (when (setq mes-buf (wl-message-get-original-buffer))
+           (wl-draft-reply mes-buf arg summary-buf number)
+           (wl-draft-reply-position wl-draft-reply-default-position)
+           (unless without-setup-hook
+             (run-hooks 'wl-mail-setup-hook)))
+       (error (set-window-configuration winconf)
+              (signal (car err)(cdr err))))
+      (with-current-buffer summary-buf
+       (elmo-folder-mark-as-answered folder (list number))
+       (wl-summary-update-persistent-mark))
       t)))
 
 (defun wl-summary-write ()
@@ -4043,28 +3896,18 @@ Use function list is `wl-summary-write-current-folder-functions'."
        (skip-tmark-regexp (wl-regexp-opt wl-summary-skip-mark-list))
        (skip t)
        (column (current-column))
-       skip-pmark-regexp goto-next next-entity finfo)
-    (if (elmo-folder-plugged-p wl-summary-buffer-elmo-folder)
-       ()
-      (setq skip-pmark-regexp
-           (wl-regexp-opt (list " "
-                                elmo-msgdb-unread-cached-mark
-                                elmo-msgdb-important-mark))))
+       goto-next next-entity finfo)
     (beginning-of-line)
-    (let (case-fold-search)
-      (while (and skip
-                 (not (if downward (eobp) (bobp))))
-       (if downward
-           (forward-line 1)
-         (forward-line -1))
-       (setq skip (or (string-match skip-tmark-regexp
-                                    (save-excursion
-                                      (wl-summary-temp-mark)))
-                      (and skip-pmark-regexp
-                           (not (string-match
-                                 skip-pmark-regexp
-                                 (save-excursion
-                                   (wl-summary-persistent-mark)))))))))
+    (while (and skip
+               (not (if downward (eobp) (bobp))))
+      (if downward
+         (forward-line 1)
+       (forward-line -1))
+      (setq skip (or (string-match skip-tmark-regexp
+                                  (wl-summary-temp-mark))
+                    (not (elmo-message-accessible-p
+                          wl-summary-buffer-elmo-folder
+                          (wl-summary-message-number))))))
     (if (if downward (eobp) (and (bobp) skip)) (setq goto-next t))
     (if (or (eobp) (and (bobp) skip))
        (goto-char start))
@@ -4247,11 +4090,12 @@ Use function list is `wl-summary-write-current-folder-functions'."
                      'leave)))
          (when (elmo-message-use-cache-p folder num)
            (elmo-message-set-cached folder num t))
-         (if (member (elmo-message-mark wl-summary-buffer-elmo-folder
-                                        num)
-                     (elmo-msgdb-unread-marks))
-             (wl-summary-mark-as-read num no-folder-mark)
-           (wl-summary-update-mark))
+         (ignore-errors
+           (if (elmo-message-flagged-p wl-summary-buffer-elmo-folder
+                                       num
+                                       'unread)
+               (wl-summary-mark-as-read num no-folder-mark)
+             (wl-summary-update-persistent-mark)))
          (setq wl-summary-buffer-current-msg num)
          (when wl-summary-recenter
            (recenter (/ (- (window-height) 2) 2))
@@ -4289,7 +4133,10 @@ If ASK-CODING is non-nil, coding-system for the message is asked."
          (wl-message-redisplay fld num 'as-is
                                (string= (elmo-folder-name-internal fld)
                                         wl-draft-folder))
-         (wl-summary-mark-as-read num)
+         (ignore-errors
+           (if (elmo-message-flagged-p fld num 'unread)
+               (wl-summary-mark-as-read num); no-folder-mark)
+             (wl-summary-update-persistent-mark)))
          (setq wl-summary-buffer-current-msg num)
          (when wl-summary-recenter
            (recenter (/ (- (window-height) 2) 2))
@@ -4496,7 +4343,7 @@ If ASK-CODING is non-nil, coding-system for the message is asked."
        (let ((num (car wl-summary-buffer-target-mark-list)))
          (wl-thread-jump-to-msg num)
          (wl-summary-pipe-message-subr prefix command)
-         (wl-summary-unmark num))))))
+         (wl-summary-unmark))))))
 
 (defun wl-summary-pipe-message-subr (prefix command)
   (save-excursion
@@ -4583,7 +4430,7 @@ If ASK-CODING is non-nil, coding-system for the message is asked."
        (let ((num (car wl-summary-buffer-target-mark-list)))
          (wl-thread-jump-to-msg num)
          (wl-summary-print-message)
-         (wl-summary-unmark num))))))
+         (wl-summary-unmark))))))
 
 (defun wl-summary-folder-info-update ()
   (wl-folder-set-folder-updated
index 5fe83ab..d844991 100644 (file)
@@ -389,13 +389,16 @@ ENTITY is returned."
          (when (setq message-entity
                      (elmo-message-entity wl-summary-buffer-elmo-folder
                                           msg))
-           (wl-summary-insert-line 
+           (wl-summary-insert-line
             (wl-summary-create-line
              message-entity
              (elmo-message-entity wl-summary-buffer-elmo-folder
                                   parent-msg)
              temp-mark
-             (elmo-message-mark wl-summary-buffer-elmo-folder msg)
+             (elmo-message-flags wl-summary-buffer-elmo-folder
+                                 msg)
+             (elmo-message-cached-p wl-summary-buffer-elmo-folder
+                                    msg)
              (if wl-thread-insert-force-opened
                  nil
                (wl-thread-maybe-get-children-num msg))
@@ -731,14 +734,6 @@ Message is inserted to the summary buffer."
   (interactive "P")
   (wl-thread-call-region-func 'wl-summary-prefetch-region arg))
 
-(defun wl-thread-msg-mark-as-important (msg)
-  "Set mark as important for invisible MSG. Modeline is not changed."
-  (let ((folder wl-summary-buffer-elmo-folder)
-       cur-mark)
-    (setq cur-mark (elmo-message-mark folder msg))
-    (elmo-folder-mark-as-important folder (list msg))
-    (wl-summary-set-mark-modified)))
-
 (defun wl-thread-mark-as-read (&optional arg)
   (interactive "P")
   (wl-thread-call-region-func 'wl-summary-mark-as-read-region arg))
@@ -824,7 +819,10 @@ Message is inserted to the summary buffer."
          (elmo-message-entity wl-summary-buffer-elmo-folder
                               (nth 0 parent-entity))
          temp-mark
-         (elmo-message-mark wl-summary-buffer-elmo-folder msg-num)
+         (elmo-message-flags wl-summary-buffer-elmo-folder
+                             msg-num)
+         (elmo-message-cached-p wl-summary-buffer-elmo-folder
+                                msg-num)
          (if wl-thread-insert-force-opened
              nil
            (wl-thread-maybe-get-children-num msg-num))
@@ -938,7 +936,7 @@ Message is inserted to the summary buffer."
     (while children-msgs
       (if (and (not (eq msg (car children-msgs))) ; except itself
               (or (and uncached-marks
-                       (setq mark (elmo-message-mark
+                       (setq mark (wl-summary-message-mark
                                    wl-summary-buffer-elmo-folder
                                    (car children-msgs)))
                        (member mark uncached-marks))
index 723874d..ebc1894 100644 (file)
@@ -539,11 +539,12 @@ that `read' can handle, whenever this is possible."
 (defmacro wl-concat-list (list separator)
   (` (mapconcat 'identity (delete "" (delq nil (, list))) (, separator))))
 
-(defmacro wl-current-message-buffer ()
-  (` (save-excursion
-       (if (buffer-live-p wl-current-summary-buffer)
-          (set-buffer wl-current-summary-buffer))
-       wl-message-buffer)))
+(defun wl-current-message-buffer ()
+  (when (buffer-live-p wl-current-summary-buffer)
+    (with-current-buffer wl-current-summary-buffer
+      (car (wl-message-buffer-display wl-summary-buffer-elmo-folder
+                                     (wl-summary-message-number)
+                                     'mime)))))
 
 (defmacro wl-kill-buffers (regexp)
   (` (mapcar (function
index bbd4bf6..fe8b8a5 100644 (file)
@@ -340,49 +340,49 @@ If nil, never search search parent by subject."
      wl-summary-register-target-mark
      nil
      wl-highlight-summary-temp-face
-     "put target mark.")
+     "Put target mark.")
     ("d"
      dispose
      nil
      wl-summary-register-temp-mark
      wl-summary-exec-action-dispose
      wl-highlight-summary-disposed-face
-     "dispose messages according to `wl-dispose-folder-alist'.")
+     "Dispose messages according to `wl-dispose-folder-alist'.")
     ("D"
      delete
      nil
      wl-summary-register-temp-mark
      wl-summary-exec-action-delete
      wl-highlight-summary-deleted-face
-     "delete messages immediately.")
+     "Delete messages immediately.")
     ("o"
      refile
      wl-summary-get-refile-destination
      wl-summary-set-action-refile
      wl-summary-exec-action-refile
      wl-highlight-summary-refiled-face
-     "refile messages to the other folder.")
+     "Refile messages to the other folder.")
     ("O"
      copy
      wl-summary-get-copy-destination
      wl-summary-register-temp-mark
      wl-summary-exec-action-copy
      wl-highlight-summary-copied-face
-     "copy messages to the other folder.")
+     "Copy messages to the other folder.")
     ("i"
      prefetch
      nil
      wl-summary-register-temp-mark
      wl-summary-exec-action-prefetch
      wl-highlight-summary-prefetch-face
-     "prefetch messages.")
+     "Prefetch messages.")
     ("~"
      resend
      wl-summary-get-resend-address
      wl-summary-register-temp-mark
      wl-summary-exec-action-resend
      wl-highlight-summary-resend-face
-     ))
+     "Resend messages."))
   "A variable to define Mark & Action.
 Each element of the list should be a list of
 \(MARK
@@ -390,7 +390,8 @@ Each element of the list should be a list of
   ARGUMENT-FUNCTION
   SET-MARK-FUNCTION
   EXEC-FUNCTION
-  FACE)
+  FACE
+  DOC-STRING)
 
 MARK is a temporal mark string to define.
 SYMBOL is an action name to define.
@@ -955,6 +956,49 @@ cdr of each cons cell is used for draft message."
   :type 'boolean
   :group 'wl-folder)
 
+(defcustom wl-summary-flag-priority-list '(new important answered unread)
+ "List of flags reflected with the priority to a persistent mark."
+  :type '(repeat (radio (const :format "%v " new)
+                       (const :format "%v " important)
+                       (const :format "%v " answered)
+                       (const :format "%v " unread)))
+  :group 'wl-summary)
+
+(defcustom wl-summary-new-mark "N"
+  "Mark for new message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
+(defcustom wl-summary-unread-uncached-mark "U"
+  "Mark for unread and uncached message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
+(defcustom wl-summary-unread-cached-mark "!"
+  "Mark for unread but already cached message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
+(defcustom wl-summary-read-uncached-mark "u"
+  "Mark for read but uncached message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
+(defcustom wl-summary-answered-cached-mark "&"
+  "Mark for answered and cached message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
+(defcustom wl-summary-answered-uncached-mark "A"
+  "Mark for answered but cached message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
+(defcustom wl-summary-important-mark "$"
+  "Mark for important message."
+  :type '(string :tag "Mark")
+  :group 'wl-summary-marks)
+
 (defcustom wl-summary-score-over-mark "+"
   "Score mark used for messages with high scores."
   :type '(string :tag "Mark")
@@ -1015,7 +1059,7 @@ This variable is local to the summary buffers."
   :group 'wl-score)
 
 (defcustom wl-summary-score-marks
-  (list elmo-msgdb-new-mark)
+  (list wl-summary-new-mark)
   "Persistent marks to scoring."
   :type '(repeat (string :tag "Mark"))
   :group 'wl-score)
@@ -1690,6 +1734,12 @@ with wl-highlight-folder-many-face."
   :group 'wl-summary
   :group 'wl-pref)
 
+(defcustom wl-summary-print-argument-within-window nil
+  "*If non-nil, always print argument right side of window."
+  :type 'boolean
+  :group 'wl-summary
+  :group 'wl-pref)
+
 (defcustom wl-summary-pick-field-default "Body"
   "*Default field for pick."
   :type '(radio (const "From")
@@ -1760,15 +1810,48 @@ This wrapper is generated by the mail system when rejecting a letter."
   :type 'regexp
   :group 'wl-draft)
 
+(defcustom wl-draft-preview-attributes t
+  "Non-nil forces to preview the attributes in the `wl-draft-preview-message'.
+Attributes specified in the `wl-draft-preview-attributes-list' are displayed."
+  :type 'boolean
+  :group 'wl-draft)
+
+(defcustom wl-draft-preview-attributes-list '(recipients
+                                             envelope-from
+                                             smtp-posting-server
+                                             smtp-posting-port)
+  "*Attribute symbols to display in the draft preview.
+Candidates are following:
+`recipients'
+`envelope-from'
+`smtp-posting-server'
+`smtp-posting-port'
+`nntp-posting-server'
+`nntp-posting-port'
+Also variables which begin with `wl-' can be specified
+\(`wl-' have to be removed\)"
+  :type '(repeat symbol)
+  :group 'wl-draft)
+
+(defcustom wl-draft-preview-attributes-buffer-lines 5
+  "*Buffer height for the draft attribute preview."
+  :type 'integer
+  :group 'wl-draft)
+
+(defcustom wl-draft-preview-attributes-buffer-name "*Preview Attributes*"
+  "*Buffer name for the draft attribute preview."
+  :type 'string
+  :group 'wl-draft)
+
 (defcustom wl-refile-default-from-folder "+from"
   "*Folder name to refile by `wl-refile-guess-by-from'."
   :type '(string :tag "Folder")
   :group 'wl-pref)
 
 (defcustom wl-summary-auto-refile-skip-marks
-  (list elmo-msgdb-new-mark
-       elmo-msgdb-unread-uncached-mark
-       elmo-msgdb-unread-cached-mark)
+  (list wl-summary-new-mark
+       wl-summary-unread-uncached-mark
+       wl-summary-unread-cached-mark)
   "Persistent marks to skip auto-refiling."
   :type '(repeat (string :tag "Mark"))
   :group 'wl-summary)
@@ -1788,8 +1871,8 @@ the message is skipped at cursor move."
   :group 'wl-summary)
 
 (defcustom wl-summary-incorporate-marks
-  (list elmo-msgdb-new-mark
-       elmo-msgdb-unread-uncached-mark)
+  (list wl-summary-new-mark
+       wl-summary-unread-uncached-mark)
   "Persistent marks to prefetch at `wl-summary-incorporate'."
   :type '(repeat (string :tag "Mark"))
   :group 'wl-summary)
@@ -2104,8 +2187,6 @@ e.x.
                       (choice (const "update")
                               (const "all")
                               (const "rescan")
-                              (const "first:")
-                              (const "last:")
                               (const "no-sync")
                               (const :tag "none" nil))))
   :group 'wl-pref)
@@ -2115,8 +2196,6 @@ e.x.
   :type '(choice (const "update")
                 (const "all")
                 (const "rescan")
-                (const "first:")
-                (const "last:")
                 (const "no-sync")
                 (const :tag "none" nil))
   :group 'wl-pref)
@@ -2381,10 +2460,10 @@ ex.
   :group 'wl-expire)
 
 (defcustom wl-summary-expire-reserve-marks
-  (list elmo-msgdb-important-mark
-       elmo-msgdb-new-mark
-       elmo-msgdb-unread-uncached-mark
-       elmo-msgdb-unread-cached-mark)
+  (list wl-summary-important-mark
+       wl-summary-new-mark
+       wl-summary-unread-uncached-mark
+       wl-summary-unread-cached-mark)
   "Permanent marks of reserved message when expire.
 Don't reserve temporary mark message.
 
@@ -2715,6 +2794,10 @@ a symbol `bitmap', `xbm' or `xpm' in order to force the image format."
 
 ;;;; Obsolete variables.
 
+;; 2003-07-15 delete -> dispose
+(elmo-define-obsolete-variable 'wl-delete-folder-alist
+                              'wl-dispose-folder-alist)
+
 ;; 2002-12-25
 (elmo-define-obsolete-variable 'wl-draft-reply-myself-with-argument-list
                               'wl-draft-reply-with-argument-list)
index e076fa3..1aea805 100644 (file)
--- a/wl/wl.el
+++ b/wl/wl.el
@@ -786,17 +786,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
                wl-message-buffer-cache-size))
        (error (concat
                "`wl-message-buffer-prefetch-depth' must be smaller than "
-               "`wl-message-buffer-cache-size' - 1."))))
-  (let (case-fold-search)
-    (unless (string-match "%T" wl-summary-line-format)
-      (error "`wl-summary-line-format' must contain %%T and %%P"))
-    (unless (string-match "%P" wl-summary-line-format)
-      (error "`wl-summary-line-format' must contain %%T and %%P"))
-    (dolist (pair wl-folder-summary-line-format-alist)
-      (unless (string-match "%T" (cdr pair))
-       (error "Format `%s' must contain %%T and %%P" (cdr pair)))
-      (unless (string-match "%P" (cdr pair))
-       (error "Format `%s' must contain %%T and %%P" (cdr pair))))))
+               "`wl-message-buffer-cache-size' - 1.")))))
 
 ;;;###autoload
 (defun wl (&optional arg)