From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67172 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-summary-save-in-pipe does not pipe raw article Date: Wed, 23 Jul 2008 08:11:25 +0900 Organization: Emacsen advocacy group Message-ID: References: <87mykes2g8.fsf@newton.gmurray.org.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1216768407 32485 80.91.229.12 (22 Jul 2008 23:13:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jul 2008 23:13:27 +0000 (UTC) Cc: ding@gnus.org To: "Gabor Z. Papp" Original-X-From: ding-owner+M15631@lists.math.uh.edu Wed Jul 23 01:14:16 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1KLR3e-00043T-Ec for ding-account@gmane.org; Wed, 23 Jul 2008 01:14:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1KLR1o-0003l1-Fr; Tue, 22 Jul 2008 18:12:20 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1KLR1n-0003kp-5Z for ding@lists.math.uh.edu; Tue, 22 Jul 2008 18:12:19 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1KLR1h-0003FN-3A for ding@lists.math.uh.edu; Tue, 22 Jul 2008 18:12:19 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1KLR22-0006lr-00 for ; Wed, 23 Jul 2008 01:12:34 +0200 Original-Received: from localhost ([127.0.0.1]:60569) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1KLR12-0000GG-Lo; Tue, 22 Jul 2008 18:11:35 -0500 X-Hashcash: 1:20:080722:gzp@papp.hu::GKwgvBcFmHRl42PV:000000JYO7 X-Hashcash: 1:20:080722:ding@gnus.org::SDfVqyXpxvK/jXDV:00000JFe X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:v4T9BlVm6oR4/A4ULOXgu84abmI= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.5 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67172 Archived-At: --=-=-= >>>>> Gabor Z. Papp wrote: >| (defun my-gnus-raze-spam () >| "Invoke SpamAssassin reporting , then mark it as expirable." >| (interactive) >| (let ((decode (get 'gnus-summary-save-in-pipe :decode))) >| (put 'gnus-summary-save-in-pipe :decode nil) >| (unwind-protect >| (gnus-summary-save-in-pipe "spamassassin -r") >| (put 'gnus-summary-save-in-pipe :decode decode))) >| (gnus-summary-mark-as-expirable 1)) > With this code, using "cat | /path/to/command" instead of > "spamassassin -r" I can't pipe the full raw article with headers, only > with From/To/Subject/Date headers. What I'm missing? Oops, I forgot to take account of the `:headers' property for `gnus-summary-save-in-pipe'. I've fixed it in the Gnus CVS trunk. If you think nothing of updating your Gnus, update and install it, and use the following instead: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline (defun my-gnus-raze-spam () "Invoke SpamAssassin reporting , then mark it as expirable." (interactive) (let ((decode (get 'gnus-summary-save-in-pipe :decode)) (headers (get 'gnus-summary-save-in-pipe :headers)) (gnus-save-all-headers t)) (put 'gnus-summary-save-in-pipe :decode nil) (put 'gnus-summary-save-in-pipe :headers nil) (unwind-protect (gnus-summary-save-in-pipe "spamassassin -r") (put 'gnus-summary-save-in-pipe :decode decode) (put 'gnus-summary-save-in-pipe :headers headers))) (gnus-summary-mark-as-expirable 1)) --=-=-= Content-Disposition: inline Otherwise, you can use this workaround (which can be used with both the fixed Gnus and the old one): --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline (defun my-gnus-raze-spam () "Invoke SpamAssassin reporting , then mark it as expirable." (interactive) (let ((decode (get 'gnus-summary-save-in-pipe :decode)) (headers (get 'gnus-summary-save-in-pipe :headers)) (gnus-default-article-saver 'gnus-summary-save-in-pipe) (all ".*")) (put 'gnus-summary-save-in-pipe :decode nil) (put 'gnus-summary-save-in-pipe :headers 'all) (unwind-protect (gnus-summary-save-in-pipe "spamassassin -r") (put 'gnus-summary-save-in-pipe :decode decode) (put 'gnus-summary-save-in-pipe :headers headers))) (gnus-summary-mark-as-expirable 1)) --=-=-=--