Function: nntp-retrieve-data

nntp-retrieve-data is a byte-compiled function defined in nntp.el.gz.

Signature

(nntp-retrieve-data COMMAND ADDRESS PORT BUFFER &optional WAIT-FOR CALLBACK DECODE)

Documentation

Use COMMAND to retrieve data into BUFFER from PORT on ADDRESS.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nntp.el.gz
(defun nntp-retrieve-data (command address _port buffer
				      &optional wait-for callback decode)
  "Use COMMAND to retrieve data into BUFFER from PORT on ADDRESS."
  (let ((process (or (nntp-find-connection buffer)
		     (nntp-open-connection buffer))))
    (if process
        (progn
          (unless (or nntp-inhibit-erase nnheader-callback-function)
	    (nntp-erase-buffer (process-buffer process)))
          (condition-case err
              (progn
                (when command
                  (nntp-send-string process command))
                (cond
                 ((eq callback 'ignore)
                  t)
                 ((and callback wait-for)
                  (nntp-async-wait process wait-for buffer decode callback)
                  t)
                 (wait-for
                  (nntp-wait-for process wait-for buffer decode))
                 (t t)))
	    (nntp-authinfo-rejected
	     (signal 'nntp-authinfo-rejected (cdr err)))
            (error
             (nnheader-report 'nntp "Couldn't open connection to %s: %s"
                              address err))
            (quit
             (message "Quit retrieving data from nntp")
             (signal 'quit nil)
             nil)))
      (nnheader-report 'nntp "Couldn't open connection to %s" address))))