* gnus-int.el (gnus-request-accept-article): Inform the agent that
authorKevin Greiner <kevin.greiner@compsol.cc>
Thu, 4 Mar 2004 13:04:25 +0000 (13:04 +0000)
committerKevin Greiner <kevin.greiner@compsol.cc>
Thu, 4 Mar 2004 13:04:25 +0000 (13:04 +0000)
articles are being added to a group.
(gnus-request-replace-article): Inform the agent that articles
need to be uncached as the cached contents are no longer valid.

lisp/ChangeLog
lisp/gnus-int.el

index eac6efd..13174da 100644 (file)
@@ -1,3 +1,10 @@
+2004-03-04  Kevin Greiner <kgreiner@xpediantsolutions.com>
+
+       * gnus-int.el (gnus-request-accept-article): Inform the agent that
+       articles are being added to a group.
+       (gnus-request-replace-article): Inform the agent that articles
+       need to be uncached as the cached contents are no longer valid.
+       
 2004-03-04  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * binhex.el: Don't autoload executable-find.
@@ -38,7 +45,7 @@
 
        * uudecode.el: Don't autoload executable-find.
 
-2004-03-02  Kevin Greiner <kgreiner@xpediantsolutions.com>
+2004-03-04  Kevin Greiner <kgreiner@xpediantsolutions.com>
 
         * gnus-agent.el (gnus-agent-file-header-cache): Removed.
        (gnus-agent-possibly-alter-active): Avoid null in numeric
index dc50119..e9930fb 100644 (file)
@@ -578,7 +578,8 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
     (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
   (when (and (not gnus-command-method)
             (stringp group))
-    (setq gnus-command-method (gnus-group-name-to-method group)))
+    (setq gnus-command-method (or (gnus-find-method-for-group group)
+                                  (gnus-group-name-to-method group))))
   (goto-char (point-max))
   (unless (bolp)
     (insert "\n"))
@@ -591,11 +592,14 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
          (mail-encode-encoded-word-buffer)))
       (message-encode-message-body)))
   (let ((gnus-command-method (or gnus-command-method
-                                (gnus-find-method-for-group group))))
-    (funcall (gnus-get-function gnus-command-method 'request-accept-article)
+                                (gnus-find-method-for-group group)))
+    (result (funcall (gnus-get-function gnus-command-method 'request-accept-article)
             (if (stringp group) (gnus-group-real-name group) group)
             (cadr gnus-command-method)
             last)))
+    (when (and gnus-agent (gnus-agent-method-p gnus-command-method))
+      (gnus-agent-regenerate-group group (list (cdr result))))
+    result))
 
 (defun gnus-request-replace-article (article group buffer &optional no-encode)
   (unless no-encode
@@ -606,9 +610,12 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
        (let ((mail-parse-charset message-default-charset))
          (mail-encode-encoded-word-buffer)))
       (message-encode-message-body)))
-  (let ((func (car (gnus-group-name-to-method group))))
-    (funcall (intern (format "%s-request-replace-article" func))
+  (let* ((func (car (gnus-group-name-to-method group)))
+         (result (funcall (intern (format "%s-request-replace-article" func))
             article (gnus-group-real-name group) buffer)))
+    (when (and gnus-agent (gnus-agent-method-p gnus-command-method))
+               (gnus-agent-regenerate-group group (list article)))
+    result))
 
 (defun gnus-request-associate-buffer (group)
   (let ((gnus-command-method (gnus-find-method-for-group group)))