Function: newsticker--image-sentinel
newsticker--image-sentinel is a byte-compiled function defined in
newst-backend.el.gz.
Signature
(newsticker--image-sentinel PROCESS EVENT)
Documentation
Sentinel for image-retrieving PROCESS caused by EVENT.
Source Code
;; Defined in /usr/src/emacs/lisp/net/newst-backend.el.gz
(defun newsticker--image-sentinel (process _event)
"Sentinel for image-retrieving PROCESS caused by EVENT."
(let* ((p-status (process-status process))
(exit-status (process-exit-status process))
(feed-name (process-get process 'nt-feed-name))
(directory (process-get process 'nt-directory))
(filename (process-get process 'nt-filename)))
;; catch known errors (zombie processes, rubbish-xml, etc.)
;; if an error occurs the news feed is not updated!
(catch 'oops
(unless (and (eq p-status 'exit)
(= exit-status 0))
(message "%s: Error while retrieving image from %s"
(format-time-string "%A, %H:%M")
feed-name)
(newsticker--image-remove directory feed-name)
(throw 'oops nil))
(newsticker--image-save (process-buffer process) directory filename))))