1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Merge changes made in Gnus trunk.

imap.el: Revert back to version cb950ed8ff3e0f40dac437a51b269166f9ffb60d, since some of the changes seem problematic.

Fix up the w3m/curl dependencies.
mm-decode.el (mm-text-html-renderer): Don't have gnus-article-html depend on curl, which isn't essential.
gnus-html.el (gnus-html-schedule-image-fetching, gnus-html-prefetch-images): Check for curl before using it.
This commit is contained in:
Lars Magne Ingebrigtsen 2010-09-14 23:14:44 +00:00 committed by Katsumi Yamaoka
parent 3b59c3511c
commit 01e80360d0
5 changed files with 232 additions and 56 deletions

View file

@ -288,18 +288,19 @@ fit these criteria."
(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))
@ -441,7 +442,8 @@ This only works if the article in question is HTML."
;;;###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