Function: nnbabyl-request-article
nnbabyl-request-article is a byte-compiled function defined in
nnbabyl.el.gz.
Signature
(nnbabyl-request-article ARTICLE &optional NEWSGROUP SERVER BUFFER)
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/nnbabyl.el.gz
(deffoo nnbabyl-request-article (article &optional newsgroup server buffer)
(nnbabyl-possibly-change-newsgroup newsgroup server)
(with-current-buffer nnbabyl-mbox-buffer
(goto-char (point-min))
(when (search-forward (nnbabyl-article-string article) nil t)
(let (start stop summary-line)
(unless (re-search-backward (concat "^" nnbabyl-mail-delimiter) nil t)
(goto-char (point-min))
(end-of-line))
(while (and (not (looking-at ".+:"))
(zerop (forward-line 1))))
(setq start (point))
(or (when (re-search-forward
(concat "^" nnbabyl-mail-delimiter) nil t)
(beginning-of-line)
t)
(goto-char (point-max)))
(setq stop (point))
(let ((nntp-server-buffer (or buffer nntp-server-buffer)))
(set-buffer nntp-server-buffer)
(erase-buffer)
(insert-buffer-substring nnbabyl-mbox-buffer start stop)
(goto-char (point-min))
;; If there is an EOOH header, then we have to remove some
;; duplicated headers.
(setq summary-line (looking-at "Summary-line:"))
(when (search-forward "\n*** EOOH ***" nil t)
(if summary-line
;; The headers to be deleted are located before the
;; EOOH line...
(delete-region (point-min) (progn (forward-line 1)
(point)))
;; ...or after.
(delete-region (progn (beginning-of-line) (point))
(or (search-forward "\n\n" nil t)
(point)))))
(if (numberp article)
(cons nnbabyl-current-group article)
(nnbabyl-article-group-number)))))))