From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/54404 Path: main.gmane.org!not-for-mail From: Reiner Steib <4.uce.03.r.s@nurfuerspam.de> Newsgroups: gmane.emacs.gnus.general Subject: headers argument in gnus-summary-pipe-output is ignored Date: Wed, 22 Oct 2003 15:31:36 +0200 Organization: Dept. of Theoretical Physics, University of Ulm Sender: ding-owner@lists.math.uh.edu Message-ID: Reply-To: reiner.steib@gmx.de NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066830687 26432 80.91.224.253 (22 Oct 2003 13:51:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2003 13:51:27 +0000 (UTC) Original-X-From: ding-owner+M2945@lists.math.uh.edu Wed Oct 22 15:51:25 2003 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 1ACJOW-0000UX-00 for ; Wed, 22 Oct 2003 15:51:24 +0200 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 1ACJNv-0003ha-00; Wed, 22 Oct 2003 08:50:47 -0500 Original-Received: from justine.libertine.org ([66.139.78.221]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1ACJNm-0003hS-00 for ding@lists.math.uh.edu; Wed, 22 Oct 2003 08:50:38 -0500 Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by justine.libertine.org (Postfix) with ESMTP id A60B83A0069 for ; Wed, 22 Oct 2003 08:50:37 -0500 (CDT) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ACJNk-0002cc-00 for ; Wed, 22 Oct 2003 15:50:36 +0200 Mail-Followup-To: ding@gnus.org X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACJNh-0002cU-00 for ; Wed, 22 Oct 2003 15:50:33 +0200 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ACJNh-0006q1-00 for ; Wed, 22 Oct 2003 15:50:33 +0200 Original-Lines: 53 Original-X-Complaints-To: usenet@sea.gmane.org X-Face: .*T0'iU(sujq_j9\J>-d4fg;N/1++U#U$_5ii6k.=|"-n'?5O:Hyz&wi'-!I~,}7~GgT=0S /&-R5sbkNy5+Xo1y{Tw2KKxi@Xh"g@]Qc|.U<*]WDd)qvGowFDvfU1F]{EDho:7P0@|oOD=Bc{K4?> WP68K[Mx:}=`ZT'6g4'f+g?;`vri2!)xGy}3:=l'(/Cea0l4lo^H5#@/Z3ev Mail-Copies-To: nobody User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:HWJGAfsgaydmf2g4ueLYf4/JeS8= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:54404 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:54404 Hi, according to the doc-string, `M-: (gnus-summary-pipe-output 1 t) RET' should pipe the current article to a command, _including_ the headers: ,----[ C-h f gnus-summary-pipe-output RET ] | gnus-summary-pipe-output is an interactive Lisp function in `gnus-sum'. | (gnus-summary-pipe-output &optional ARG HEADERS) | | Pipe the current article to a subprocess. | If N is a positive number, pipe the N next articles. | If N is a negative number, pipe the N previous articles. | If N is nil and any articles have been marked with the process mark, | pipe those articles instead. | If HEADERS (the symbolic prefix), include the headers, too. `---- But, when I enter "xless" as a command, I see that only the usual visible headers (as displayed in the article buffer) are used. `gnus-summary-pipe-output' calls `gnus-summary-save-article' with `gnus-default-article-saver' let-bound to `gnus-summary-save-in-pipe'. `gnus-summary-save-article' calls `gnus-article-save', which finally calls "(funcall gnus-default-article-saver filename)", i.e. `gnus-summary-save-in-pipe'. But the latter unconditionally uses `gnus-article-buffer' and ignores `gnus-save-article-buffer'. (defun gnus-summary-save-in-pipe (&optional command) "Pipe this article to subprocess." [...] (gnus-eval-in-buffer-window gnus-article-buffer [...])) The following patch fixes this. But I'm not sure if it's the best/correct fix. Comments? --8<---------------cut here---------------start------------->8--- @@ -3270,7 +3289,8 @@ (if gnus-last-shell-command (setq command gnus-last-shell-command) (error "A command is required"))) - (gnus-eval-in-buffer-window gnus-article-buffer + (gnus-eval-in-buffer-window (or gnus-save-article-buffer + gnus-article-buffer) (save-restriction (widen) (shell-command-on-region (point-min) (point-max) command nil))) --8<---------------cut here---------------end--------------->8--- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/