Synch up with main trunk with a little modification.
authorteranisi <teranisi>
Thu, 17 Oct 2002 23:59:58 +0000 (23:59 +0000)
committerteranisi <teranisi>
Thu, 17 Oct 2002 23:59:58 +0000 (23:59 +0000)
* 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
NEWS.ja
doc/TODO
doc/TODO.ja
elmo/ChangeLog
utils/ChangeLog
wl/ChangeLog
wl/wl-draft.el
wl/wl-mime.el
wl/wl-summary.el

diff --git a/NEWS b/NEWS
index a493666..f05ea91 100644 (file)
--- 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 (file)
--- a/NEWS.ja
+++ b/NEWS.ja
@@ -7,6 +7,8 @@ Wanderlust NEWS (\e$BF|K\8lHG\e(B) -- User-visible changes in Wanderlust.
 ** \e$B%I%i%U%H%U%)%k%@$X$NJ]B87A<0$,JQ99$5$l$^$7$?!#\e(Bwl-draft-save \e$B$N:]$K$O\e(B
    \e$B%(%s%3!<%I$7$FJ]B8$5$l$^$9!#\e(B
 
+** elmo-split \e$B$,?7@_$5$l$^$7$?!#\e(B
+
 ** \e$B%P%C%U%!%W%j%U%'%C%A$,<BAu$5$l$^$7$?!#\e(Bwl-message-buffer-prefetch-depth
    \e$B$N?t$@$1!"%a%C%;!<%8$r%P%C%U%!$K@hFI$_$7$^$9!#\e(B
 
index 0d79304..47fb924 100644 (file)
--- 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
index 346ef18..2e92259 100644 (file)
@@ -17,5 +17,5 @@
 ** \e$B%Q%$%W%U%)%k%@$K!"?75,%a!<%k%A%'%C%/;~$K%@%&%s%m!<%I$^$G$d$C$F$7$^$&\e(B
    \e$B%*%W%7%g%s$r@_$1$k\e(B
 ** rfc2192, rfc2193, rfc2221 (imap referral \e$B$N=hM}\e(B) \e$B$X$NBP1~\e(B
-** \e$B<u$1<h$C$?%a!<%k$NE:IU%U%!%$%kItJ,$r:o=|$G$-$k$h$&$K$9$k\e(B
+** \e$B%j!<%8%g%s$r%I%i%U%H$X0zMQ$G$-$k$h$&$K$9$k\e(B
 ** \e$B%3!<%I$N@0M}\e(B
index 5a91f61..7a3bb1d 100644 (file)
@@ -3,6 +3,11 @@
        * elmo-filter.el (elmo-folder-diff): Fixed condition checking
        `last:' filter.
 
+2002-10-12  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
+
+       * elmo-dop.el (elmo-folder-status-dop): If spool-folder is absent,
+       set spool-length to 0.
+
 2002-10-06  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * elmo-dop.el (elmo-dop-queue-flush): Check obsolete at first.
index 1fcc913..5983303 100644 (file)
@@ -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  <kaoru@kaisei.org>
 
index cf0b3ac..b23b5c6 100644 (file)
@@ -1,3 +1,27 @@
+2002-10-18  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * 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  <yoichi@eken.phys.nagoya-u.ac.jp>
+
+       * 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  <teranisi@gohome.org>
 
        * wl-summary.el (wl-summary-insert-headers): Put alike hash in reverse
index e6f99e2..904a411 100644 (file)
@@ -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 "")))
index 7f09b26..0b2a59d 100644 (file)
@@ -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.
index 6b01c98..0214481 100644 (file)
@@ -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)))