From: Reiner Steib <4.uce.03.r.s@nurfuerspam.de>
Subject: headers argument in gnus-summary-pipe-output is ignored
Date: Wed, 22 Oct 2003 15:31:36 +0200 [thread overview]
Message-ID: <v9n0btflfr.fsf@marauder.physik.uni-ulm.de> (raw)
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/
next reply other threads:[~2003-10-22 13:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-22 13:31 Reiner Steib [this message]
2004-01-02 22:49 ` Lars Magne Ingebrigtsen
2004-01-04 15:37 ` Reiner Steib
2004-01-04 20:43 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=v9n0btflfr.fsf@marauder.physik.uni-ulm.de \
--to=4.uce.03.r.s@nurfuerspam.de \
--cc=reiner.steib@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).