2010-09-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * gnus-html.el (gnus-html-schedule-image-fetching)
+ (gnus-html-prefetch-images): Check for curl before using it.
+
+ * mm-decode.el (mm-text-html-renderer): Don't have gnus-article-html
+ depend on curl, which isn't essential.
+
* imap.el: Revert back to version
cb950ed8ff3e0f40dac437a51b269166f9ffb60d, since some of the changes
seem problematic.
(defun gnus-html-schedule-image-fetching (buffer images)
(gnus-message 8 "gnus-html-schedule-image-fetching: buffer %s, images %s"
buffer images)
- (let* ((url (caar images))
- (process (start-process
- "images" nil "curl"
- "-s" "--create-dirs"
- "--location"
- "--max-time" "60"
- "-o" (gnus-html-image-id url)
- (mm-url-decode-entities-string url))))
- (process-kill-without-query process)
- (set-process-sentinel process 'gnus-html-curl-sentinel)
- (gnus-set-process-plist process (list 'images images
- 'buffer buffer))))
+ (when (executable-find "curl")
+ (let* ((url (caar images))
+ (process (start-process
+ "images" nil "curl"
+ "-s" "--create-dirs"
+ "--location"
+ "--max-time" "60"
+ "-o" (gnus-html-image-id url)
+ (mm-url-decode-entities-string url))))
+ (process-kill-without-query process)
+ (set-process-sentinel process 'gnus-html-curl-sentinel)
+ (gnus-set-process-plist process (list 'images images
+ 'buffer buffer)))))
(defun gnus-html-image-id (url)
(expand-file-name (sha1 url) gnus-html-cache-directory))
;;;###autoload
(defun gnus-html-prefetch-images (summary)
(let (blocked-images urls)
- (when (buffer-live-p summary)
+ (when (and (buffer-live-p summary)
+ (executable-find "curl"))
(with-current-buffer summary
(setq blocked-images gnus-blocked-images))
(save-match-data
,disposition ,description ,cache ,id))
(defcustom mm-text-html-renderer
- (cond ((and (executable-find "w3m")
- (executable-find "curl"))
- 'gnus-article-html)
+ (cond ((executable-find "w3m") 'gnus-article-html)
((executable-find "links") 'links)
((executable-find "lynx") 'lynx)
((locate-library "w3") 'w3)