From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/55950 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.gnus.general Subject: Re: spam-stat.el and mime Date: Mon, 12 Jan 2004 05:47:47 +0100 Sender: ding-owner@lists.math.uh.edu Message-ID: References: <87u133g3f4.fsf@andy.bu.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1073882972 18500 80.91.224.253 (12 Jan 2004 04:49:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 12 Jan 2004 04:49:32 +0000 (UTC) Original-X-From: ding-owner+M4490@lists.math.uh.edu Mon Jan 12 05:49:29 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 1Afu13-0002m2-00 for ; Mon, 12 Jan 2004 05:49:29 +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 1Afu0T-0003Xw-00; Sun, 11 Jan 2004 22:48:53 -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 1Afu0K-0003XC-00 for ding@lists.math.uh.edu; Sun, 11 Jan 2004 22:48:44 -0600 Original-Received: from pfepa.post.tele.dk (pfepa.post.tele.dk [195.41.46.235]) by justine.libertine.org (Postfix) with ESMTP id C0DD13A0048 for ; Sun, 11 Jan 2004 22:48:43 -0600 (CST) Original-Received: from [195.249.82.147] (0xc3f95293.esnxr1.ras.tele.dk [195.249.82.147]) by pfepa.post.tele.dk (Postfix) with ESMTP id 86C5A47FF0E for ; Mon, 12 Jan 2004 05:48:41 +0100 (CET) Original-To: ding@gnus.org Mail-Followup-To: ding@gnus.org In-Reply-To: <87u133g3f4.fsf@andy.bu.edu> (Andrew Cohen's message of "Sat, 10 Jan 2004 11:43:27 -0500") 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:55950 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:55950 Andrew Cohen writes: > I've modified it to decode mime (if you don't like this it can be > controlled by customizing the spam-treat-mime-function to nil). An often requested feature! Below a few pedantic comments on the code: > + ;; We allow users to glean info from the handles. > + (when gnus-article-mime-part-function > + (gnus-mime-part-function handles))) If someone is using this feature, they probably don't want to run `gnus-article-mime-part-function' when processing spam. > + (if (gnus-buffer-live-p (current-buffer)) (current-buffer) always returns a live buffer, so you don't need this line. > + (with-current-buffer (current-buffer) This line should also be redundant. > + (if (and type (let ((case-fold-search t)) > + (string-match "quoted-printable" type))) > + (progn > + (article-goto-body) > + (quoted-printable-decode-region > + (point) (point-max) (mm-charset-to-coding-system charset))) > + (progn > + (when (and type (let ((case-fold-search t)) You don't need a progn around the ELSE part of an `if' in Emacs Lisp (in contrast with Common Lisp).