From 8e1dbe7254ba4b6b19a798f9f1e087ac2e6aff4d Mon Sep 17 00:00:00 2001 From: teranisi Date: Sat, 9 Nov 2002 02:56:13 +0000 Subject: [PATCH] Synch up with main trunk. --- elmo/ChangeLog | 30 +++++++++++-------- elmo/elmo-maildir.el | 5 +++- wl/ChangeLog | 78 +++++++++++++++++++++++++++++++++++++++++--------- wl/wl-draft.el | 42 +++++++++++++++++++-------- wl/wl-summary.el | 40 ++++++++++++++++++++------ wl/wl-vars.el | 4 +-- 6 files changed, 150 insertions(+), 49 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index bb48c41..6e7158b 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,21 @@ +2002-11-08 Yuuichi Teranishi + + * elmo-maildir.el (elmo-maildir-update-current): Don't append + info part to the cur files when the new files already have it. + (Adviced by Jared Rhine ) + +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-28 Yuuichi Teranishi * elmo.el (elmo-message-accessible-p): Renamed from @@ -28,18 +46,6 @@ * 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-maildir.el b/elmo/elmo-maildir.el index f3e7ae7..583b39a 100644 --- a/elmo/elmo-maildir.el +++ b/elmo/elmo-maildir.el @@ -213,7 +213,10 @@ LOCATION." (while news (rename-file (expand-file-name (car news) (expand-file-name "new" maildir)) - (expand-file-name (concat (car news) ":2,") + (expand-file-name (concat + (car news) + (unless (string-match ":2,[A-Z]*$" (car news)) + ":2,")) (expand-file-name "cur" maildir))) (setq news (cdr news))))) diff --git a/wl/ChangeLog b/wl/ChangeLog index bee6849..9dffe4d 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,53 @@ +2002-11-09 Yuuichi Teranishi + + * wl-draft.el (wl-draft-create-buffer): Cosmetic fix. + (wl-draft-insert-mail-header-separator): Return the body beginning + point. + (wl-draft-reedit): Remove the mime-edit tag if the first part is + text/plain. + +2002-11-08 Yoichi NAKAYAMA + + * wl-summary.el (wl-summary-erase): New function to erase message + without moving it to trash. Bind to "D". + + * wl-draft.el (wl-user-agent-compose): Set wl-draft-buffer-style + as `keep' unless switch-function. + +2002-11-07 Yoichi NAKAYAMA + + * wl-draft.el (wl-draft-create-buffer): Rewrite the part to hide + message buffer by using `wl-summary-toggle-disp-msg'. + * wl-summary.el (wl-summary-resend-bounced-mail): Hide message + buffer window. + (wl-summary-supresedes-message): Ditto. + + * wl-summary.el (wl-summary-reedit): Hide message buffer window. + Do not delete other windows. + * wl-draft.el (wl-draft-edit-string): Do not delete other windows. + (wl-draft-reedit): Switch buffer with `wl-draft-buffer-style'. + (wl-draft-create-buffer): Set reply-or-forward also for target + mark commands. + +2002-11-07 Yuuichi Teranishi + + * wl-draft.el (wl-user-agent-compose): Delete special case for + switch-to-buffer-other-window. + + * 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-11-07 Yuuichi Teranishi * wl-draft.el (wl-user-agent-compose): Delete special case for @@ -17,6 +67,20 @@ (wl-user-agent-compose): Bind wl-draft-buffer-style with switch-function. +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-28 Yuuichi Teranishi * wl-summary.el (wl-summary-next-message): Use @@ -45,20 +109,6 @@ 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-draft.el b/wl/wl-draft.el index 894eb81..2e45097 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -630,7 +630,6 @@ Reply to author if WITH-ARG is non-nil." (buffer-substring (point) (point-max)) 'edit-again)) (and to (mail-position-on-field "To")) - (delete-other-windows) (kill-buffer tmp-buf))) (run-hooks 'wl-draft-reedit-hook)) @@ -1617,9 +1616,12 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (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 - (reply-or-forward (or (eq this-command 'wl-summary-reply) - (eq this-command 'wl-summary-forward)))) + (reply-or-forward + (or (eq this-command 'wl-summary-reply) + (eq this-command 'wl-summary-forward) + (eq this-command 'wl-summary-target-mark-forward) + (eq this-command 'wl-summary-target-mark-reply-with-citation))) + buf-name file-name num change-major-mode-hook) (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 @@ -1653,11 +1655,8 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (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))) + (when (eq major-mode 'wl-summary-mode) + (wl-summary-toggle-disp-msg 'off)) (split-window-vertically) (other-window 1) (switch-to-buffer buf-name)) @@ -1835,7 +1834,8 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (progn (insert mail-header-separator "\n") (1- (point))) - 'category 'mail-header-separator))) + 'category 'mail-header-separator) + (point))) ;;;;;;;;;;;;;;;; @@ -1909,16 +1909,32 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (switch-to-buffer buffer)) (set-buffer buffer)) (setq buffer (get-buffer-create (number-to-string number))) + ;; switch-buffer according to draft buffer style. (if wl-draft-use-frame (switch-to-buffer-other-frame buffer) - (switch-to-buffer buffer)) + (case wl-draft-buffer-style + (split + (split-window-vertically) + (other-window 1) + (switch-to-buffer buffer)) + (keep + (switch-to-buffer buffer)) + (full + (delete-other-windows) + (switch-to-buffer buffer)) + (t (if (functionp wl-draft-buffer-style) + (funcall wl-draft-buffer-style buf-name) + (error "Invalid value for wl-draft-buffer-style"))))) (set-buffer buffer) (setq wl-draft-parent-folder "") (insert-file-contents-as-binary file-name) (let((mime-edit-again-ignored-field-regexp "^\\(Content-.*\\|Mime-Version\\):")) (wl-draft-decode-message-in-buffer)) - (wl-draft-insert-mail-header-separator) + (goto-char (wl-draft-insert-mail-header-separator)) + ;; If the first part is text/plain, the mime-edit tag is useless. + (if (looking-at "^--\\[\\[text/plain\\]\\]") + (delete-region (point-at-bol)(1+ (point-at-eol)))) (if (not (string-match (regexp-quote wl-draft-folder) (buffer-name))) (rename-buffer (concat wl-draft-folder "/" (buffer-name)))) @@ -2408,6 +2424,8 @@ been implemented yet. Partial support for SWITCH-FUNCTION now supported." (unless (featurep 'wl) (require 'wl)) + (or switch-function + (setq switch-function 'keep)) ;; protect these -- to and subject get bound at some point, so it looks ;; to be necessary to protect the values used w/in (let ((wl-user-agent-headers-and-body-alist other-headers) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index f64734b..00cf296 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -401,7 +401,6 @@ See also variable `wl-use-petname'." (define-key wl-summary-mode-map "g" 'wl-summary-goto-folder) (define-key wl-summary-mode-map "G" 'wl-summary-goto-folder-sticky) (define-key wl-summary-mode-map "c" 'wl-summary-mark-as-read-all) -; (define-key wl-summary-mode-map "D" 'wl-summary-drop-unsync) (define-key wl-summary-mode-map "a" 'wl-summary-reply) (define-key wl-summary-mode-map "A" 'wl-summary-reply-with-citation) @@ -471,6 +470,7 @@ See also variable `wl-use-petname'." (define-key wl-summary-mode-map "d" 'wl-summary-delete) (define-key wl-summary-mode-map "u" 'wl-summary-unmark) (define-key wl-summary-mode-map "U" 'wl-summary-unmark-all) + (define-key wl-summary-mode-map "D" 'wl-summary-erase) ;; thread commands (define-key wl-summary-mode-map "t" (make-sparse-keymap)) @@ -601,16 +601,15 @@ If optional USE-CACHE is non-nil, use cache if exists." "Re-edit current message. If ARG is non-nil, Supersedes message" (interactive "P") + (wl-summary-toggle-disp-msg 'off) (if arg (wl-summary-supersedes-message) (if (string= (wl-summary-buffer-folder-name) wl-draft-folder) - (if (wl-summary-message-number) - (progn - (wl-draft-reedit (wl-summary-message-number)) - (if (wl-message-news-p) - (mail-position-on-field "Newsgroups") - (mail-position-on-field "To")) - (delete-other-windows))) + (when (wl-summary-message-number) + (wl-draft-reedit (wl-summary-message-number)) + (if (wl-message-news-p) + (mail-position-on-field "Newsgroups") + (mail-position-on-field "To"))) (wl-draft-edit-string (wl-summary-message-string))))) (defun wl-summary-resend-bounced-mail () @@ -619,6 +618,7 @@ This only makes sense if the current message is a bounce message which contains some mail you have written but has been bounced back to you." (interactive) + (wl-summary-toggle-disp-msg 'off) (save-excursion (wl-summary-set-message-buffer-or-redisplay) (set-buffer (wl-message-get-original-buffer)) @@ -3054,6 +3054,29 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." "") ".")))))) +(defun wl-summary-erase (&optional number) + "Erase message actually, without moving it to trash." + (interactive) + (if (elmo-folder-writable-p wl-summary-buffer-elmo-folder) + (let* ((buffer-num (wl-summary-message-number)) + (msg-num (or number buffer-num))) + (if (null msg-num) + (message "No message.") + (let* ((msgdb (wl-summary-buffer-msgdb)) + (entity (elmo-msgdb-overview-get-entity msg-num msgdb)) + (subject (elmo-delete-char + ?\n (or (elmo-msgdb-overview-entity-get-subject + entity) + wl-summary-no-subject-message)))) + (when (yes-or-no-p + (format "Erase \"%s\" without moving it to trash? " + (truncate-string subject 30))) + (wl-summary-unmark msg-num) + (elmo-folder-delete-messages wl-summary-buffer-elmo-folder + (list msg-num)) + (save-excursion (wl-summary-sync nil "update")))))) + (message "Read-only folder."))) + (defun wl-summary-read-folder (default &optional purpose ignore-error no-create init) (let ((fld (completing-read @@ -5220,6 +5243,7 @@ If ASK-CODING is non-nil, coding-system for the message is asked." (defun wl-summary-supersedes-message () "Supersede current message." (interactive) + (wl-summary-toggle-disp-msg 'off) (let ((summary-buf (current-buffer)) message-buf from) (wl-summary-set-message-buffer-or-redisplay) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index e4cbe0b..5417a84 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1207,7 +1207,7 @@ See also variable `wl-draft-parent-folder'." 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) + (const :tag "Full window" full) (sexp :tag "Use Function")) :group 'wl-draft) @@ -1218,7 +1218,7 @@ If it is a function, it is called with the draft buffer as an argument." 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) + (const :tag "Full window" full) (sexp :tag "Use Function")) :group 'wl-draft) -- 1.7.10.4