(nnml-request-post): New function. Can be used for
authorKai Grossjohann <kgrossjo@eu.uu.net>
Sat, 21 Jul 2001 18:04:11 +0000 (18:04 +0000)
committerKai Grossjohann <kgrossjo@eu.uu.net>
Sat, 21 Jul 2001 18:04:11 +0000 (18:04 +0000)
annotations in nnml groups.

lisp/ChangeLog
lisp/nnml.el

index 8671442..3b38aac 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-21  Kai Gro\e,A_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+       * nnml.el (nnml-request-post): New function.  Can be used for
+       annotations in nnml groups.
+
 2001-07-19  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * nntp.el (nntp-request-newgroups): Use UTC date for NEWGROUPS
index 004c462..79124eb 100644 (file)
@@ -369,6 +369,25 @@ all.  This may very well take some time.")
         (nnml-save-nov))))
     result))
 
+(deffoo nnml-request-post (&optional server)
+  (let ((success t))
+    (dolist (mbx (message-unquote-tokens
+                  (message-tokenize-header
+                   (message-fetch-field "Newsgroups") ", ")) success)
+      (let ((to-newsgroup (gnus-group-prefixed-name mbx gnus-command-method)))
+       (or (gnus-active to-newsgroup)
+           (gnus-activate-group to-newsgroup)
+           (if (gnus-y-or-n-p (format "No such group: %s.  Create it? "
+                                      to-newsgroup))
+               (or (and (gnus-request-create-group
+                         to-newsgroup gnus-command-method)
+                        (gnus-activate-group to-newsgroup nil nil
+                                             gnus-command-method))
+                   (error "Couldn't create group %s" to-newsgroup)))
+           (error "No such group: %s" to-newsgroup))
+       (unless (nnml-request-accept-article mbx (nth 1 gnus-command-method))
+         (setq success nil))))))
+
 (deffoo nnml-request-replace-article (article group buffer)
   (nnml-possibly-change-directory group)
   (save-excursion