annotate lisp/gnus/nnagent.el @ 52184:2d0c2b7dbf3f

ebnf-no-meta-identifier ==> var instead constant.
author Vinicius Jose Latorre <viniciusjl@ig.com.br>
date Wed, 13 Aug 2003 00:37:24 +0000
parents 0d8b17d428b5
children 695cf19ef79e d7ddb3e565de
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1 ;;; nnagent.el --- offline backend for Gnus
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
2 ;; Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
3
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
4 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
5 ;; Keywords: news, mail
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
6
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
7 ;; This file is part of GNU Emacs.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
8
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
10 ;; it under the terms of the GNU General Public License as published by
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
11 ;; the Free Software Foundation; either version 2, or (at your option)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
12 ;; any later version.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
13
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
14 ;; GNU Emacs is distributed in the hope that it will be useful,
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
17 ;; GNU General Public License for more details.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
18
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
19 ;; You should have received a copy of the GNU General Public License
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
22 ;; Boston, MA 02111-1307, USA.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
23
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
24 ;;; Commentary:
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
25
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
26 ;;; Code:
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
27
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
28 (require 'nnheader)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
29 (require 'nnoo)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
30 (eval-when-compile (require 'cl))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
31 (require 'gnus-agent)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
32 (require 'nnml)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
33
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
34 (nnoo-declare nnagent
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
35 nnml)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
36
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
37
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
38
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
39 (defconst nnagent-version "nnagent 1.0")
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
40
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
41 (defvoo nnagent-directory nil
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
42 "Internal variable."
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
43 nnml-directory)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
44
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
45 (defvoo nnagent-active-file nil
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
46 "Internal variable."
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
47 nnml-active-file)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
48
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
49 (defvoo nnagent-newsgroups-file nil
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
50 "Internal variable."
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
51 nnml-newsgroups-file)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
52
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
53 (defvoo nnagent-get-new-mail nil
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
54 "Internal variable."
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
55 nnml-get-new-mail)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
56
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
57 ;;; Interface functions.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
58
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
59 (nnoo-define-basics nnagent)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
60
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
61 (defun nnagent-server (server)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
62 (and server (format "%s+%s" (car gnus-command-method) server)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
63
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
64 (deffoo nnagent-open-server (server &optional defs)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
65 (setq defs
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
66 `((nnagent-directory ,(gnus-agent-directory))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
67 (nnagent-active-file ,(gnus-agent-lib-file "active"))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
68 (nnagent-newsgroups-file ,(gnus-agent-lib-file "newsgroups"))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
69 (nnagent-get-new-mail nil)))
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 31716
diff changeset
70 (nnoo-change-server 'nnagent
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
71 (nnagent-server server)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
72 defs)
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
73 (let ((dir (gnus-agent-directory))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
74 err)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
75 (cond
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
76 ((not (condition-case arg
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
77 (file-exists-p dir)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
78 (ftp-error (setq err (format "%s" arg)))))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
79 (nnagent-close-server)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
80 (nnheader-report
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
81 'nnagent (or err
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
82 (format "No such file or directory: %s" dir))))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
83 ((not (file-directory-p (file-truename dir)))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
84 (nnagent-close-server)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
85 (nnheader-report 'nnagent "Not a directory: %s" dir))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
86 (t
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
87 (nnheader-report 'nnagent "Opened server %s using directory %s"
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
88 server dir)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
89 t))))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
90
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
91 (deffoo nnagent-retrieve-groups (groups &optional server)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
92 (save-excursion
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
93 (cond
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
94 ((file-exists-p (gnus-agent-lib-file "groups"))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
95 (nnmail-find-file (gnus-agent-lib-file "groups"))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
96 'groups)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
97 ((file-exists-p (gnus-agent-lib-file "active"))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
98 (nnmail-find-file (gnus-agent-lib-file "active"))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
99 'active)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
100 (t nil))))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
101
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
102 (defun nnagent-request-type (group article)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
103 (unless (stringp article)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
104 (let ((gnus-plugged t))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
105 (if (not (gnus-check-backend-function
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
106 'request-type (car gnus-command-method)))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
107 'unknown
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
108 (funcall (gnus-get-function gnus-command-method 'request-type)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
109 (gnus-group-real-name group) article)))))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
110
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
111 (deffoo nnagent-request-newgroups (date server)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
112 nil)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
113
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
114 (deffoo nnagent-request-update-info (group info &optional server)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
115 nil)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
116
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
117 (deffoo nnagent-request-post (&optional server)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
118 (gnus-agent-insert-meta-information 'news gnus-command-method)
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
119 (gnus-request-accept-article "nndraft:queue" nil t t))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
120
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
121 (deffoo nnagent-request-set-mark (group action server)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
122 (with-temp-buffer
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
123 (insert (format "(%s-request-set-mark \"%s\" '%s \"%s\")\n"
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
124 (nth 0 gnus-command-method) group action
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
125 (or server (nth 1 gnus-command-method))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
126 (append-to-file (point-min) (point-max) (gnus-agent-lib-file "flags")))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
127 nil)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
128
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
129 (deffoo nnagent-request-group (group &optional server dont-check)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
130 (nnoo-parent-function 'nnagent 'nnml-request-group
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
131 (list group (nnagent-server server) dont-check)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
132
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
133 (deffoo nnagent-close-group (group &optional server)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
134 (nnoo-parent-function 'nnagent 'nnml-close-group
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
135 (list group (nnagent-server server))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
136
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
137 (deffoo nnagent-request-accept-article (group &optional server last)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
138 (nnoo-parent-function 'nnagent 'nnml-request-accept-article
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
139 (list group (nnagent-server server) last)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
140
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
141 (deffoo nnagent-request-article (id &optional group server buffer)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
142 (nnoo-parent-function 'nnagent 'nnml-request-article
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
143 (list id group (nnagent-server server) buffer)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
144
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
145 (deffoo nnagent-request-create-group (group &optional server args)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
146 (nnoo-parent-function 'nnagent 'nnml-request-create-group
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
147 (list group (nnagent-server server) args)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
148
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
149 (deffoo nnagent-request-delete-group (group &optional force server)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
150 (nnoo-parent-function 'nnagent 'nnml-request-delete-group
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
151 (list group force (nnagent-server server))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
152
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
153 (deffoo nnagent-request-expire-articles (articles group &optional server force)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
154 (nnoo-parent-function 'nnagent 'nnml-request-expire-articles
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
155 (list articles group (nnagent-server server) force)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
156
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
157 (deffoo nnagent-request-list (&optional server)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 31716
diff changeset
158 (nnoo-parent-function 'nnagent 'nnml-request-list
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
159 (list (nnagent-server server))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
160
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
161 (deffoo nnagent-request-list-newsgroups (&optional server)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 31716
diff changeset
162 (nnoo-parent-function 'nnagent 'nnml-request-list-newsgroups
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
163 (list (nnagent-server server))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
164
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 31716
diff changeset
165 (deffoo nnagent-request-move-article
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
166 (article group server accept-form &optional last)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 31716
diff changeset
167 (nnoo-parent-function 'nnagent 'nnml-request-move-article
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 31716
diff changeset
168 (list article group (nnagent-server server)
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
169 accept-form last)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
170
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
171 (deffoo nnagent-request-rename-group (group new-name &optional server)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 31716
diff changeset
172 (nnoo-parent-function 'nnagent 'nnml-request-rename-group
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
173 (list group new-name (nnagent-server server))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
174
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
175 (deffoo nnagent-request-scan (&optional group server)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 31716
diff changeset
176 (nnoo-parent-function 'nnagent 'nnml-request-scan
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
177 (list group (nnagent-server server))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
178
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
179 (deffoo nnagent-retrieve-headers (sequence &optional group server fetch-old)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 31716
diff changeset
180 (nnoo-parent-function 'nnagent 'nnml-retrieve-headers
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
181 (list sequence group (nnagent-server server) fetch-old)))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
182
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
183 (deffoo nnagent-set-status (article name value &optional group server)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 31716
diff changeset
184 (nnoo-parent-function 'nnagent 'nnml-set-status
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
185 (list article name value group (nnagent-server server))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
186
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
187 (deffoo nnagent-server-opened (&optional server)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
188 (nnoo-parent-function 'nnagent 'nnml-server-opened
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
189 (list (nnagent-server server))))
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
190
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
191 (deffoo nnagent-status-message (&optional server)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
192 (nnoo-parent-function 'nnagent 'nnml-status-message
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24358
diff changeset
193 (list (nnagent-server server))))
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
194
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
195 ;; Use nnml functions for just about everything.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
196 (nnoo-import nnagent
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
197 (nnml))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
198
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
199
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
200 ;;; Internal functions.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
201
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
202 (provide 'nnagent)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
203
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
204 ;;; nnagent.el ends here