(save-window-excursion
(gnus-summary-select-article decode decode nil article)
(gnus-summary-goto-subject article))
- (with-current-buffer save-buffer
- (erase-buffer)
- (insert-buffer-substring (if decode
- gnus-article-buffer
- gnus-original-article-buffer)))
+ ;; The article may have expired.
+ (let ((art-buf (if decode
+ gnus-article-buffer
+ gnus-original-article-buffer)))
+ (when (zerop (buffer-size (get-buffer art-buf)))
+ (error "Couldn't select article %s" article))
+ (with-current-buffer save-buffer
+ (erase-buffer)
+ (insert-buffer-substring art-buf)))
(setq file (gnus-article-save save-buffer file num))
(gnus-summary-remove-process-mark article)
(unless not-saved