From: teranisi Date: Thu, 7 Nov 2002 08:29:17 +0000 (+0000) Subject: Synch up with main trunk. X-Git-Tag: elmo-mark-restart~93 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f21b45c308661acbfa4490f8a1ff61a4296bab65;p=elisp%2Fwanderlust.git Synch up with main trunk. --- diff --git a/ChangeLog b/ChangeLog index b66eb9c..62e3708 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ +2002-10-27 TAKAHASHI Kaoru + + * README, README.ja: Update stable branch. + 2002-10-24 TAKAHASHI Kaoru - * INSTALL, INSTALL,ja: Update Recommended combination of MIME + * INSTALL, INSTALL.ja: Update Recommended combination of MIME module package. 2002-10-02 Yoichi NAKAYAMA diff --git a/INSTALL.ja b/INSTALL.ja index 28c147f..4e5920b 100644 --- a/INSTALL.ja +++ b/INSTALL.ja @@ -155,7 +155,7 @@ XEmacs $B$N%Q%C%1!<%8$H$7$F%$%s%9%H!<%k(B load-path $B$N@_Dj(B ================ - Emacs 20.3 $B0J9_$b$7$/$O(B XEmacs $B;H$C$FIaDL$K%$%s%9%H!<%k$7$?>l9g$O!"(B + Emacs 20.3 $B0J9_$b$7$/$O(B XEmacs $B$r;H$C$FIaDL$K%$%s%9%H!<%k$7$?>l9g$O!"(B load-path $B$r@_Dj$9$kI,MW$O$"$j$^$;$s!#(B Emacs 20.2 $B0JA0$r$*;H$$$J$i!"(BWanderlust $B$r(B install $B$7$?>l=j$r(B diff --git a/NEWS b/NEWS index 2daad3b..b718e43 100644 --- a/NEWS +++ b/NEWS @@ -61,6 +61,8 @@ Wanderlust NEWS -- User-visible changes in Wanderlust. ** The uses of wl-generate-mailer-string-function has been changed. Specify a function which returns some string to appear in User-Agent header. +** The Reference Card (doc/wl-refcard.tex) describes important key bindings. + * Changes in 2.8.0 from 2.6.1 ** Nemacs, Mule 2.3 based on Emacs 19.28 are not supported any longer. diff --git a/NEWS.ja b/NEWS.ja index 712c824..ab46e4a 100644 --- a/NEWS.ja +++ b/NEWS.ja @@ -63,6 +63,8 @@ Wanderlust NEWS ($BF|K\8lHG(B) -- User-visible changes in Wanderlust. ** wl-generate-mailer-string-function $B$N;HMQK!$,JQ99$K$J$j$^$7$?!#(B User-Agent $B%U%#!<%k%I$KF~$kJ8;zNs$rJV$94X?t$r;XDj$7$F2<$5$$!#(B +** Reference Card (doc/wl-refcard-ja.tex) $B$K + Wanderlust List in English $B$b$"$j$^$9(B($B$3$A$i$KEj9F$5$l$?%a%C%;!<%8$OA0l9g$O!"0J2<$NMM$K$7$F$/$@$5$$!#(B - % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root checkout -r wl-2_8 wanderlust + % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root checkout -r wl-2_10 wanderlust CVS repository $B$O0J2<$+$i$b;2>H$G$-$^$9!#(B diff --git a/doc/TODO b/doc/TODO index a25feb2..7ad2308 100644 --- a/doc/TODO +++ b/doc/TODO @@ -1,4 +1,4 @@ -* tasks in 2.9.x +* tasks in 2.11.x ** enable to define folder icons in elmo.el ** reconsider the structure of msgdb and make behavior faster diff --git a/doc/TODO.ja b/doc/TODO.ja index f47a14d..7d76aa1 100644 --- a/doc/TODO.ja +++ b/doc/TODO.ja @@ -1,4 +1,4 @@ -* 2.9.x $B$N(B TODO +* 2.11.x $B$N(B TODO ** elmo.el $B$G%U%)%k%@$N%"%$%3%s$rDj5A$G$-$k$h$&$K$9$k(B ** msgdb $B$N9=B$$r8+D>$7!"9bB.2=$r$O$+$k(B diff --git a/doc/wl-ja.texi b/doc/wl-ja.texi index 925051d..90a78c3 100644 --- a/doc/wl-ja.texi +++ b/doc/wl-ja.texi @@ -4101,6 +4101,9 @@ Non-nil $B$J$i%a%C%;!<%8%P%C%U%!$GD9$$9T$N@^$jJV$7$r$7$^$;$s!#(B @node Editing Header, Editing Message Body, Usage of Draft Mode, Usage of Draft Mode @subsection $B%X%C%@$NJT=8(B +$Be$N%X%C%@NN0h$O<+M3$KJT=8$9$k$3$H$,$G$-$^$9!#(B + $B=i4|>uBV$G$O(B @samp{To:} $B$K%+!<%=%k$,$"$j$^$9!#Aw?.Ajo$NJ8>O:n@.$H(B +$BF1MM$K9T$J$$$^$9!#K\J8$O(B @samp{--text follows this line--} $B$N9T$h$j2<$K(B +$B5-=R$7$^$9!#(B($BCm0U!'(B @samp{--text follows this line--} $B$N9T$O$$$8$i$J$$$G(B +$B2<$5$$!#(B) + $B%^%k%A%Q!<%H$NJT=8$O(B SEMI $B$N(B MIME $BJT=8%b!<%I$rMxMQ$7$F$$$^$9!#(B $BJT=8$NJ}K!$K$D$$$F$O3F%Q%C%1!<%8IUB0$N%I%-%e%a%s%H$r;2>H$7$F$/$@$5$$!#(B @xref{MIME-Edit, , ,mime-ui-ja, a MIME user interface for GNU Emacs}. @@ -6238,8 +6246,9 @@ pop3 $B!_(B $B"$(B $B"$(B $B"$(B @cindex Split messages @code{elmo-split} $B$r;H$&$H!"%U%)%k%@(B @code{elmo-split-folder} $BFb$N(B -$B%a%C%;!<%8$rFCDj$N5,B'$K=>$C$F(B procmail $BIw$K?6$jJ,$1$k$3$H$,$G$-$^$9!#(B -$B$3$N5!G=$r;H$&$K$O!"$^$:(B @file{~/.emacs} $B$K0J2<$N$h$&$K@_Dj$7$F2<$5$$!#(B +$B%a%C%;!<%8$rFCDj$N5,B'$K=>$C$F(B @command{procmail} $BIw$K?6$jJ,$1$k$3$H$,(B +$B$G$-$^$9!#(B $B$3$N5!G=$r;H$&$K$O!"$^$:(B @file{~/.emacs} $B$K0J2<$N$h$&$K@_Dj(B +$B$7$F2<$5$$!#(B @lisp (autoload 'elmo-split "elmo-split" "Split messages on the folder." t) @@ -6266,7 +6275,7 @@ pop3 $B!_(B $B"$(B $B"$(B $B"$(B ;; @r{wanderlust $B%a!<%j%s%0%j%9%H$+$i$N%a!<%k$r(B @samp{%wanderlust} $B$X(B} ;; @r{$B$=$7$FB3$1$F$=$l0J2<$N5,B'$bI>2A$9$k!#(B} ((equal x-ml-name "wanderlust") "%wanderlust" continue) - ;; @r{Yahoo $BMxMQr7o(B} $B$O(B sexp $B$G$9!#>\$7$/$O$9$08e$G@bL@$7$^$9!#(B +$BBh0l$NMWAG(B @samp{$B>r7o(B} $B$O(B S $B<0$G$9!#=q<0$K$D$$$F$O$9$08e$G@bL@$7$^$9!#(B $BBhFs$NMWAG(B @samp{$B%U%)%k%@(B} $B$O%a%C%;!<%8$N?6$jJ,$1@h$N%U%)%k%@L>$G$9!#(B $B$b$7Bh;0$NMWAG(B @code{continue} $B$,%7%s%\%k$H$7$FM?$($i$l$k$H!"(B $B$=$N>r7o$,K~$?$5$l$?$H$7$F$b?6$jJ,$15,B'$NI>2A$rB3$1$^$9!#(B diff --git a/doc/wl.texi b/doc/wl.texi index ccff474..55ae6d2 100644 --- a/doc/wl.texi +++ b/doc/wl.texi @@ -4131,6 +4131,9 @@ Basically it is Emacs-standard mail mode. @node Editing Header, Editing Message Body, Usage of Draft Mode, Usage of Draft Mode @subsection Editing Message Header +You can freely edit header region above @samp{--text follows this line--}, +until you invoke the sending operation. + Initially, the cursor is at the @samp{To:} field. Fill in recipients addresses. @kbd{@key{TAB}} completes them. @@ -4179,6 +4182,11 @@ the draft when it is prepared. @node Editing Message Body, Dynamical Message Re-arrangement, Editing Header, Usage of Draft Mode @subsection Editing Messages +As a matter of course, editing message body can be performed in the same +way as usual writing. You may write message body under +@samp{--text follows this line--} line. (NOTE: Be sure to leave the line +@samp{--text follows this line--} intact.) + Multi-part editing utilize MIME edit mode of SEMI. For procedures of editing, refer to respective documents. @xref{MIME-Edit, , ,mime-ui-en, a MIME user interface for GNU Emacs}. @@ -6326,8 +6334,9 @@ pop3 N E E E @cindex Split messages You can use @code{elmo-split} to split message in folder -@code{elmo-split-folder} a la procmail according to some specified rules. -To use this feature, set as follows in your @file{~/.emacs} at first. +@code{elmo-split-folder} a la @command{procmail} according to some +specified rules. To use this feature, set as follows in your +@file{~/.emacs} at first. @lisp (autoload 'elmo-split "elmo-split" "Split messages on the folder." t) @@ -6355,7 +6364,7 @@ example, please. ;; @r{Store messages from wanderlust mailing list into @samp{%wanderlust}} ;; @r{and continue evaluating following rules} ((equal x-ml-name "wanderlust") "%wanderlust" continue) - ;; @r{Store messages from Yahoo user into @samp{+yahoo-{username}}} + ;; @r{Store messages from Yahoo user into @samp{+yahoo-@{username@}}} ((match from "\\(.*\\)@@yahoo\\.com") "+yahoo-\\1") ;; @r{Store unmatched mails into @samp{+inbox}} @@ -6369,11 +6378,11 @@ The basic unit of the rule is a combination like (@samp{CONDITION} @samp{FOLDER} [@code{continue}]) @end lisp -The 1st element @samp{CONDITION} is a sexp. Its grammar will be -explained below. The 2nd element @samp{FOLDER} is the name of the folder -to split messages into. When the 3rd element @code{continue} is -specified as symbol, evaluating rules is not stopped even when the -condition is satisfied. +The 1st element @samp{CONDITION} is a balanced expression (sexp). Its +grammar will be explained below. The 2nd element @samp{FOLDER} is the +name of the folder to split messages into. When the 3rd element +@code{continue} is specified as symbol, evaluating rules is not stopped +even when the condition is satisfied. The grammar for @samp{CONDITION} is as follows. See example above to learn how to write the condition practically. diff --git a/elmo/ChangeLog b/elmo/ChangeLog index a391645..bb48c41 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -28,6 +28,18 @@ * elmo-filter.el (elmo-folder-diff): Use 'flag' instead of 'mark'. +2002-11-06 Yoichi NAKAYAMA + + * elmo-split.el (elmo-split-default-action): New variable. + (elmo-split-subr): Use it if all other conditions are passed. + Extend `fname' and rename it as `action'. (implemented + Teranishi-san's idea in [wl:10800]) + +2002-10-29 Yoichi NAKAYAMA + + * elmo-imap4.el: Remove Nemacs hack, replace `elmo-read' by `read'. + * elmo-util.el: Ditto. + 2002-10-26 Yuuichi Teranishi * elmo-version.el (elmo-version): Up to 2.11.0. diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index b3e62c7..c835591 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -716,43 +716,10 @@ Returns response value if selecting folder succeed. " "search %s") flag)) 'search))) -(static-cond - ((fboundp 'float) - ;; Emacs can parse dot symbol. - (defvar elmo-imap4-rfc822-size "RFC822\.SIZE") - (defvar elmo-imap4-rfc822-text "RFC822\.TEXT") - (defvar elmo-imap4-rfc822-header "RFC822\.HEADER") - (defvar elmo-imap4-rfc822-size "RFC822\.SIZE") - (defvar elmo-imap4-header-fields "HEADER\.FIELDS") - (defmacro elmo-imap4-replace-dot-symbols ()) ;; noop - (defalias 'elmo-imap4-fetch-read 'read) - ) - (t - ;;; For Nemacs. - ;; Cannot parse dot symbol. - (defvar elmo-imap4-rfc822-size "RFC822_SIZE") - (defvar elmo-imap4-header-fields "HEADER_FIELDS") - (defvar elmo-imap4-rfc822-size "RFC822_SIZE") - (defvar elmo-imap4-rfc822-text "RFC822_TEXT") - (defvar elmo-imap4-rfc822-header "RFC822_HEADER") - (defvar elmo-imap4-header-fields "HEADER_FIELDS") - (defun elmo-imap4-fetch-read (buffer) - (with-current-buffer buffer - (let ((beg (point)) - token) - (when (re-search-forward "[[ ]" nil t) - (goto-char (match-beginning 0)) - (setq token (buffer-substring beg (point))) - (cond ((string= token "RFC822.SIZE") - (intern elmo-imap4-rfc822-size)) - ((string= token "RFC822.HEADER") - (intern elmo-imap4-rfc822-header)) - ((string= token "RFC822.TEXT") - (intern elmo-imap4-rfc822-text)) - ((string= token "HEADER\.FIELDS") - (intern elmo-imap4-header-fields)) - (t (goto-char beg) - (elmo-read (current-buffer)))))))))) +(defvar elmo-imap4-rfc822-size "RFC822\.SIZE") +(defvar elmo-imap4-rfc822-text "RFC822\.TEXT") +(defvar elmo-imap4-rfc822-header "RFC822\.HEADER") +(defvar elmo-imap4-header-fields "HEADER\.FIELDS") (defun elmo-imap4-make-number-set-list (msg-list &optional chop-length) "Make RFC2060's message set specifier from MSG-LIST. @@ -855,7 +822,7 @@ If CHOP-LENGTH is not specified, message set is not chopped." (defun elmo-imap4-parse-capability (string) (if (string-match "^\\*\\(.*\\)$" string) - (elmo-read + (read (concat "(" (downcase (elmo-match-string 1 string)) ")")))) (defun elmo-imap4-clear-login (session) @@ -1319,11 +1286,11 @@ Return nil if no complete line has arrived." (defun elmo-imap4-parse-response () "Parse a IMAP command response." (let (token) - (case (setq token (elmo-read (current-buffer))) + (case (setq token (read (current-buffer))) (+ (progn (skip-chars-forward " ") (list 'continue-req (buffer-substring (point) (point-max))))) - (* (case (prog1 (setq token (elmo-read (current-buffer))) + (* (case (prog1 (setq token (read (current-buffer))) (elmo-imap4-forward)) (OK (elmo-imap4-parse-resp-text-code)) (NO (elmo-imap4-parse-resp-text-code)) @@ -1335,19 +1302,19 @@ Return nil if no complete line has arrived." (LSUB (list 'lsub (elmo-imap4-parse-data-list))) (SEARCH (list 'search - (elmo-read (concat "(" + (read (concat "(" (buffer-substring (point) (point-max)) ")")))) (STATUS (elmo-imap4-parse-status)) ;; Added (NAMESPACE (elmo-imap4-parse-namespace)) (CAPABILITY (list 'capability - (elmo-read + (read (concat "(" (downcase (buffer-substring (point) (point-max))) ")")))) (ACL (elmo-imap4-parse-acl)) - (t (case (prog1 (elmo-read (current-buffer)) + (t (case (prog1 (read (current-buffer)) (elmo-imap4-forward)) (EXISTS (list 'exists token)) (RECENT (list 'recent token)) @@ -1356,7 +1323,7 @@ Return nil if no complete line has arrived." (t (list 'garbage (buffer-string))))))) (t (if (not (string-match elmo-imap4-seq-prefix (symbol-name token))) (list 'garbage (buffer-string)) - (case (prog1 (elmo-read (current-buffer)) + (case (prog1 (read (current-buffer)) (elmo-imap4-forward)) (OK (progn (setq elmo-imap4-parsing nil) @@ -1415,9 +1382,9 @@ Return nil if no complete line has arrived." (cond ((search-forward "PERMANENTFLAGS " nil t) (list 'permanentflags (elmo-imap4-parse-flag-list))) ((search-forward "UIDNEXT " nil t) - (list 'uidnext (elmo-read (current-buffer)))) + (list 'uidnext (read (current-buffer)))) ((search-forward "UNSEEN " nil t) - (list 'unseen (elmo-read (current-buffer)))) + (list 'unseen (read (current-buffer)))) ((looking-at "UIDVALIDITY \\([0-9]+\\)") (list 'uidvalidity (match-string 1))) ((search-forward "READ-ONLY" nil t) @@ -1481,12 +1448,12 @@ Return nil if no complete line has arrived." (let (element list) (while (not (eq (char-after (point)) ?\))) (elmo-imap4-forward) - (let ((token (elmo-imap4-fetch-read (current-buffer)))) + (let ((token (read (current-buffer)))) (elmo-imap4-forward) (setq element (cond ((eq token 'UID) (list 'uid (condition-case nil - (elmo-read (current-buffer)) + (read (current-buffer)) (error nil)))) ((eq token 'FLAGS) (list 'flags (elmo-imap4-parse-flag-list))) @@ -1501,7 +1468,7 @@ Return nil if no complete line has arrived." ((eq token (intern elmo-imap4-rfc822-text)) (list 'rfc822text (elmo-imap4-parse-nstring))) ((eq token (intern elmo-imap4-rfc822-size)) - (list 'rfc822size (elmo-read (current-buffer)))) + (list 'rfc822size (read (current-buffer)))) ((eq token 'BODY) (if (eq (char-before) ?\[) (list @@ -1531,19 +1498,19 @@ Return nil if no complete line has arrived." (while (not (eq (char-after (point)) ?\))) (setq status (cons - (let ((token (elmo-read (current-buffer)))) + (let ((token (read (current-buffer)))) (cond ((eq token 'MESSAGES) - (list 'messages (elmo-read (current-buffer)))) + (list 'messages (read (current-buffer)))) ((eq token 'RECENT) - (list 'recent (elmo-read (current-buffer)))) + (list 'recent (read (current-buffer)))) ((eq token 'UIDNEXT) - (list 'uidnext (elmo-read (current-buffer)))) + (list 'uidnext (read (current-buffer)))) ((eq token 'UIDVALIDITY) (and (looking-at " \\([0-9]+\\)") (prog1 (list 'uidvalidity (match-string 1)) (goto-char (match-end 1))))) ((eq token 'UNSEEN) - (list 'unseen (elmo-read (current-buffer)))) + (list 'unseen (read (current-buffer)))) (t (message "Unknown status data %s in mailbox %s ignored" @@ -1570,9 +1537,9 @@ Return nil if no complete line has arrived." (nconc (copy-sequence elmo-imap4-extra-namespace-alist) (elmo-imap4-parse-namespace-subr - (elmo-read (concat "(" (buffer-substring - (point) (point-max)) - ")")))))) + (read (concat "(" (buffer-substring + (point) (point-max)) + ")")))))) (defun elmo-imap4-parse-namespace-subr (ns) (let (prefix delim namespace-alist default-delim) diff --git a/elmo/elmo-split.el b/elmo/elmo-split.el index 1038818..6dcd25d 100644 --- a/elmo/elmo-split.el +++ b/elmo/elmo-split.el @@ -43,7 +43,7 @@ (defcustom elmo-split-rule nil "Split rule for the command `elmo-split'. The format of this variable is a list of RULEs which has form like: -\(CONDITION FOLDER [continue]\) +\(CONDITION ACTION [continue]\) The 1st element CONDITION is a sexp which consists of following. @@ -71,7 +71,13 @@ FIELD-NAME is a symbol of the field name. When a symbol is specified, it is evaluated. -The 2nd element FOLDER is the name of the folder to split messages into. +The 2nd element ACTION is the name of the destination folder or some symbol. +If CONDITION is satisfied, the message is splitted according to this value. + +If ACTION is a string, it will be considered as the name of destination folder. +Symbol `delete' means that the substance of the message will be removed. On the +other hand, symbol `noop' is used to do nothing and keep the substance of the +message as it is. Or, if some function is specified, it will be called. When the 3rd element `continue' is specified as symbol, evaluating rules is not stopped even when the condition is satisfied. @@ -105,6 +111,14 @@ Example: (repeat (string :tag "folder name"))) :group 'elmo) +(defcustom elmo-split-default-action 'noop + "Default action for messages which pass all rules." + :type '(choice (const :tag "do not touch" noop) + (const :tag "delete" delete) + (string :tag "folder name") + (function :tag "function")) + :group 'elmo) + (defcustom elmo-split-log-coding-system 'x-ctext "A coding-system for writing log file." :type 'coding-system @@ -252,7 +266,9 @@ If prefix argument ARG is specified, do a reharsal (no harm)." (let ((elmo-inhibit-display-retrieval-progress t) (count 0) (fcount 0) - msgs fname target-folder failure) + (default-rule `((t ,elmo-split-default-action))) + msgs action target-folder failure delete-substance + record-log log-string) (message "Splitting...") (elmo-folder-open-internal folder) (setq msgs (elmo-folder-list-messages folder)) @@ -268,52 +284,96 @@ If prefix argument ARG is specified, do a reharsal (no harm)." nil (current-buffer) 'unread)) (setq elmo-split-message-entity (mime-parse-buffer)) (catch 'terminate - (dolist (rule elmo-split-rule) + (dolist (rule (append elmo-split-rule default-rule)) (setq elmo-split-match-string-internal nil) (when (elmo-split-eval (current-buffer) (car rule)) - (if elmo-split-match-string-internal - (setq fname (elmo-expand-newtext - (nth 1 rule) - elmo-split-match-string-internal)) - (setq fname (nth 1 rule))) + (if (and (stringp (nth 1 rule)) + elmo-split-match-string-internal) + (setq action (elmo-expand-newtext + (nth 1 rule) + elmo-split-match-string-internal)) + (setq action (nth 1 rule))) + ;; 1. ACTION & DELETION (unless reharsal - (setq failure nil) - (condition-case nil - (progn - (setq target-folder (elmo-make-folder fname)) - (unless (elmo-folder-exists-p target-folder) - (when - (and - (elmo-folder-creatable-p - target-folder) - (y-or-n-p - (format - "Folder %s does not exist, Create it? " - fname))) - (elmo-folder-create target-folder))) - (elmo-folder-open-internal target-folder) - (elmo-folder-append-buffer target-folder 'unread) - (elmo-folder-close-internal target-folder)) - (error (setq failure t) - (incf fcount))) - (unless failure + (setq failure nil + delete-substance nil + record-log nil + log-string nil) + (cond + ((stringp action) + (condition-case nil + (progn + (setq target-folder (elmo-make-folder action)) + (unless (elmo-folder-exists-p target-folder) + (when + (and + (elmo-folder-creatable-p target-folder) + (y-or-n-p + (format + "Folder %s does not exist, Create it? " + action))) + (elmo-folder-create target-folder))) + (elmo-folder-open-internal target-folder) + (elmo-folder-append-buffer target-folder 'unread) + (elmo-folder-close-internal target-folder)) + (error (setq failure t) + (incf fcount))) + (setq record-log t + delete-substance + (not (or failure + (eq (nth 2 rule) 'continue)))) + (incf count)) + ((eq action 'delete) + (setq record-log t + delete-substance t)) + ((eq action 'noop) + ;; do nothing + ) + ((functionp action) + (funcall action)) + (t + (error "Wrong action specified in elmo-split-rule"))) + (when delete-substance (ignore-errors - (elmo-folder-delete-messages folder (list msg)))) - (incf count)) - (elmo-split-log - (concat "From " - (nth 1 (std11-extract-address-components - (or (std11-field-body "from") ""))) - " " (or (std11-field-body "date") "") "\n" - " Subject: " - (eword-decode-string (or (std11-field-body - "subject") "")) - "\n" - (if reharsal - " Test: " - " Folder: ") - fname "/0" "\n") - reharsal) + (elmo-folder-delete-messages folder (list msg))))) + ;; 2. RECORD LOG + (when (or record-log + reharsal) + (elmo-split-log + (concat "From " + (nth 1 (std11-extract-address-components + (or (std11-field-body "from") ""))) + " " (or (std11-field-body "date") "") "\n" + " Subject: " + (eword-decode-string (or (std11-field-body + "subject") "")) + "\n" + (if reharsal + (cond + ((stringp action) + (concat " Test: " action "\n")) + ((eq action 'delete) + " Test: /dev/null\n") + ((eq action 'noop) + " Test: do nothing\n") + ((function action) + (format " Test: function:%s\n" + (symbol-name action))) + (t + " ERROR: wrong action specified\n")) + (cond + (failure + (concat " FAILED: " action "\n")) + ((stringp action) + (concat " Folder: " action "\n")) + ((eq action 'delete) + " Deleted\n") + (log-string + log-string) + (t + (debug))))) + reharsal)) + ;; 3. CONTINUATION CHECK (unless (eq (nth 2 rule) 'continue) (throw 'terminate nil)))))) (elmo-progress-notify 'elmo-split))) diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 7d5a1de..9690154 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -75,8 +75,6 @@ (filename newname &optional ok-if-already-exists) (copy-file filename newname ok-if-already-exists t))) -(defalias 'elmo-read 'read) - (defmacro elmo-set-work-buf (&rest body) "Execute BODY on work buffer. Work buffer remains." (` (save-excursion @@ -269,7 +267,7 @@ Return value is a cons cell of (STRUCTURE . REST)" (defun elmo-condition-parse-search-value () (cond ((looking-at "\"") - (elmo-read (current-buffer))) + (read (current-buffer))) ((or (looking-at "yesterday") (looking-at "lastweek") (looking-at "lastmonth") (looking-at "lastyear") (looking-at "[0-9]+ *daysago") diff --git a/tests/ChangeLog b/tests/ChangeLog index a3a9854..58d1ae9 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2002-10-27 TAKAHASHI Kaoru + + * test-dist.el (test-version-readme): New testcase. + (test-wl-demo-copyright-notice): Ditto. + 2002-10-24 TAKAHASHI Kaoru * check-modules.el (check-modules-flim-content-transfer-encoding): diff --git a/tests/test-dist.el b/tests/test-dist.el index 91a98f6..9e51553 100644 --- a/tests/test-dist.el +++ b/tests/test-dist.el @@ -137,3 +137,29 @@ (string= (product-code-name (product-find 'wl-version)) (match-string 2)))))) + +;; README, README.ja (toplevel) +(luna-define-method test-version-readme ((case test-dist)) + (require 'wl-version) + (when (string= (wl-version-status) "stable") + (mapc + (lambda (file) + (with-temp-buffer + (insert-file-contents (expand-file-name file "./")) + (re-search-forward "checkout -r wl-\\([0-9]+\\)_\\([0-9]+\\) wanderlust") + (lunit-assert + (= (string-to-number (match-string 1)) + (nth 0 (product-version (product-find 'wl-version))))) + (lunit-assert + (= (string-to-number (match-string 2)) + (nth 1 (product-version (product-find 'wl-version))))))) + '("README" "README.ja")))) + +;; copyright notice (beta only) +(luna-define-method test-wl-demo-copyright-notice ((case test-dist)) + (require 'wl-demo) + (when (string= (wl-version-status) "beta") + (lunit-assert + (string-match + (format-time-string "%Y" (current-time)) + wl-demo-copyright-notice)))) diff --git a/wl/ChangeLog b/wl/ChangeLog index ff0d4cc..44505b6 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,7 +1,18 @@ -2002-10-29 Yuuichi Teranishi +2002-11-07 Yuuichi Teranishi - * wl-message.el (wl-message-get-original-buffer): Avoid - 'Selecting deleted buffer' error when original buffer is killed. + * wl-summary.el (wl-summary-reply): Don't treat switch buffer here. + (wl-summary-forward): Ditto. + + * wl-vars.el (wl-draft-buffer-style): Added choice of keep and + function. + (wl-draft-buffer-style): New use option. + + * wl-draft.el (wl-draft-create-buffer): Abolish argument `full'. + (wl-draft): Follow the change above. + (wl-draft-create-buffer): Use wl-draft-reply-buffer-style and + wl-draft-buffer-style. + (wl-user-agent-compose): Bind wl-draft-buffer-style with + switch-function. 2002-10-28 Yuuichi Teranishi @@ -31,6 +42,20 @@ wl-message-buffer-prefetch-move-spec-unplugged-alist): Abolish. (wl-message-buffer-prefetch-get-next): Follow the change above. +2002-11-01 Tomotaka SUWA + + * wl-address.el (wl-address-make-completion-entry): Extracted from + `wl-address-make-completion-list'. + (wl-address-enable-strict-loading): New variable. + (wl-address-make-completion-list): Revive petname duplication + inquiry, and enable it if `wl-address-enable-strict-loading'. + (Note: this should be fixed in future. Ref: [wl:10773],[wl:10455]) + +2002-10-29 Yuuichi Teranishi + + * wl-message.el (wl-message-get-original-buffer): Avoid + 'Selecting deleted buffer' error when original buffer is killed. + 2002-10-26 Yuuichi Teranishi * wl-version.el (wl-version): Changed codename. diff --git a/wl/wl-address.el b/wl/wl-address.el index 2ca14ba..dfa2a72 100644 --- a/wl/wl-address.el +++ b/wl/wl-address.el @@ -46,6 +46,7 @@ (defvar wl-address-list nil) (defvar wl-address-completion-list nil) (defvar wl-address-petname-hash nil) +(defvar wl-address-enable-strict-loading t) (defvar wl-address-ldap-search-hash nil) @@ -288,28 +289,33 @@ Matched address lists are append to CL." (setq addr-tuple (car address-list)) (setq cl (cons - (cons (nth 0 addr-tuple) - (if (or (string= (nth 2 addr-tuple) "") - (string-match ".*:.*;$" (nth 0 addr-tuple))) - (nth 0 addr-tuple) - (concat - (wl-address-quote-specials - (nth 2 addr-tuple)) " <"(nth 0 addr-tuple)">"))) + (wl-address-make-completion-entry 0 addr-tuple) cl)) ;; nickname completion. - (setq cl - (cons - (cons (nth 1 addr-tuple) - (if (or (string= (nth 2 addr-tuple) "") - (string-match ".*:.*;$" (nth 0 addr-tuple))) - (nth 0 addr-tuple) - (concat - (wl-address-quote-specials - (nth 2 addr-tuple)) " <"(nth 0 addr-tuple)">"))) - cl)) + (if wl-address-enable-strict-loading + (unless (or (equal (nth 1 addr-tuple) (nth 0 addr-tuple)) + ;; already exists + (assoc (nth 1 addr-tuple) cl)) + (setq cl + (cons + (wl-address-make-completion-entry 1 addr-tuple) + cl))) + (setq cl + (cons + (wl-address-make-completion-entry 1 addr-tuple) + cl))) (setq address-list (cdr address-list))) cl)) +(defun wl-address-make-completion-entry (index addr-tuple) + (cons (nth index addr-tuple) + (if (or (string= (nth 2 addr-tuple) "") + (string-match ".*:.*;$" (nth 0 addr-tuple))) + (nth 0 addr-tuple) + (concat + (wl-address-quote-specials + (nth 2 addr-tuple)) " <"(nth 0 addr-tuple)">")))) + (defun wl-complete-field-body-or-tab () (interactive) (let ((case-fold-search t) diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 9f57c69..c1fbc2e 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1571,13 +1571,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (let (buf-name header-alist-internal) (setq buf-name - (wl-draft-create-buffer - (or - (eq this-command 'wl-draft) - (eq this-command 'wl-summary-write) - (eq this-command 'wl-summary-write-current-folder) - (eq this-command 'wl-folder-write-current-folder)) - parent-folder)) + (wl-draft-create-buffer parent-folder)) (unless (cdr (assq 'From header-alist)) (setq header-alist @@ -1619,11 +1613,13 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (goto-char (point-max)))) buf-name)) -(defun wl-draft-create-buffer (&optional full parent-folder) +(defun wl-draft-create-buffer (&optional parent-folder) (let* ((draft-folder (wl-folder-get-elmo-folder wl-draft-folder)) (parent-folder (or parent-folder (wl-summary-buffer-folder-name))) (summary-buf (wl-summary-get-buffer parent-folder)) - buf-name file-name num change-major-mode-hook) + buf-name file-name num change-major-mode-hook + (reply-or-forward (or (eq this-command 'wl-summary-reply) + (eq this-command 'wl-summary-forward)))) (if (not (elmo-folder-message-file-p draft-folder)) (error "%s folder cannot be used for draft folder" wl-draft-folder)) (setq num (elmo-max-of-list @@ -1637,16 +1633,46 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (elmo-message-file-name (wl-folder-get-elmo-folder wl-draft-folder) num)))) + ;; switch-buffer according to draft buffer style. (if wl-draft-use-frame (switch-to-buffer-other-frame buf-name) - (switch-to-buffer buf-name)) + (if reply-or-forward + (case wl-draft-reply-buffer-style + (split + (split-window-vertically) + (other-window 1) + (switch-to-buffer buf-name)) + (keep + (switch-to-buffer buf-name)) + (full + (delete-other-windows) + (switch-to-buffer buf-name)) + (t + (if (functionp wl-draft-reply-buffer-style) + (funcall wl-draft-reply-buffer-style buf-name) + (error "Invalid value for wl-draft-reply-buffer-style")))) + (case wl-draft-buffer-style + (split + (when (and (eq major-mode 'wl-summary-mode) + wl-message-buffer + (buffer-live-p wl-message-buffer) + (get-buffer-window wl-message-buffer)) + (delete-window (get-buffer-window wl-message-buffer))) + (split-window-vertically) + (other-window 1) + (switch-to-buffer buf-name)) + (keep + (switch-to-buffer buf-name)) + (full + (delete-other-windows) + (switch-to-buffer buf-name)) + (t (if (functionp wl-draft-buffer-style) + (funcall wl-draft-buffer-style buf-name) + (error "Invalid value for wl-draft-buffer-style")))))) (set-buffer buf-name) (if (not (string-match (regexp-quote wl-draft-folder) (buffer-name))) (rename-buffer (concat wl-draft-folder "/" (int-to-string num)))) - (if (or (eq wl-draft-reply-buffer-style 'full) - full) - (delete-other-windows)) (auto-save-mode -1) (wl-draft-mode) (make-local-variable 'truncate-partial-width-windows) @@ -2386,7 +2412,7 @@ been implemented yet. Partial support for SWITCH-FUNCTION now supported." ;; to be necessary to protect the values used w/in (let ((wl-user-agent-headers-and-body-alist other-headers) (wl-draft-use-frame (eq switch-function 'switch-to-buffer-other-frame)) - (wl-draft-reply-buffer-style 'split)) + (wl-draft-buffer-style switch-function)) (when (eq switch-function 'switch-to-buffer-other-window) (when (one-window-p t) (if (window-minibuffer-p) (other-window 1)) diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 2c50613..c0628af 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -811,7 +811,7 @@ Optional argument ARG is repeart count." (t (message "Uncheck(unplugged) \"%s\"" entity))))) (if ret-val - (message "Checking \"%s\" is done." + (message "Checking \"%s\" is done" (if (consp entity) (car entity) entity))) (run-hooks 'wl-folder-check-entity-hook) ret-val)) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index a6db657..f64734b 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -4773,9 +4773,6 @@ Reply to author if invoked with ARG." (wl-message-select-buffer wl-message-buffer) (set-buffer mes-buf) (goto-char (point-min)) - (unless wl-draft-use-frame - (split-window-vertically) - (other-window 1)) (when (setq mes-buf (wl-message-get-original-buffer)) (wl-draft-reply mes-buf arg summary-buf number) (unless without-setup-hook @@ -4847,9 +4844,6 @@ Use function list is `wl-summary-write-current-folder-functions'." (wl-summary-redisplay-internal folder number)) (setq mes-buf wl-message-buffer) (wl-message-select-buffer mes-buf) - (unless wl-draft-use-frame - (split-window-vertically) - (other-window 1)) ;; get original subject. (if summary-buf (save-excursion diff --git a/wl/wl-vars.el b/wl/wl-vars.el index e416b2d..e4cbe0b 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1200,10 +1200,26 @@ See also variable `wl-draft-parent-folder'." :group 'wl-draft :group 'wl-pref) +(defcustom wl-draft-buffer-style 'full + "Style of draft buffer except for `wl-summary-reply' and `wl-summary-forward' +'keep is to use current window, 'full is to use full frame window and +'split is to split current window. +If it is a function, it is called with the draft buffer as an argument." + :type '(choice (const :tag "Keep window" keep) + (const :tag "Split window" split) + (const :tag "Full window"full) + (sexp :tag "Use Function")) + :group 'wl-draft) + (defcustom wl-draft-reply-buffer-style 'split - "'split or 'full." - :type '(radio (const split) - (const full)) + "Style of draft buffer for `wl-summary-reply' and `wl-summary-forward' +'keep is to use message buffer window, 'full is to use full frame window and +'split is to split message buffer window. +If it is a function, it is called with the draft buffer as an argument." + :type '(choice (const :tag "Keep window" keep) + (const :tag "Split window" split) + (const :tag "Full window"full) + (sexp :tag "Use Function")) :group 'wl-draft) (defcustom wl-draft-queue-save-variables