From 0d45dddbf533d117b7d04c311633b77172251d6d Mon Sep 17 00:00:00 2001 From: teranisi Date: Thu, 17 Oct 2002 23:59:58 +0000 Subject: [PATCH] Synch up with main trunk with a little modification. * wl-summary.el (wl-summary-make-number-list): Initialize. (wl-summary-update-mark): New function. (wl-summary-reply): Put `answered' mark on the message. (wl-summary-reply): Set `number' argument to wl-draft-reply. * wl-draft.el (wl-draft-parent-number): New buffer local variable. (wl-draft-reply): Added optional argument `number'; Set wl-draft-parent-number. (wl-draft-kill): Delete answered mark if it is a reply. --- NEWS | 2 ++ NEWS.ja | 2 ++ doc/TODO | 2 +- doc/TODO.ja | 2 +- elmo/ChangeLog | 5 +++++ utils/ChangeLog | 2 +- wl/ChangeLog | 24 ++++++++++++++++++++++++ wl/wl-draft.el | 13 ++++++++++++- wl/wl-mime.el | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ wl/wl-summary.el | 20 ++++++++++++++++++-- 10 files changed, 116 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index a493666..f05ea91 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ Wanderlust NEWS -- User-visible changes in Wanderlust. ** Save format for the draft folder has been changed. Messages are encoded before saved by wl-draft-save. +** elmo-split is newly established. + ** Buffer prefetch works fine now. Messages of the number specified by wl-message-buffer-prefetch-depth are loaded into buffer in advance. diff --git a/NEWS.ja b/NEWS.ja index 37e58e2..99efa99 100644 --- a/NEWS.ja +++ b/NEWS.ja @@ -7,6 +7,8 @@ Wanderlust NEWS (日本語版) -- User-visible changes in Wanderlust. ** ドラフトフォルダへの保存形式が変更されました。wl-draft-save の際には エンコードして保存されます。 +** elmo-split が新設されました。 + ** バッファプリフェッチが実装されました。wl-message-buffer-prefetch-depth の数だけ、メッセージをバッファに先読みします。 diff --git a/doc/TODO b/doc/TODO index 0d79304..47fb924 100644 --- a/doc/TODO +++ b/doc/TODO @@ -16,5 +16,5 @@ ** organize optional setting for pipe folders to download messages at once when one checks new messages ** support for rfc2192, rfc2193, rfc2221 (managing imap referral) -** deletion of attached file part in received mail +** cite region and insert into the draft ** putting codes in order diff --git a/doc/TODO.ja b/doc/TODO.ja index 346ef18..2e92259 100644 --- a/doc/TODO.ja +++ b/doc/TODO.ja @@ -17,5 +17,5 @@ ** パイプフォルダに、新規メールチェック時にダウンロードまでやってしまう オプションを設ける ** rfc2192, rfc2193, rfc2221 (imap referral の処理) への対応 -** 受け取ったメールの添付ファイル部分を削除できるようにする +** リージョンをドラフトへ引用できるようにする ** コードの整理 diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 5a91f61..7a3bb1d 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -3,6 +3,11 @@ * elmo-filter.el (elmo-folder-diff): Fixed condition checking `last:' filter. +2002-10-12 Yoichi NAKAYAMA + + * elmo-dop.el (elmo-folder-status-dop): If spool-folder is absent, + set spool-length to 0. + 2002-10-06 Hiroya Murata * elmo-dop.el (elmo-dop-queue-flush): Check obsolete at first. diff --git a/utils/ChangeLog b/utils/ChangeLog index 1fcc913..5983303 100644 --- a/utils/ChangeLog +++ b/utils/ChangeLog @@ -3,7 +3,7 @@ * bbdb-wl.el (bbdb-wl-get-addresses-1): Call `bbdb-wl-canonicalize-full-name-function' after decoding full-name string. - * bbdb-wl.el (bbdb-wl-get-addresses-2): Ditto. + (bbdb-wl-get-addresses-2): Ditto. 2002-09-05 TAKAHASHI Kaoru diff --git a/wl/ChangeLog b/wl/ChangeLog index cf0b3ac..b23b5c6 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,27 @@ +2002-10-18 Yuuichi Teranishi + + * wl-summary.el (wl-summary-make-number-list): Initialize. + (wl-summary-update-mark): New function. + (wl-summary-reply): Put `answered' mark on the message. + (wl-summary-reply): Set `number' argument to wl-draft-reply. + + * wl-draft.el (wl-draft-parent-number): New buffer local variable. + (wl-draft-reply): Added optional argument `number'; + Set wl-draft-parent-number. + (wl-draft-kill): Delete answered mark if it is a reply. + +2002-10-16 Yoichi NAKAYAMA + + * wl-mime.el (wl-message-delete-current-part): New function. + (wl-mime-node-id-to-string): Ditto. + + * wl-mime.el (wl-message-delete-current-part): Use existing + original buffer which corresponds current mime-view buffer. + (fetched buffer might have different structure, possibly) + + * wl-mime.el (wl-message-delete-current-part): Quit if the + message content differs from the actual message. + 2002-10-12 Yuuichi Teranishi * wl-summary.el (wl-summary-insert-headers): Put alike hash in reverse diff --git a/wl/wl-draft.el b/wl/wl-draft.el index e6f99e2..904a411 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -87,6 +87,8 @@ e.g. ((string-match \".*@domain2$\" wl-draft-parent-folder) (\"From\" . \"user@domain2\"))))") +(defvar wl-draft-parent-number nil) + (defvar wl-draft-config-sub-func-alist '((body . wl-draft-config-sub-body) (top . wl-draft-config-sub-top) @@ -112,6 +114,7 @@ e.g. (make-variable-buffer-local 'wl-draft-fcc-list) (make-variable-buffer-local 'wl-draft-reply-buffer) (make-variable-buffer-local 'wl-draft-parent-folder) +(make-variable-buffer-local 'wl-draft-parent-number) (defsubst wl-smtp-password-key (user mechanism server) (format "SMTP:%s/%s@%s" @@ -321,7 +324,7 @@ Check WITH-ARG and From: field." 'wl-draft-reply-with-argument-list 'wl-draft-reply-without-argument-list))) -(defun wl-draft-reply (buf with-arg summary-buf) +(defun wl-draft-reply (buf with-arg summary-buf &optional number) "Reply to BUF buffer message. Reply to author if WITH-ARG is non-nil." ;;;(save-excursion @@ -469,6 +472,7 @@ Reply to author if WITH-ARG is non-nil." (cons 'References references) (cons 'Mail-Followup-To mail-followup-to)) nil nil nil nil parent-folder) + (setq wl-draft-parent-number number) (setq wl-draft-reply-buffer buf)) (run-hooks 'wl-reply-hook)) @@ -771,6 +775,13 @@ Reply to author if WITH-ARG is non-nil." (or force-kill (y-or-n-p "Kill Current Draft? "))) (let ((cur-buf (current-buffer))) + (when wl-draft-parent-number + (let ((number wl-draft-parent-number)) + (with-current-buffer wl-draft-buffer-cur-summary-buffer + (wl-summary-jump-to-msg number) + (elmo-folder-unmark-answered wl-summary-buffer-elmo-folder + (list number)) + (wl-summary-update-mark number)))) (wl-draft-hide cur-buf) (wl-draft-delete cur-buf))) (message ""))) diff --git a/wl/wl-mime.el b/wl/wl-mime.el index 7f09b26..0b2a59d 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -166,6 +166,56 @@ By setting following-method as yank-content." (defalias 'wl-message-button-dispatcher-internal 'mime-button-dispatcher) +(defsubst wl-mime-node-id-to-string (node-id) + (if (consp node-id) + (mapconcat (function (lambda (num) (format "%s" (1+ num)))) + (reverse node-id) + ".") + "0")) + +(defun wl-message-delete-current-part () + "Delete a part under the cursor from the multipart message." + (interactive) + (let* ((entity (get-text-property (point) 'mime-view-entity)) + (node-id (mime-entity-node-id entity)) + (header-start (mime-buffer-entity-header-start-internal entity)) + (body-end (mime-buffer-entity-body-end-internal entity)) + (folder (wl-folder-get-elmo-folder wl-message-buffer-cur-folder)) + (number wl-message-buffer-cur-number) + (msgid (elmo-message-field folder number 'message-id)) + (orig-buf wl-message-buffer-original-buffer)) + (with-current-buffer orig-buf + (unless (string-equal + (buffer-string) + (elmo-message-fetch folder number + (elmo-make-fetch-strategy 'entire))) + (error "Buffer content differs from actual message"))) + (when (and (elmo-folder-writable-p folder) + (buffer-live-p orig-buf) + node-id + (yes-or-no-p + (format "Do you really want to delete part %s? " + (wl-mime-node-id-to-string node-id)))) + (with-temp-buffer + (insert-buffer orig-buf) + (kill-region header-start body-end) + (goto-char header-start) + (insert "Content-Type: text/plain; charset=US-ASCII\n\n") + (insert "** This part has been removed by Wanderlust **\n\n") + (elmo-folder-append-buffer folder t)) + + (elmo-folder-append-messages + (wl-folder-get-elmo-folder wl-trash-folder) + folder (list number) nil) + (elmo-folder-delete-messages folder (list number)) + + (when (file-exists-p (elmo-cache-get-path msgid)) + (delete-file (elmo-cache-get-path msgid))) + + (mime-preview-quit) + (wl-summary-toggle-disp-msg 'off) + (wl-summary-sync nil "update")))) + ;;; Summary (defun wl-summary-burst-subr (message-entity target number) ;; returns new number. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 6b01c98..0214481 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1848,7 +1848,7 @@ If ARG is non-nil, checking is omitted." nil t nil nil (symbol-name wl-summary-default-sort-spec)))) (defun wl-summary-sync-marks () - "Update marks in summary." + "Update persistent marks in summary." (interactive) (let ((last-progress 0) (folder wl-summary-buffer-elmo-folder) @@ -2329,6 +2329,7 @@ If ARG, without confirm." (defun wl-summary-make-number-list () (save-excursion (goto-char (point-min)) + (setq wl-summary-buffer-number-list nil) (while (not (eobp)) (setq wl-summary-buffer-number-list (cons (wl-summary-message-number) @@ -3864,6 +3865,19 @@ If ARG, exit virtual folder." (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)) + ;; 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 nil nil t)) + (set-buffer-modified-p nil))) + (defun wl-summary-mark-as-read (&optional number no-folder-mark no-modeline-update) @@ -4763,6 +4777,8 @@ Reply to author if invoked with ARG." (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) @@ -4771,7 +4787,7 @@ Reply to author if invoked with ARG." (split-window-vertically) (other-window 1)) (when (setq mes-buf (wl-message-get-original-buffer)) - (wl-draft-reply mes-buf arg summary-buf) + (wl-draft-reply mes-buf arg summary-buf number) (unless without-setup-hook (run-hooks 'wl-mail-setup-hook))) t))) -- 1.7.10.4