\f
-(defconst nnvirtual-version "nnvirtual 0.0"
+(defconst nnvirtual-version "nnvirtual 1.0"
"Version number of this version of nnvirtual.")
(defvar nnvirtual-group-alist nil)
;;; Interface functions.
-(defun nnvirtual-retrieve-headers (sequence &optional newsgroup server)
+(defun nnvirtual-retrieve-headers (sequence &optional newsgroup server fetch-old)
"Retrieve the headers for the articles in SEQUENCE."
(nnvirtual-possibly-change-newsgroups newsgroup server t)
(save-excursion
(gnus-find-method-for-group group))
(and (or (gnus-server-opened group-method)
(gnus-open-server group-method))
+ (gnus-request-group group t)
(gnus-retrieve-headers articles group)))))
(save-excursion
(set-buffer nntp-server-buffer)
(let ((unfetched (gnus-sorted-complement
articles (nreverse fetched-articles))))
(and unfetched
- (gnus-group-make-articles-read group unfetched nil))))
+ (gnus-group-make-articles-read group unfetched))))
;; The headers are ready for reading, so they are inserted into
;; the nntp-server-buffer, which is where Gnus expects to find
;; them.
(setq nnvirtual-status-string "No component groups")
(setq nnvirtual-current-group nil)
nil))))
+
+(defun nnvirtual-request-type (group &optional article)
+ (nnvirtual-possibly-change-newsgroups group nil)
+ (if (not article)
+ 'unknown
+ (gnus-request-type (car (nnvirtual-art-group article)))))
(defun nnvirtual-close-group (group &optional server)
(if (not nnvirtual-current-group)
"nnvirtual: LIST NEWSGROUPS is not implemented.")
nil)
-(defalias 'nnvirtual-request-post 'nntp-request-post)
-
-(defun nnvirtual-request-post-buffer
- (post group subject header article-buffer info follow-to respect-poster)
- (nntp-request-post-buffer post "" subject header article-buffer
- info follow-to respect-poster))
-
\f
;;; Internal functions.
-;; Convert HEAD headers into NOV headers.
(defun nnvirtual-convert-headers ()
+ "Convert HEAD headers into NOV headers."
(save-excursion
(set-buffer nntp-server-buffer)
- (let* ((gnus-newsgroup-dependencies (make-vector 100 0))
- (headers (gnus-get-newsgroup-headers))
+ (let* ((dependencies (make-vector 100 0))
+ (headers (gnus-get-newsgroup-headers dependencies))
header)
(erase-buffer)
(while headers
- (setq header (car headers)
- headers (cdr headers))
+ (setq header (pop headers))
(insert (int-to-string (mail-header-number header)) "\t"
(or (mail-header-subject header) "") "\t"
(or (mail-header-from header) "") "\t"
()
;; And then we do the mapping for this component group. If
;; you feel tempted to cast your eyes to the soup below -
- ;; don't. It'll hurt your soul. Suffice to say that it
+ ;; don't. It'll hurt your soul. Suffice to say that it
;; assigns ranges of nnvirtual article numbers to the
- ;; different component groups. To get the article number
+ ;; different component groups. To get the article number
;; from the nnvirtual number, one does something like
;; (+ (- number offset) (car active)), where `offset' is the
;; slice the mess below assigns, and active is the lowest