From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62002 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Removing ignore-errors in mm-dissect-buffer Date: Wed, 15 Feb 2006 17:57:40 +0100 Organization: Dept. of Theoretical Physics, University of Ulm Message-ID: Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1140024606 26566 80.91.229.2 (15 Feb 2006 17:30:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Feb 2006 17:30:06 +0000 (UTC) Original-X-From: ding-owner+m10530@lists.math.uh.edu Wed Feb 15 18:30:01 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F9QSo-0000wz-F3 for ding-account@gmane.org; Wed, 15 Feb 2006 18:29:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1F9QSi-0005Vn-00; Wed, 15 Feb 2006 11:29:08 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1F9QP9-0005Vh-00 for ding@lists.math.uh.edu; Wed, 15 Feb 2006 11:25:27 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1F9QP3-0004JD-D2 for ding@lists.math.uh.edu; Wed, 15 Feb 2006 11:25:27 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1F9QP1-0001ip-00 for ; Wed, 15 Feb 2006 18:25:19 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1F9QOI-0008A7-Qc for ding@gnus.org; Wed, 15 Feb 2006 18:24:34 +0100 Original-Received: from bridgekeeper.physik.uni-ulm.de ([134.60.10.123]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Feb 2006 18:24:34 +0100 Original-Received: from Reiner.Steib by bridgekeeper.physik.uni-ulm.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Feb 2006 18:24:34 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org Original-Lines: 89 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: bridgekeeper.physik.uni-ulm.de X-Face: 1;h7XMU[7l}$T@J.D}5z*w8Tg'}B5ArAWc8>2X~otB;kOjKs8X%|hTC#dG:%Vpx")x7S/`v :VXU#fZW$X$zdhEU.RfVQ@<-m9IuN{Hm"fW{,5]6kR'M*vEs+{5Cj!L(JTRzA$(},?5J=sm;%Od Hi, Gnus errors out with "forward-sexp: Scan error: "Unbalanced parentheses", 21, 32" when displaying the following spam article: ,----[ http://theotp1.physik.uni-ulm.de/~ste/tmp/gmane.emacs.diffs.46183 ] | Newsgroups: gmane.emacs.diffs | Subject: Core@mindyfunk.com | Date: Sun, 12 Feb 2006 22:41:42 -0500 (EST) | Message-ID: <20060213034142.06497AA36A4@max.barkingdogstudios.com> | Mime-Version: 1.0 | Content-Type: multipart/mixed; boundary=fc55ff24ae7d5dde3b9cddf90cbc0f08 `---- The culprit is the string «charset=\"us-ascii\"» in the first MIME part which might be invalid: ,---- | --fc55ff24ae7d5dde3b9cddf90cbc0f08 | Content-Type: text/html; charset=\"us-ascii\" | MIME-Version: 1.0 | Content-Transfer-Encoding: quoted-printable `---- But Gnus should render the article despite of the broken charset declaration, I think. To reproduce (even from «emacs -Q»), eval the following code: --8<---------------cut here---------------start------------->8--- (require 'mail-parse) (with-temp-buffer (insert "Content-Type: text/html; charset=\\\"us-ascii\\\" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable") (setq ct (mail-fetch-field "content-type") ctl (and ct (mail-header-parse-content-type ct)))) --8<---------------cut here---------------end--------------->8--- Reverting mm-decode.el to revision 7.37 fixed the problem: --8<---------------cut here---------------start------------->8--- --- mm-decode.el 15 Feb 2006 17:33:53 +0100 7.37 +++ mm-decode.el 15 Feb 2006 17:33:26 +0100 7.38 @@ -534,13 +534,13 @@ loose-mime (mail-fetch-field "mime-version")) (setq ct (mail-fetch-field "content-type") - ctl (ignore-errors (mail-header-parse-content-type ct)) + ctl (and ct (mail-header-parse-content-type ct)) cte (mail-fetch-field "content-transfer-encoding") cd (mail-fetch-field "content-disposition") description (mail-fetch-field "content-description") id (mail-fetch-field "content-id")) (unless from - (setq from (mail-fetch-field "from"))) + (setq from (mail-fetch-field "from"))) ;; FIXME: In some circumstances, this code is running within ;; an unibyte macro. mail-extract-address-components ;; creates unibyte buffers. This `if', though not a perfect [...] --8<---------------cut here---------------end--------------->8--- If reverting the following changes is not the right thing, could you suggest a better approach, Katsumi? ,---- | 2006-02-07 Katsumi Yamaoka | | * gnus-art.el (article-decode-charset): Don't use ignore-errors | when calling mail-header-parse-content-type. | (article-de-quoted-unreadable): Ditto. | (article-de-base64-unreadable): Ditto. | (article-wash-html): Ditto. | | * mm-decode.el (mm-dissect-buffer): Don't use ignore-errors when | calling mail-header-parse-content-type and | mail-header-parse-content-disposition. | (mm-find-raw-part-by-type): Don't use ignore-errors when calling | mail-header-parse-content-type. | [...] `---- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/