]> git.eshelyaron.com Git - emacs.git/commitdiff
gnus-html.el: Add extra logging.
authorTeodor Zlatanov <tzz@lifelogs.com>
Wed, 1 Sep 2010 23:46:59 +0000 (23:46 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 1 Sep 2010 23:46:59 +0000 (23:46 +0000)
lisp/gnus/ChangeLog
lisp/gnus/gnus-html.el

index 8c7d93567e75017c0850fc2d04e9bdb6ba9cc900..884441db4b87cf9a666ef26e9f27f16e7f427460 100644 (file)
@@ -1,3 +1,9 @@
+2010-09-01  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * 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  <larsi@gnus.org>
 
        * gnus-html.el (gnus-html-wash-tags): Delete the IMG_ALT region.
index 888b2988104637489baff799bfe1b6d6ab8ded22..2e44c3f5607b808987f70b760a26f6192881fb4c 100644 (file)
       (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
        ((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)
       (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"
       (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"