From: yamaoka Date: Tue, 27 Feb 2001 09:53:42 +0000 (+0000) Subject: * gnus-msg.el (gnus-summary-digest-post-forward): Restore and repair the X-Git-Tag: t-gnus-6_14_6-04~5 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f94977e1777d53c97e9d23fae12a716067ad66a0;p=elisp%2Fgnus.git- * gnus-msg.el (gnus-summary-digest-post-forward): Restore and repair the command `gnus-summary-post-digest' and rename it. (gnus-summary-digest-mail-forward): Ditto. (gnus-summary-send-map): Replace `gnus-uu-digest-mail-forward' and `gnus-uu-digest-post-forward' with `gnus-summary-digest-post-forward' and `gnus-summary-digest-mail-forward'. --- diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 391d5b6..030d1ee 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -212,8 +212,8 @@ Thank you for your help in stamping out bugs. "\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 @@ -782,36 +782,63 @@ If FULL-HEADERS (the prefix), include full headers when forwarding." (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."