Function: nndiary-request-article
nndiary-request-article is a byte-compiled function defined in
nndiary.el.gz.
Signature
(nndiary-request-article ID &optional GROUP SERVER BUFFER)
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/nndiary.el.gz
(deffoo nndiary-request-article (id &optional group server buffer)
(nndiary-possibly-change-directory group server)
(let* ((nntp-server-buffer (or buffer nntp-server-buffer))
(file-name-coding-system nnmail-pathname-coding-system)
path gpath group-num)
(if (stringp id)
(when (and (setq group-num (nndiary-find-group-number id))
(cdr
(assq (cdr group-num)
(nnheader-article-to-file-alist
(setq gpath
(nnmail-group-pathname
(car group-num)
nndiary-directory))))))
(setq path (concat gpath (int-to-string (cdr group-num)))))
(setq path (nndiary-article-to-file id)))
(cond
((not path)
(nnheader-report 'nndiary "No such article: %s" id))
((not (file-exists-p path))
(nnheader-report 'nndiary "No such file: %s" path))
((file-directory-p path)
(nnheader-report 'nndiary "File is a directory: %s" path))
((not (save-excursion (let ((nnmail-file-coding-system
nndiary-file-coding-system))
(nnmail-find-file path))))
(nnheader-report 'nndiary "Couldn't read file: %s" path))
(t
(nnheader-report 'nndiary "Article %s retrieved" id)
;; We return the article number.
(cons (if group-num (car group-num) group)
(string-to-number (file-name-nondirectory path)))))))