diff options
author | Teodor Zlatanov <[email protected]> | 2010-09-01 23:46:59 +0000 |
---|---|---|
committer | Katsumi Yamaoka <[email protected]> | 2010-09-01 23:46:59 +0000 |
commit | 6ca07e49603dee2fe0a0f8c582036d749bd2ca99 (patch) | |
tree | 2b726531776a8802c3f0f0be1f844dd60983abf2 | |
parent | fe01e1a3a0fc9f189a26ef8b0712672169d2e2bf (diff) |
gnus-html.el: Add extra logging.
-rw-r--r-- | lisp/gnus/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/gnus/gnus-html.el | 18 |
2 files changed, 17 insertions, 7 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 8c7d93567e..884441db4b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2010-09-01 Teodor Zlatanov <[email protected]> + + * gnus-html.el (gnus-html-wash-tags) + (gnus-html-schedule-image-fetching, gnus-html-prefetch-images): Add + extra logging. + 2010-09-01 Lars Magne Ingebrigtsen <[email protected]> * 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 888b298810..2e44c3f560 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el @@ -107,8 +107,9 @@ (cond ;; Fetch and insert a picture. ((equal tag "img_alt") - (when (string-match "src=\"\\([^\"]+\\)" parameters) + (when (string-match "src=\"\\([^\"]+\\)" parameters) (setq url (match-string 1 parameters)) + (gnus-message 8 "Fetching image URL %s" url) (if (string-match "^cid:\\(.*\\)" url) ;; URLs with cid: have their content stashed in other ;; parts of the MIME structure, so just insert them @@ -142,6 +143,7 @@ ((equal tag "a") (when (string-match "href=\"\\([^\"]+\\)" parameters) (setq url (match-string 1 parameters)) + (gnus-message 8 "Fetching link URL %s" url) (gnus-article-add-button start end 'browse-url url url) @@ -167,6 +169,7 @@ (gnus-html-schedule-image-fetching (current-buffer) (nreverse images))))) (defun gnus-html-schedule-image-fetching (buffer images) + (gnus-message 8 "Scheduling image fetching in buffer %s, images %s" buffer images) (let* ((url (caar images)) (process (start-process "images" nil "curl" @@ -250,12 +253,13 @@ (save-match-data (while (re-search-forward "<img.*src=[\"']\\([^\"']+\\)" nil t) (let ((url (match-string 1))) - (when (or (null blocked-images) - (not (string-match blocked-images url))) - (unless (file-exists-p (gnus-html-image-id url)) - (push url urls) - (push (gnus-html-image-id url) urls) - (push "-o" urls))))) + (if (or (null blocked-images) + (not (string-match blocked-images url))) + (unless (file-exists-p (gnus-html-image-id url)) + (push url urls) + (push (gnus-html-image-id url) urls) + (push "-o" urls)) + (gnus-message 8 "Image URL %s is blocked" url)))) (let ((process (apply 'start-process "images" nil "curl" |