Really refresh the queue group after sending.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 22 Jan 2011 19:03:18 +0000 (20:03 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 22 Jan 2011 19:03:18 +0000 (20:03 +0100)
lisp/ChangeLog
lisp/gnus-agent.el
lisp/gnus-draft.el
lisp/gnus-group.el
lisp/gnus-start.el

index 1f189c5..f31db7b 100644 (file)
@@ -1,5 +1,12 @@
 2011-01-22  Lars Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-draft.el (gnus-group-send-queue): Really refresh the queue group
+       after sending.
+
+       * gnus-agent.el (gnus-agent-send-mail): Ditto.
+
+       * gnus-group.el (gnus-group-refresh-group): New convenience function.
+
        * gnus-draft.el (gnus-group-send-queue): Update the queue group in the
        group buffer after sending the queue.
 
index e11da98..13fa94e 100644 (file)
@@ -732,7 +732,7 @@ Optional arg GROUP-NAME allows to specify another group."
     (replace-match "\n")
     (gnus-agent-insert-meta-information 'mail)
     (gnus-request-accept-article "nndraft:queue" nil t t)
-    (gnus-group-update-group "nndraft:queue" t)))
+    (gnus-group-refresh-group "nndraft:queue")))
 
 (defun gnus-agent-insert-meta-information (type &optional method)
   "Insert meta-information into the message that says how it's to be posted.
index cc3eabe..e13bb88 100644 (file)
@@ -222,7 +222,7 @@ Obeys the standard process/prefix convention."
                   (format "Sending message %d of %d..."
                           (- total (length articles)) total)))
              (gnus-draft-send article))))))
-    (gnus-group-update-group "nndraft:queue" t)))
+    (gnus-group-refresh-group "nndraft:queue")))
 
 ;;;###autoload
 (defun gnus-draft-reminder ()
index a21053c..5ce1ed8 100644 (file)
@@ -1678,6 +1678,13 @@ and ends at END."
           " "))
     " "))
 
+
+(defun gnus-group-refresh-group (group)
+  (gnus-activate-group group)
+  (gnus-get-unread-articles-in-group (gnus-get-info group)
+                                    (gnus-active group))
+  (gnus-group-update-group group t))
+
 (defun gnus-group-update-group (group &optional visible-only)
   "Update all lines where GROUP appear.
 If VISIBLE-ONLY is non-nil, the group won't be displayed if it isn't
index 38b8174..12c4b4a 100644 (file)
@@ -1509,7 +1509,7 @@ If SCAN, request a scan of that group as well."
                              (gnus-info-group info)))))
       (gnus-activate-group (gnus-info-group info) nil t))
 
-    ;; Allow backends to update marks, 
+    ;; Allow backends to update marks,
     (when gnus-use-backend-marks
       (let ((method (inline (gnus-find-method-for-group
                             (gnus-info-group info)))))