From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67174 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 16:54:38 +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 1216799768 6279 80.91.229.12 (23 Jul 2008 07:56:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Jul 2008 07:56:08 +0000 (UTC) Cc: ding@gnus.org To: "Gabor Z. Papp" Original-X-From: ding-owner+M15633@lists.math.uh.edu Wed Jul 23 09:56:57 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 1KLZDM-0002EE-WE for ding-account@gmane.org; Wed, 23 Jul 2008 09:56:49 +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 1KLZC5-0005q4-Hx; Wed, 23 Jul 2008 02:55:29 -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 1KLZC4-0005pm-56 for ding@lists.math.uh.edu; Wed, 23 Jul 2008 02:55:28 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1KLZBy-0005z6-3H for ding@lists.math.uh.edu; Wed, 23 Jul 2008 02:55:28 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1KLZCG-0000he-00 for ; Wed, 23 Jul 2008 09:55:41 +0200 Original-Received: from localhost ([127.0.0.1]:58894) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1KLZBK-0005Qd-OV; Wed, 23 Jul 2008 02:54:43 -0500 X-Hashcash: 1:20:080723:gzp@papp.hu::ewWYIbJx3hhzOMsT:0000004Gop X-Hashcash: 1:20:080723:ding@gnus.org::CKCgg7Vm7oOaN87S:000096RN 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:KLDO7PjIHC1R+nrTICd405bun2k= 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:67174 Archived-At: --=-=-= >>>>> Gabor Z. Papp wrote: > Thanks, seems like ok. Thank you for verifying it. > Only one problem left, earlier with the code below I was able to > mark more articles and pipe them one by one in batch: > (defun gzp-pipe-spam (&optional n) > (interactive "P") > (let* ( (pipe (format "cat | /path/to/cmd")) > ) > (save-excursion > (dolist (article (gnus-summary-work-articles n)) > (gnus-summary-goto-subject article) > (gnus-summary-show-raw-article) > (gnus-summary-save-in-pipe :decode nil) > (gnus-summary-save-in-pipe pipe) > (gnus-summary-show-article) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Isn't it unnecessary? > ))) > (gnus-summary-expand-window)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ That's a good idea. > The current code does only one article even I mark more. > I can't fix it, could someone help? :-) Ok. Could you try this one? --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline (defun gzp-pipe-spam (&optional n) (interactive "P") (let* ((pipe (format "cat | /path/to/cmd")) (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 (save-excursion (dolist (article (gnus-summary-work-articles n)) (gnus-summary-goto-subject article) (gnus-summary-save-in-pipe pipe) )) (put 'gnus-summary-save-in-pipe :decode decode) (put 'gnus-summary-save-in-pipe :headers headers))) (gnus-summary-expand-window)) --=-=-=--