* wl-mime.el (wl-message-delete-current-part): Use existing
authoryoichi <yoichi>
Wed, 16 Oct 2002 11:22:36 +0000 (11:22 +0000)
committeryoichi <yoichi>
Wed, 16 Oct 2002 11:22:36 +0000 (11:22 +0000)
original buffer which corresponds current mime-view buffer.
(fetched buffer might have different structure, possibly)

wl/ChangeLog
wl/wl-mime.el

index 63c42f3..bb35c8b 100644 (file)
@@ -3,6 +3,10 @@
        * 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)
+
 2002-10-12  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-summary.el (wl-summary-insert-headers): Put alike hash in reverse
index 575c235..8b6a414 100644 (file)
@@ -182,19 +182,16 @@ By setting following-method as yank-content."
         (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)))
+        (msgid (elmo-message-field folder number 'message-id))
+        (orig-buf wl-message-buffer-original-buffer))
     (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
-       (elmo-message-fetch folder
-                           number
-                           (elmo-make-fetch-strategy 'entire)
-                           nil
-                           (current-buffer)
-                           'unread)
+       (insert-buffer orig-buf)
        (kill-region header-start body-end)
        (goto-char header-start)
        (insert "Content-Type: text/plain; charset=US-ASCII\n\n")