From b244b59250e81cfcc8a90e7d11971dd2fc06e5e0 Mon Sep 17 00:00:00 2001 From: Kai Grossjohann Date: Sat, 21 Jul 2001 18:04:11 +0000 Subject: [PATCH] (nnml-request-post): New function. Can be used for annotations in nnml groups. --- lisp/ChangeLog | 5 +++++ lisp/nnml.el | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 867144261..3b38aace6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-07-21 Kai Gro,A_(Bjohann + + * nnml.el (nnml-request-post): New function. Can be used for + annotations in nnml groups. + 2001-07-19 Katsumi Yamaoka * nntp.el (nntp-request-newgroups): Use UTC date for NEWGROUPS diff --git a/lisp/nnml.el b/lisp/nnml.el index 004c4622d..79124ebbb 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -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 -- 2.25.1