From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/56649 Path: main.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.gnus.general Subject: Re: Bug in deleting attachments Date: Wed, 10 Mar 2004 11:04:53 +0100 Sender: ding-owner@lists.math.uh.edu Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1078913159 16731 80.91.224.253 (10 Mar 2004 10:05:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Mar 2004 10:05:59 +0000 (UTC) Original-X-From: ding-owner+M5188@lists.math.uh.edu Wed Mar 10 11:05:52 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B10b2-0008Mx-00 for ; Wed, 10 Mar 2004 11:05:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1B10aP-0007BH-00; Wed, 10 Mar 2004 04:05:13 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1B10a9-0007B2-00 for ding@lists.math.uh.edu; Wed, 10 Mar 2004 04:04:57 -0600 Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by justine.libertine.org (Postfix) with ESMTP id 1A0963A0034 for ; Wed, 10 Mar 2004 04:04:56 -0600 (CST) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1B10a6-0000Un-00 for ; Wed, 10 Mar 2004 11:04:54 +0100 Original-Received: from 134.147.94.217 ([134.147.94.217]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Mar 2004 11:04:54 +0100 Original-Received: from Stephen.Berman by 134.147.94.217 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Mar 2004 11:04:54 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 58 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 134.147.94.217 User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:56649 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:56649 On Tue, 09 Mar 2004 17:37:27 +0900 Katsumi Yamaoka wrote: >>>>>> In >>>>>> Reiner Steib <4.uce.03.r.s@nurfuerspam.de> wrote: > >> But maybe we can change the error into a query like "Deleting parts in >> complicated MIME structures might not work. Are you sure?"? > >>>>>> In >>>>>> Stephen Berman wrote: > >> Has anyone fixed this yet and if so can it be checked in? I got bit >> by this yesterday when I updated Gnus from 5.10.6 to CVS. I found the >> change in mm-multiple-handles and was about to send off a bug report >> when I saw this thread. > > I've modified those functions so that they may ask whether to > perform things truly instead of signaling an error. Now they > prompt user as follows: > > Deleting parts may malfunction or destroy the article; continue? > > However, it is the second best. If there is a means to detect > complicated and delicate mime structure correctly, we will have > to forbid deletion after all. I tried your new changes on a simple text mail with a single attachment and after answering yes, the attachment was deleted. Then I tried to delete an attachment in a more complicated email with four MIME parts: 1. text/plain, 2. message/rfc822, 3. text/plain, 4. application/x-zip-compressed -- the latter is the part I tried to delete (parts 2.-4. comprise a forwarded email within the email). After answering yes to the question, I got a wrong-type-argument error (anonymized backtrace below). Then I found myself in an article edit buffer, with the entire contents of the article (not just the attachment) deleted. I undid the deletion, typed `C-c C-c' and got the message "gnus-article-edit-done: Symbol's function definition is void: nil". Then I tried to save the article to a file, and got the message "gnus-article-save: Wrong type argument: stringp, nil". At this point I just removed the read mark from the article and quit the group. With Gnus 5.10.6, I also couldn't deleted the attachment of the complicated email, but got the "This function is not implemented" error message. --Steve Berman Debugger entered--Lisp error: (wrong-type-argument stringp (#("multipart/mixed" 0 15 (start nil from "somebody@somewhere.com" buffer # boundary "0-619311294-1078790361=:27352")) (#> ("text/plain" (charset . "us-ascii")) nil (lambda nil (let (buffer-read-only) (delete-region # #))) ("inline") nil nil "") (#> ("message/rfc822") nil (lambda nil (let (buffer-read-only) (if (fboundp (quote remove-specifier)) (mapcar (lambda (prop) (remove-specifier (face-property (quote default) prop) (current-buffer))) (quote (background background-pixmap foreground)))) (delete-region # #))) nil nil nil nil))) insert-buffer-substring((#("multipart/mixed" 0 15 (start nil from "somebody@somewhere.com" buffer # boundary "0-619311294-1078790361=:27352")) (#> ("text/plain" ...) nil (lambda nil ...) ("inline") nil nil "") (#> ("message/rfc822") nil (lambda nil ...) nil nil nil nil))) mm-insert-part(((#("multipart/mixed" 0 15 ...) (#> ... nil ... ... nil nil "") (#> ... nil ... nil nil nil nil)) (#("multipart/mixed" 0 15 ...) (#> ... nil ... ... nil nil "") (#> ... nil nil ... "Deleted attachment (590903 bytes)" nil nil)))) mml-insert-mime(((#("multipart/mixed" 0 15 ...) (#> ... nil ... ... nil nil "") (#> ... nil ... nil nil nil nil)) (#("multipart/mixed" 0 15 ...) (#> ... nil ... ... nil nil "") (#> ... nil nil ... "Deleted attachment (590903 bytes)" nil nil))) t) mime-to-mml(((#("multipart/mixed" 0 15 ...) (#> ... nil ... ... nil nil "") (#> ... nil ... nil nil nil nil)) (#("multipart/mixed" 0 15 ...) (#> ... nil ... ... nil nil "") (#> ... nil nil ... "Deleted attachment (590903 bytes)" nil nil)))) (let ((mail-parse-charset ...) (mail-parse-ignored-charsets ...) (mbl mml-buffer-list)) (setq mml-buffer-list nil) (insert-buffer gnus-original-article-buffer) (mime-to-mml (quote ...)) (setq gnus-article-mime-handles nil) (let (...) (setq mml-buffer-list mbl) (set ... mbl1)) (gnus-make-local-hook (quote kill-buffer-hook)) (add-hook (quote kill-buffer-hook) (quote mml-destroy-buffers) t t)) (lambda nil (erase-buffer) (let (... ... ...) (setq mml-buffer-list nil) (insert-buffer gnus-original-article-buffer) (mime-to-mml ...) (setq gnus-article-mime-handles nil) (let ... ... ...) (gnus-make-local-hook ...) (add-hook ... ... t t)))() gnus-article-edit-article((lambda nil (erase-buffer) (let (... ... ...) (setq mml-buffer-list nil) (insert-buffer gnus-original-article-buffer) (mime-to-mml ...) (setq gnus-article-mime-handles nil) (let ... ... ...) (gnus-make-local-hook ...) (add-hook ... ... t t))) (lambda (no-highlight) (let (... ... ... ...) (mml-to-mime) (mml-destroy-buffers) (remove-hook ... ... t) (kill-local-variable ...)) (gnus-summary-edit-article-done "" nil # no-highlight))) gnus-mime-delete-part() call-interactively(gnus-mime-delete-part)