--- nndraft.el~ 2011-04-05 05:00:10.178750000 +0000 +++ nndraft.el 2011-07-01 10:31:26.218750000 +0000 @@ -161,6 +161,13 @@ (message-headers-to-generate nndraft-required-headers message-draft-headers nil)))) +(defun nndraft-update-unread-articles (group) + "Return a function that updates unread articles of GROUP." + `(lambda nil + (with-current-buffer gnus-group-buffer + (let ((gnus-group-marked (list ,(concat "nndraft:" group)))) + (gnus-group-get-new-news-this-group nil t))))) + (deffoo nndraft-request-associate-buffer (group) "Associate the current buffer with some article in the draft group." (nndraft-open-server "") @@ -182,6 +189,10 @@ 'write-contents-hooks))) (gnus-make-local-hook hook) (add-hook hook 'nndraft-generate-headers nil t)) + (let ((fn (nndraft-update-unread-articles group))) + (gnus-make-local-hook 'after-save-hook) + (add-hook 'after-save-hook fn nil t) + (message-add-action (caddr fn) 'exit 'postpone 'kill)) article)) (deffoo nndraft-request-group (group &optional server dont-check info)