+2000-10-01 20:55:53 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ Don't postpone GCC if none of GCC methods is agent-covered. This
+ fix presumes that the post-method must be agent-covered if any Gcc
+ method is agent-covered.
+
+ * gnus-msg.el (gnus-inews-group-method): New function.
+ (gnus-inews-do-gcc): Use it.
+ * gnus-agent.el (gnus-agent-any-covered-gcc): New function.
+ (gnus-agent-possibly-save-gcc): Use it.
+ (gnus-agent-possibly-do-gcc): Ditto.
+
2000-10-01 17:08:50 ShengHuo ZHU <zsh@cs.rochester.edu>
* mailcap.el (mailcap-mime-types): Use mailcap-mime-data.
(while (re-search-forward (concat gnus-agent-gcc-header ":") nil t)
(replace-match "Gcc:" 'fixedcase))))
+(defun gnus-agent-any-covered-gcc ()
+ (save-restriction
+ (message-narrow-to-headers)
+ (let* ((gcc (mail-fetch-field "gcc" nil t))
+ (methods (and gcc
+ (mapcar 'gnus-inews-group-method
+ (message-unquote-tokens
+ (message-tokenize-header
+ gcc " ,")))))
+ covered)
+ (while (and (not covered) methods)
+ (setq covered
+ (member (car methods) gnus-agent-covered-methods)
+ methods (cdr methods)))
+ covered)))
+
(defun gnus-agent-possibly-save-gcc ()
"Save GCC if Gnus is unplugged."
- (unless gnus-plugged
+ (when (and (not gnus-plugged) (gnus-agent-any-covered-gcc))
(save-excursion
(goto-char (point-min))
(let ((case-fold-search t))
(defun gnus-agent-possibly-do-gcc ()
"Do GCC if Gnus is plugged."
- (when gnus-plugged
+ (when (or gnus-plugged (not (gnus-agent-any-covered-gcc)))
(gnus-inews-do-gcc)))
;;;
;;; Gcc handling.
+(defun gnus-inews-group-method (group)
+ (cond ((and (null (gnus-get-info group))
+ (eq (car gnus-message-archive-method)
+ (car
+ (gnus-server-to-method
+ (gnus-group-method group)))))
+ ;; If the group doesn't exist, we assume
+ ;; it's an archive group...
+ gnus-message-archive-method)
+ ;; Use the method.
+ ((gnus-info-method (gnus-get-info group))
+ (gnus-info-method (gnus-get-info group)))
+ ;; Find the method.
+ (t (gnus-group-method group))))
+
;; Do Gcc handling, which copied the message over to some group.
(defun gnus-inews-do-gcc (&optional gcc)
(interactive)
;; Copy the article over to some group(s).
(while (setq group (pop groups))
(gnus-check-server
- (setq method
- (cond ((and (null (gnus-get-info group))
- (eq (car gnus-message-archive-method)
- (car
- (gnus-server-to-method
- (gnus-group-method group)))))
- ;; If the group doesn't exist, we assume
- ;; it's an archive group...
- gnus-message-archive-method)
- ;; Use the method.
- ((gnus-info-method (gnus-get-info group))
- (gnus-info-method (gnus-get-info group)))
- ;; Find the method.
- (t (gnus-group-method group)))))
- (gnus-check-server method)
+ (setq method (gnus-inews-group-method group)))
(unless (gnus-request-group group t method)
(gnus-request-create-group group method))
(save-excursion