diff options
| author | Miles Bader | 2008-07-14 06:56:18 +0000 |
|---|---|---|
| committer | Miles Bader | 2008-07-14 06:56:18 +0000 |
| commit | 16c85f269000170d32ef3842844b7c81a1fabb25 (patch) | |
| tree | 59e0ab3cdaeaaf327b28f020f590c7f36dbc30a2 | |
| parent | 3b48f0d2a6250056e7002c8f1524e6d79cbb545b (diff) | |
| download | emacs-16c85f269000170d32ef3842844b7c81a1fabb25.tar.gz emacs-16c85f269000170d32ef3842844b7c81a1fabb25.zip | |
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1326
| -rw-r--r-- | lisp/gnus/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 65 |
2 files changed, 60 insertions, 13 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 893ca129b3a..c7aa76bacff 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2008-07-10 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-art.el (gnus-article-save): Ignore gnus-visible-headers that is | ||
| 4 | set as a group parameter. | ||
| 5 | (gnus-summary-save-in-pipe): Work when it is called independently. | ||
| 6 | (gnus-summary-pipe-to-muttprint): Don't modify | ||
| 7 | gnus-summary-pipe-output-default-command. | ||
| 8 | |||
| 1 | 2008-07-10 Stefan Monnier <monnier@iro.umontreal.ca> | 9 | 2008-07-10 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 10 | ||
| 3 | * message.el (message-send-mail-with-sendmail): | 11 | * message.el (message-send-mail-with-sendmail): |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index a8db53f682c..89dee7f0f56 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -3715,7 +3715,8 @@ This format is defined by the `gnus-article-time-format' variable." | |||
| 3715 | (let ((gnus-visible-headers | 3715 | (let ((gnus-visible-headers |
| 3716 | (or (symbol-value (get gnus-default-article-saver :headers)) | 3716 | (or (symbol-value (get gnus-default-article-saver :headers)) |
| 3717 | gnus-saved-headers gnus-visible-headers)) | 3717 | gnus-saved-headers gnus-visible-headers)) |
| 3718 | (gnus-article-buffer save-buffer)) | 3718 | ;; Ignore group parameter. See `article-hide-headers'. |
| 3719 | (gnus-summary-buffer nil)) | ||
| 3719 | (with-current-buffer save-buffer | 3720 | (with-current-buffer save-buffer |
| 3720 | (article-hide-headers 1 t)))) | 3721 | (article-hide-headers 1 t)))) |
| 3721 | (save-window-excursion | 3722 | (save-window-excursion |
| @@ -3943,8 +3944,43 @@ The directory to save in defaults to `gnus-article-save-directory'." | |||
| 3943 | (put 'gnus-summary-save-in-pipe :headers 'gnus-saved-headers) | 3944 | (put 'gnus-summary-save-in-pipe :headers 'gnus-saved-headers) |
| 3944 | (defun gnus-summary-save-in-pipe (&optional command) | 3945 | (defun gnus-summary-save-in-pipe (&optional command) |
| 3945 | "Pipe this article to subprocess." | 3946 | "Pipe this article to subprocess." |
| 3946 | (let ((default (or gnus-summary-pipe-output-default-command | 3947 | (let ((save-buffer gnus-save-article-buffer) |
| 3948 | (default (or gnus-summary-pipe-output-default-command | ||
| 3947 | gnus-last-shell-command))) | 3949 | gnus-last-shell-command))) |
| 3950 | ;; `gnus-save-article-buffer' should be a buffer containing the article | ||
| 3951 | ;; contents if this function is called by way of the command | ||
| 3952 | ;; `gnus-summary-pipe-output'. OTOH, that the buffer does not exist | ||
| 3953 | ;; means this function is called independently. | ||
| 3954 | (unless (gnus-buffer-live-p save-buffer) | ||
| 3955 | (let ((article (gnus-summary-article-number)) | ||
| 3956 | (decode (get 'gnus-summary-save-in-pipe :decode))) | ||
| 3957 | (if article | ||
| 3958 | (if (vectorp (gnus-summary-article-header article)) | ||
| 3959 | (save-window-excursion | ||
| 3960 | (let ((gnus-display-mime-function | ||
| 3961 | (when decode | ||
| 3962 | gnus-display-mime-function)) | ||
| 3963 | (gnus-article-prepare-hook | ||
| 3964 | (when decode | ||
| 3965 | gnus-article-prepare-hook))) | ||
| 3966 | (gnus-summary-select-article t t nil article) | ||
| 3967 | (gnus-summary-goto-subject article)) | ||
| 3968 | (insert-buffer-substring | ||
| 3969 | (prog1 | ||
| 3970 | (if decode | ||
| 3971 | gnus-article-buffer | ||
| 3972 | gnus-original-article-buffer) | ||
| 3973 | (setq save-buffer | ||
| 3974 | (nnheader-set-temp-buffer " *Gnus Save*")))) | ||
| 3975 | ;; Remove unwanted headers. | ||
| 3976 | (let ((gnus-visible-headers | ||
| 3977 | (or (symbol-value (get gnus-default-article-saver | ||
| 3978 | :headers)) | ||
| 3979 | gnus-saved-headers gnus-visible-headers)) | ||
| 3980 | (gnus-summary-buffer nil)) | ||
| 3981 | (article-hide-headers 1 t))) | ||
| 3982 | (error "%d is not a real article" article)) | ||
| 3983 | (error "No article to pipe")))) | ||
| 3948 | (unless (stringp command) | 3984 | (unless (stringp command) |
| 3949 | (setq command | 3985 | (setq command |
| 3950 | (if (and (eq command 'default) default) | 3986 | (if (and (eq command 'default) default) |
| @@ -3961,21 +3997,24 @@ The directory to save in defaults to `gnus-article-save-directory'." | |||
| 3961 | (when (string-equal command "") | 3997 | (when (string-equal command "") |
| 3962 | (if default | 3998 | (if default |
| 3963 | (setq command default) | 3999 | (setq command default) |
| 3964 | (error "A command is required")))) | 4000 | (error "A command is required"))) |
| 3965 | (gnus-eval-in-buffer-window gnus-save-article-buffer | 4001 | (gnus-eval-in-buffer-window save-buffer |
| 3966 | (save-restriction | 4002 | (save-restriction |
| 3967 | (widen) | 4003 | (widen) |
| 3968 | (shell-command-on-region (point-min) (point-max) command nil))) | 4004 | (shell-command-on-region (point-min) (point-max) command nil))) |
| 4005 | (gnus-kill-buffer save-buffer)) | ||
| 3969 | (setq gnus-summary-pipe-output-default-command command)) | 4006 | (setq gnus-summary-pipe-output-default-command command)) |
| 3970 | 4007 | ||
| 3971 | (defun gnus-summary-pipe-to-muttprint (&optional command) | 4008 | (defun gnus-summary-pipe-to-muttprint (&optional command) |
| 3972 | "Pipe this article to muttprint." | 4009 | "Pipe this article to muttprint." |
| 3973 | (setq command (read-string | 4010 | (unless (stringp command) |
| 3974 | "Print using command: " gnus-summary-muttprint-program | 4011 | (setq command (read-string |
| 3975 | nil gnus-summary-muttprint-program)) | 4012 | "Print using command: " gnus-summary-muttprint-program |
| 3976 | (let ((gnus-last-shell-command gnus-last-shell-command)) | 4013 | nil gnus-summary-muttprint-program))) |
| 3977 | (gnus-summary-save-in-pipe command) | 4014 | (let ((gnus-summary-pipe-output-default-command |
| 3978 | (setq gnus-summary-muttprint-program gnus-last-shell-command))) | 4015 | gnus-summary-pipe-output-default-command)) |
| 4016 | (gnus-summary-save-in-pipe command)) | ||
| 4017 | (setq gnus-summary-muttprint-program command)) | ||
| 3979 | 4018 | ||
| 3980 | ;;; Article file names when saving. | 4019 | ;;; Article file names when saving. |
| 3981 | 4020 | ||