"\M-c" gnus-summary-mail-crosspost-complaint
"om" gnus-summary-mail-forward
"op" gnus-summary-post-forward
- "Om" gnus-uu-digest-mail-forward
- "Op" gnus-uu-digest-post-forward)
+ "Om" gnus-summary-digest-mail-forward
+ "Op" gnus-summary-digest-post-forward)
(gnus-define-keys (gnus-send-bounce-map "D" gnus-summary-send-map)
"b" gnus-summary-resend-bounced-mail
(if full-headers "" message-included-forward-headers)))
(message-forward post))))
-;;;;; XXX: generate Subject and ``Topics''?
-;;(defun gnus-summary-mail-digest (&optional n post)
-;; "Digests and forwards all articles in this series."
-;; (interactive "P")
-;; (let ((subject "Digested Articles")
-;; (articles (gnus-summary-work-articles n))
-;; article frame)
-;; (gnus-setup-message 'forward
-;; (gnus-summary-select-article)
-;; (if post (message-news nil subject) (message-mail nil subject))
-;; (when (and message-use-multi-frames (cdr articles))
-;; (setq frame (window-frame (get-buffer-window (current-buffer)))))
-;; (message-goto-body)
-;; (while (setq article (pop articles))
-;; (save-window-excursion
-;; (set-buffer gnus-summary-buffer)
-;; (gnus-summary-select-article nil nil nil article)
-;; (gnus-summary-remove-process-mark article))
-;; (when frame
-;; (select-frame frame))
-;; (insert (mime-make-tag "message" "rfc822") "\n")
-;; (insert-buffer-substring gnus-original-article-buffer))
-;; (push-mark)
-;; (message-goto-body)
-;; (mime-edit-enclose-digest-region (point)(mark t)))))
-;;
-;;(defun gnus-summary-post-digest (&optional n)
-;; "Digest and forwards all articles in this series to a newsgroup."
-;; (interactive "P")
-;; (gnus-summary-mail-digest n t))
+(defun gnus-summary-digest-mail-forward (&optional n post)
+ "Digests and forwards all articles in this series.
+If N is a positive number, forward the N next articles.
+If N is a negative number, forward the N previous articles.
+If N is nil and any articles have been marked with the process mark,
+forward those articles instead.
+Optional POST will use news to forward instead of mail."
+ (interactive "P")
+ (let ((articles (gnus-summary-work-articles n))
+ (topics "Topics:\n")
+ subject article frame)
+ (when (car articles)
+ (gnus-setup-message 'forward
+ (gnus-summary-select-article)
+ (if (cdr articles)
+ (setq articles (sort articles '<)
+ subject "Digested Articles")
+ (with-current-buffer gnus-original-article-buffer
+ (setq subject (message-make-forward-subject))))
+ (if post
+ (message-news nil subject)
+ (message-mail nil subject))
+ (when (and message-use-multi-frames (cdr articles))
+ (setq frame (window-frame (get-buffer-window (current-buffer)))))
+ (message-goto-body)
+ (while (setq article (pop articles))
+ (save-window-excursion
+ (set-buffer gnus-summary-buffer)
+ (gnus-summary-select-article nil nil nil article)
+ (setq topics (concat topics " "
+ (mail-header-subject gnus-current-headers)
+ "\n"))
+ (gnus-summary-remove-process-mark article))
+ (when frame
+ (select-frame frame))
+ (insert (mime-make-tag "message" "rfc822") "\n")
+ (narrow-to-region (point) (point))
+ (insert-buffer-substring gnus-original-article-buffer)
+ (save-restriction
+ (article-narrow-to-head)
+ (message-remove-header message-included-forward-headers t nil t))
+ (goto-char (point-max))
+ (widen))
+ (push-mark)
+ (message-goto-body)
+ (insert topics)
+ (message-goto-body)
+ (mime-edit-enclose-digest-region (point)(mark t))))))
+
+(defun gnus-summary-digest-post-forward (&optional n)
+ "Digest and forwards all articles in this series to a newsgroup.
+If N is a positive number, forward the N next articles.
+If N is a negative number, forward the N previous articles.
+If N is nil and any articles have been marked with the process mark,
+forward those articles instead."
+ (interactive "P")
+ (gnus-summary-digest-mail-forward n t))
(defun gnus-summary-resend-message (address n)
"Resend the current article to ADDRESS."