;;; nnagent.el --- offline backend for Gnus
-;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+;; 2005, 2006 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news, mail
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
(defun nnagent-request-type (group article)
(unless (stringp article)
- (let ((gnus-plugged t))
+ (let ((gnus-agent nil))
(if (not (gnus-check-backend-function
'request-type (car gnus-command-method)))
'unknown
(deffoo nnagent-request-set-mark (group action server)
(with-temp-buffer
- (insert (format "(%s-request-set-mark \"%s\" '%s \"%s\")\n"
- (nth 0 gnus-command-method) group action
- (or server (nth 1 gnus-command-method))))
- (append-to-file (point-min) (point-max) (gnus-agent-lib-file "flags")))
+ (insert "(gnus-agent-synchronize-group-flags \""
+ group
+ "\" '")
+ (gnus-pp action)
+ (insert " \""
+ (gnus-method-to-server gnus-command-method)
+ "\"")
+ (insert ")\n")
+ (write-region (point-min) (point-max) (gnus-agent-lib-file "flags")
+ t 'silent))
nil)
(deffoo nnagent-retrieve-headers (articles &optional group server fetch-old)
(list (nnagent-server server))))
(deffoo nnagent-request-move-article
- (article group server accept-form &optional last)
+ (article group server accept-form &optional last move-is-internal)
(nnoo-parent-function 'nnagent 'nnml-request-move-article
(list article group (nnagent-server server)
- accept-form last)))
+ accept-form last move-is-internal)))
(deffoo nnagent-request-rename-group (group new-name &optional server)
(nnoo-parent-function 'nnagent 'nnml-request-rename-group