[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-art.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-art.el,v |
Date: |
Sat, 26 Jul 2008 09:13:14 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 08/07/26 09:13:12
Index: lisp/gnus/gnus-art.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/gnus-art.el,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -b -r1.164 -r1.165
--- lisp/gnus/gnus-art.el 14 Jul 2008 06:56:18 -0000 1.164
+++ lisp/gnus/gnus-art.el 26 Jul 2008 09:13:11 -0000 1.165
@@ -3942,8 +3942,19 @@
(put 'gnus-summary-save-in-pipe :decode t)
(put 'gnus-summary-save-in-pipe :headers 'gnus-saved-headers)
-(defun gnus-summary-save-in-pipe (&optional command)
- "Pipe this article to subprocess."
+(defun gnus-summary-save-in-pipe (&optional command raw)
+ "Pipe this article to subprocess COMMAND.
+Valid values for COMMAND include:
+ a string
+ The executable command name and possibly arguments.
+ nil
+ You will be prompted for the command in the minibuffer.
+ the symbol `default'
+ It will be replaced with the command which the variable
+ `gnus-summary-pipe-output-default-command' holds or the command
+ last used for saving.
+Non-nil value for RAW overrides `:decode' and `:headers' properties
+and the raw article including all headers will be piped."
(let ((save-buffer gnus-save-article-buffer)
(default (or gnus-summary-pipe-output-default-command
gnus-last-shell-command)))
@@ -3953,7 +3964,8 @@
;; means this function is called independently.
(unless (gnus-buffer-live-p save-buffer)
(let ((article (gnus-summary-article-number))
- (decode (get 'gnus-summary-save-in-pipe :decode)))
+ (decode (unless raw
+ (get 'gnus-summary-save-in-pipe :decode))))
(if article
(if (vectorp (gnus-summary-article-header article))
(save-window-excursion
@@ -3973,12 +3985,15 @@
(setq save-buffer
(nnheader-set-temp-buffer " *Gnus Save*"))))
;; Remove unwanted headers.
+ (when (and (not raw)
+ (or (get 'gnus-summary-save-in-pipe :headers)
+ (not gnus-save-all-headers)))
(let ((gnus-visible-headers
- (or (symbol-value (get gnus-default-article-saver
+ (or (symbol-value (get 'gnus-summary-save-in-pipe
:headers))
gnus-saved-headers gnus-visible-headers))
(gnus-summary-buffer nil))
- (article-hide-headers 1 t)))
+ (article-hide-headers 1 t))))
(error "%d is not a real article" article))
(error "No article to pipe"))))
(unless (stringp command)