(defvar gnus-newsgroup-last-mail nil)
(defvar gnus-newsgroup-last-folder nil)
(defvar gnus-newsgroup-last-file nil)
+(defvar gnus-newsgroup-last-directory nil)
(defvar gnus-newsgroup-auto-expire nil)
(defvar gnus-newsgroup-active nil)
gnus-newsgroup-begin gnus-newsgroup-end
gnus-newsgroup-last-rmail gnus-newsgroup-last-mail
gnus-newsgroup-last-folder gnus-newsgroup-last-file
+ gnus-newsgroup-last-directory
gnus-newsgroup-auto-expire gnus-newsgroup-unreads
gnus-newsgroup-unselected gnus-newsgroup-marked
gnus-newsgroup-spam-marked
"e" gnus-article-emphasize
"w" gnus-article-fill-cited-article
"Q" gnus-article-fill-long-lines
+ "L" gnus-article-toggle-truncate-lines
"C" gnus-article-capitalize-sentences
"c" gnus-article-remove-cr
"q" gnus-article-de-quoted-unreadable
"r" gnus-summary-save-article-rmail
"f" gnus-summary-save-article-file
"b" gnus-summary-save-article-body-file
+ "B" gnus-summary-write-article-body-file
"h" gnus-summary-save-article-folder
"v" gnus-summary-save-article-vm
"p" gnus-summary-pipe-output
["Emphasis" gnus-article-emphasize t]
["Word wrap" gnus-article-fill-cited-article t]
["Fill long lines" gnus-article-fill-long-lines t]
+ ["Toggle truncate long lines" gnus-article-toggle-truncate-lines t]
["Capitalize sentences" gnus-article-capitalize-sentences t]
["Remove CR" gnus-article-remove-cr t]
["Quoted-Printable" gnus-article-de-quoted-unreadable t]
;; Summary saving commands.
-(defun gnus-summary-save-article (&optional n not-saved decode)
+(defun gnus-summary-save-article (&optional n not-saved)
"Save the current article using the default saver function.
If N is a positive number, save the N next articles.
If N is a negative number, save the N previous articles.
The variable `gnus-default-article-saver' specifies the saver function.
If the optional second argument NOT-SAVED is non-nil, articles saved
-will not be marked as saved. If the optional third argument DECODE is
-non-nil, articles will be decoded before saving."
+will not be marked as saved."
(interactive "P")
(require 'gnus-art)
- (unless gnus-article-save-coding-system
- (setq decode nil))
(let* ((articles (gnus-summary-work-articles n))
(save-buffer (save-excursion
(nnheader-set-temp-buffer " *Gnus Save*")))
(num (length articles))
+ ;; Whether to save decoded articles or raw articles.
+ (decode (when gnus-article-save-coding-system
+ (get gnus-default-article-saver :decode)))
+ ;; When saving many articles in a single file, use the other
+ ;; function to save articles other than the first one.
+ (saver2 (get gnus-default-article-saver :function))
+ (gnus-prompt-before-saving (if saver2
+ t
+ gnus-prompt-before-saving))
+ (gnus-default-article-saver gnus-default-article-saver)
header file)
(dolist (article articles)
(setq header (gnus-summary-article-header article))
gnus-display-mime-function))
(gnus-article-prepare-hook (when decode
gnus-article-prepare-hook)))
- (gnus-summary-select-article (not decode) nil nil article)))
+ (gnus-summary-select-article t nil nil article)
+ (gnus-summary-goto-subject article)))
(save-excursion
(set-buffer save-buffer)
(erase-buffer)
(setq file (gnus-article-save save-buffer file num))
(gnus-summary-remove-process-mark article)
(unless not-saved
- (gnus-summary-set-saved-mark article))))
+ (gnus-summary-set-saved-mark article)))
+ (when saver2
+ (setq gnus-default-article-saver saver2
+ saver2 nil)))
(gnus-kill-buffer save-buffer)
(gnus-summary-position-point)
(gnus-set-mode-line 'summary)
(interactive "P")
(require 'gnus-art)
(let ((gnus-default-article-saver 'gnus-summary-save-in-file))
- (gnus-summary-save-article arg nil t)))
+ (gnus-summary-save-article arg)))
(defun gnus-summary-write-article-file (&optional arg)
"Write the current article to a file, deleting the previous file.
save those articles instead."
(interactive "P")
(require 'gnus-art)
- ;; When saving many files, use `gnus-summary-write-to-file' first
- ;; and `gnus-summary-save-in-file' thereafter unless
- ;; `gnus-prompt-before-saving' is `always'.
- (let ((gnus-default-article-saver
- (if (eq gnus-prompt-before-saving 'always)
- 'gnus-summary-write-to-file
- (lambda (&rest args)
- (prog1
- (apply 'gnus-summary-write-to-file args)
- (setq gnus-default-article-saver
- 'gnus-summary-save-in-file))))))
- (gnus-summary-save-article arg nil t)))
+ (let ((gnus-default-article-saver 'gnus-summary-write-to-file))
+ (gnus-summary-save-article arg)))
(defun gnus-summary-save-article-body-file (&optional arg)
"Append the current article body to a file.
(interactive "P")
(require 'gnus-art)
(let ((gnus-default-article-saver 'gnus-summary-save-body-in-file))
- (gnus-summary-save-article arg nil t)))
+ (gnus-summary-save-article arg)))
+
+(defun gnus-summary-write-article-body-file (&optional arg)
+ "Write the current article body to a file, deleting the previous file.
+If N is a positive number, save the N next articles.
+If N is a negative number, save the N previous articles.
+If N is nil and any articles have been marked with the process mark,
+save those articles instead."
+ (interactive "P")
+ (require 'gnus-art)
+ (let ((gnus-default-article-saver 'gnus-summary-write-body-to-file))
+ (gnus-summary-save-article arg)))
(defun gnus-summary-muttprint (&optional arg)
"Print the current article using Muttprint.