[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: |
Fri, 04 Jul 2008 00:07:48 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 08/07/04 00:07:47
Index: lisp/gnus/gnus-art.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/gnus-art.el,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -b -r1.162 -r1.163
--- lisp/gnus/gnus-art.el 5 Jun 2008 14:37:42 -0000 1.162
+++ lisp/gnus/gnus-art.el 4 Jul 2008 00:07:47 -0000 1.163
@@ -552,13 +552,15 @@
* gnus-summary-save-in-vm (use VM's folder format)
* gnus-summary-write-to-file (article format -- overwrite)
* gnus-summary-write-body-to-file (article body -- overwrite)
+* gnus-summary-save-in-pipe (article format)
The symbol of each function may have the following properties:
* :decode
The value non-nil means save decoded articles. This is meaningful
only with `gnus-summary-save-in-file', `gnus-summary-save-body-in-file',
-`gnus-summary-write-to-file', and `gnus-summary-write-body-to-file'.
+`gnus-summary-write-to-file', `gnus-summary-write-body-to-file', and
+`gnus-summary-save-in-pipe'.
* :function
The value specifies an alternative function which appends, not
@@ -581,6 +583,7 @@
(function-item gnus-summary-save-in-vm)
(function-item gnus-summary-write-to-file)
(function-item gnus-summary-write-body-to-file)
+ (function-item gnus-summary-save-in-pipe)
(function)))
(defcustom gnus-article-save-coding-system
@@ -3936,15 +3939,17 @@
gnus-current-headers nil 'gnus-newsgroup-last-directory))
(gnus-summary-save-body-in-file filename t))
+(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."
+ (let ((default (or gnus-summary-pipe-output-default-command
+ gnus-last-shell-command)))
+ (unless (stringp command)
(setq command
- (cond ((and (eq command 'default)
- gnus-last-shell-command)
- gnus-last-shell-command)
- ((stringp command)
- command)
- (t (gnus-read-shell-command
+ (if (and (eq command 'default) default)
+ default
+ (gnus-read-shell-command
(format
"Shell command on %s: "
(if (and gnus-number-of-articles-to-be-saved
@@ -3952,23 +3957,25 @@
(format "these %d articles"
gnus-number-of-articles-to-be-saved)
"this article"))
- gnus-last-shell-command))))
+ default))))
(when (string-equal command "")
- (if gnus-last-shell-command
- (setq command gnus-last-shell-command)
- (error "A command is required")))
- (gnus-eval-in-buffer-window gnus-article-buffer
+ (if default
+ (setq command default)
+ (error "A command is required"))))
+ (gnus-eval-in-buffer-window gnus-save-article-buffer
(save-restriction
(widen)
(shell-command-on-region (point-min) (point-max) command nil)))
- (setq gnus-last-shell-command command))
+ (setq gnus-summary-pipe-output-default-command command))
(defun gnus-summary-pipe-to-muttprint (&optional command)
"Pipe this article to muttprint."
(setq command (read-string
"Print using command: " gnus-summary-muttprint-program
nil gnus-summary-muttprint-program))
- (gnus-summary-save-in-pipe command))
+ (let ((gnus-last-shell-command gnus-last-shell-command))
+ (gnus-summary-save-in-pipe command)
+ (setq gnus-summary-muttprint-program gnus-last-shell-command)))
;;; Article file names when saving.
- [Emacs-diffs] Changes to emacs/lisp/gnus/gnus-art.el,v,
Miles Bader <=