aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/gnus-html.el18
2 files changed, 17 insertions, 7 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 8c7d93567e7..884441db4b8 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
12010-09-01 Teodor Zlatanov <tzz@lifelogs.com>
2
3 * gnus-html.el (gnus-html-wash-tags)
4 (gnus-html-schedule-image-fetching, gnus-html-prefetch-images): Add
5 extra logging.
6
12010-09-01 Lars Magne Ingebrigtsen <larsi@gnus.org> 72010-09-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 8
3 * gnus-html.el (gnus-html-wash-tags): Delete the IMG_ALT region. 9 * gnus-html.el (gnus-html-wash-tags): Delete the IMG_ALT region.
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index 888b2988104..2e44c3f5607 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -107,8 +107,9 @@
107 (cond 107 (cond
108 ;; Fetch and insert a picture. 108 ;; Fetch and insert a picture.
109 ((equal tag "img_alt") 109 ((equal tag "img_alt")
110 (when (string-match "src=\"\\([^\"]+\\)" parameters) 110 (when (string-match "src=\"\\([^\"]+\\)" parameters)
111 (setq url (match-string 1 parameters)) 111 (setq url (match-string 1 parameters))
112 (gnus-message 8 "Fetching image URL %s" url)
112 (if (string-match "^cid:\\(.*\\)" url) 113 (if (string-match "^cid:\\(.*\\)" url)
113 ;; URLs with cid: have their content stashed in other 114 ;; URLs with cid: have their content stashed in other
114 ;; parts of the MIME structure, so just insert them 115 ;; parts of the MIME structure, so just insert them
@@ -142,6 +143,7 @@
142 ((equal tag "a") 143 ((equal tag "a")
143 (when (string-match "href=\"\\([^\"]+\\)" parameters) 144 (when (string-match "href=\"\\([^\"]+\\)" parameters)
144 (setq url (match-string 1 parameters)) 145 (setq url (match-string 1 parameters))
146 (gnus-message 8 "Fetching link URL %s" url)
145 (gnus-article-add-button start end 147 (gnus-article-add-button start end
146 'browse-url url 148 'browse-url url
147 url) 149 url)
@@ -167,6 +169,7 @@
167 (gnus-html-schedule-image-fetching (current-buffer) (nreverse images))))) 169 (gnus-html-schedule-image-fetching (current-buffer) (nreverse images)))))
168 170
169(defun gnus-html-schedule-image-fetching (buffer images) 171(defun gnus-html-schedule-image-fetching (buffer images)
172 (gnus-message 8 "Scheduling image fetching in buffer %s, images %s" buffer images)
170 (let* ((url (caar images)) 173 (let* ((url (caar images))
171 (process (start-process 174 (process (start-process
172 "images" nil "curl" 175 "images" nil "curl"
@@ -250,12 +253,13 @@
250 (save-match-data 253 (save-match-data
251 (while (re-search-forward "<img.*src=[\"']\\([^\"']+\\)" nil t) 254 (while (re-search-forward "<img.*src=[\"']\\([^\"']+\\)" nil t)
252 (let ((url (match-string 1))) 255 (let ((url (match-string 1)))
253 (when (or (null blocked-images) 256 (if (or (null blocked-images)
254 (not (string-match blocked-images url))) 257 (not (string-match blocked-images url)))
255 (unless (file-exists-p (gnus-html-image-id url)) 258 (unless (file-exists-p (gnus-html-image-id url))
256 (push url urls) 259 (push url urls)
257 (push (gnus-html-image-id url) urls) 260 (push (gnus-html-image-id url) urls)
258 (push "-o" urls))))) 261 (push "-o" urls))
262 (gnus-message 8 "Image URL %s is blocked" url))))
259 (let ((process 263 (let ((process
260 (apply 'start-process 264 (apply 'start-process
261 "images" nil "curl" 265 "images" nil "curl"