aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2008-07-26 09:13:11 +0000
committerMiles Bader2008-07-26 09:13:11 +0000
commitd62672f36a4aaf33ded7ced6e50c44b6a43e4942 (patch)
tree6c41c50f3cdfa167073ffff80771f3f2034add2e
parent51dc79f87e7587f48acdd8d16ec41f2c6373edfb (diff)
downloademacs-d62672f36a4aaf33ded7ced6e50c44b6a43e4942.tar.gz
emacs-d62672f36a4aaf33ded7ced6e50c44b6a43e4942.zip
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1355
-rw-r--r--doc/misc/ChangeLog10
-rw-r--r--doc/misc/gnus.texi30
-rw-r--r--lisp/gnus/ChangeLog9
-rw-r--r--lisp/gnus/gnus-art.el33
4 files changed, 62 insertions, 20 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 19be8135cdc..8fa35abc979 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,13 @@
12008-07-24 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * gnus.texi (Saving Articles): Describe the 2nd argument of
4 gnus-summary-save-in-pipe.
5 (SpamAssassin): Use it.
6
72008-07-22 Katsumi Yamaoka <yamaoka@jpl.org>
8
9 * gnus.texi (SpamAssassin): Fix gnus-summary-save-in-pipe usage.
10
12008-07-25 Carsten Dominik <dominik@science.uva.nl> 112008-07-25 Carsten Dominik <dominik@science.uva.nl>
2 12
3 * org.texi (Export options): Document the use of the creator flag. 13 * org.texi (Export options): Document the use of the creator flag.
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 3ce96ee181b..15a0109d94d 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -8619,14 +8619,23 @@ reader to use this setting.
8619 8619
8620@item gnus-summary-save-in-pipe 8620@item gnus-summary-save-in-pipe
8621@findex gnus-summary-save-in-pipe 8621@findex gnus-summary-save-in-pipe
8622Pipe the article to a shell command. This function takes optional one 8622Pipe the article to a shell command. This function takes optional two
8623argument; if it is a string, it is used as the command; if it is 8623arguments COMMAND and RAW. Valid values for COMMAND include:
8624@code{nil} or omitted, you will be prompted for the command; if it is 8624
8625the symbol @code{default}, the command which the 8625@itemize @bullet
8626@code{gnus-summary-pipe-output-default-command} variable holds or the 8626@item a string@*
8627command last used for saving will be used if it is non-@code{nil}. The 8627The executable command name and possibly arguments.
8628command should be a string that the shell can interpret (e.g. the 8628@item @code{nil}@*
8629executable command name and the arguments). 8629You will be prompted for the command in the minibuffer.
8630@item the symbol @code{default}@*
8631It will be replaced with the command which the variable
8632@code{gnus-summary-pipe-output-default-command} holds or the command
8633last used for saving.
8634@end itemize
8635
8636Non-@code{nil} value for RAW overrides @code{:decode} and
8637@code{:headers} properties (see below) and the raw article including all
8638headers will be piped.
8630@end table 8639@end table
8631 8640
8632The symbol of each function may have the following properties: 8641The symbol of each function may have the following properties:
@@ -24678,11 +24687,10 @@ might want to have a nifty function to call when you happen to read
24678spam. And here is the nifty function: 24687spam. And here is the nifty function:
24679 24688
24680@lisp 24689@lisp
24681 (defun my-gnus-raze-spam () 24690(defun my-gnus-raze-spam ()
24682 "Submit SPAM to Vipul's Razor, then mark it as expirable." 24691 "Submit SPAM to Vipul's Razor, then mark it as expirable."
24683 (interactive) 24692 (interactive)
24684 (gnus-summary-show-raw-article) 24693 (gnus-summary-save-in-pipe "razor-report -f -d" t)
24685 (gnus-summary-save-in-pipe "razor-report -f -d")
24686 (gnus-summary-mark-as-expirable 1)) 24694 (gnus-summary-mark-as-expirable 1))
24687@end lisp 24695@end lisp
24688 24696
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 2db00ad59c2..4592f39cfc0 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,12 @@
12008-07-24 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * gnus-art.el (gnus-summary-save-in-pipe): Add optional argument `raw'.
4
52008-07-22 Katsumi Yamaoka <yamaoka@jpl.org>
6
7 * gnus-art.el (gnus-summary-save-in-pipe): Consider
8 gnus-save-all-headers.
9
12008-07-21 Dan Nicolaescu <dann@ics.uci.edu> 102008-07-21 Dan Nicolaescu <dann@ics.uci.edu>
2 11
3 * gnus-util.el (ns-focus-frame): Remove declaration. 12 * gnus-util.el (ns-focus-frame): Remove declaration.
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 89dee7f0f56..16e65a63e27 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -3942,8 +3942,19 @@ The directory to save in defaults to `gnus-article-save-directory'."
3942 3942
3943(put 'gnus-summary-save-in-pipe :decode t) 3943(put 'gnus-summary-save-in-pipe :decode t)
3944(put 'gnus-summary-save-in-pipe :headers 'gnus-saved-headers) 3944(put 'gnus-summary-save-in-pipe :headers 'gnus-saved-headers)
3945(defun gnus-summary-save-in-pipe (&optional command) 3945(defun gnus-summary-save-in-pipe (&optional command raw)
3946 "Pipe this article to subprocess." 3946 "Pipe this article to subprocess COMMAND.
3947Valid values for COMMAND include:
3948 a string
3949 The executable command name and possibly arguments.
3950 nil
3951 You will be prompted for the command in the minibuffer.
3952 the symbol `default'
3953 It will be replaced with the command which the variable
3954 `gnus-summary-pipe-output-default-command' holds or the command
3955 last used for saving.
3956Non-nil value for RAW overrides `:decode' and `:headers' properties
3957and the raw article including all headers will be piped."
3947 (let ((save-buffer gnus-save-article-buffer) 3958 (let ((save-buffer gnus-save-article-buffer)
3948 (default (or gnus-summary-pipe-output-default-command 3959 (default (or gnus-summary-pipe-output-default-command
3949 gnus-last-shell-command))) 3960 gnus-last-shell-command)))
@@ -3953,7 +3964,8 @@ The directory to save in defaults to `gnus-article-save-directory'."
3953 ;; means this function is called independently. 3964 ;; means this function is called independently.
3954 (unless (gnus-buffer-live-p save-buffer) 3965 (unless (gnus-buffer-live-p save-buffer)
3955 (let ((article (gnus-summary-article-number)) 3966 (let ((article (gnus-summary-article-number))
3956 (decode (get 'gnus-summary-save-in-pipe :decode))) 3967 (decode (unless raw
3968 (get 'gnus-summary-save-in-pipe :decode))))
3957 (if article 3969 (if article
3958 (if (vectorp (gnus-summary-article-header article)) 3970 (if (vectorp (gnus-summary-article-header article))
3959 (save-window-excursion 3971 (save-window-excursion
@@ -3973,12 +3985,15 @@ The directory to save in defaults to `gnus-article-save-directory'."
3973 (setq save-buffer 3985 (setq save-buffer
3974 (nnheader-set-temp-buffer " *Gnus Save*")))) 3986 (nnheader-set-temp-buffer " *Gnus Save*"))))
3975 ;; Remove unwanted headers. 3987 ;; Remove unwanted headers.
3976 (let ((gnus-visible-headers 3988 (when (and (not raw)
3977 (or (symbol-value (get gnus-default-article-saver 3989 (or (get 'gnus-summary-save-in-pipe :headers)
3978 :headers)) 3990 (not gnus-save-all-headers)))
3979 gnus-saved-headers gnus-visible-headers)) 3991 (let ((gnus-visible-headers
3980 (gnus-summary-buffer nil)) 3992 (or (symbol-value (get 'gnus-summary-save-in-pipe
3981 (article-hide-headers 1 t))) 3993 :headers))
3994 gnus-saved-headers gnus-visible-headers))
3995 (gnus-summary-buffer nil))
3996 (article-hide-headers 1 t))))
3982 (error "%d is not a real article" article)) 3997 (error "%d is not a real article" article))
3983 (error "No article to pipe")))) 3998 (error "No article to pipe"))))
3984 (unless (stringp command) 3999 (unless (stringp command)