]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge changes made in Gnus trunk.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 21 Aug 2011 22:10:49 +0000 (22:10 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Sun, 21 Aug 2011 22:10:49 +0000 (22:10 +0000)
nnmail.el (nnmail-get-new-mail-1): If one mail source bugs out, continue on and do the clean-up phase (bug#9188).
gnus-sum.el (gnus-summary-expire-articles): When expiring articles, just ignore groups that can't be opened instead of erroring out (bug#9225).
gnus-art.el (gnus-article-update-date-headers): Flip the default to nil since some many people are fuddy-duddies.
gnus-html.el (gnus-html-image-fetched): Don't cache zero-length images.

lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
lisp/gnus/gnus-html.el
lisp/gnus/gnus-sum.el
lisp/gnus/nnmail.el

index 4fc144b81b96f72e2fa4b585861149d646578076..ad3e26f0f5164933fce44d7730c70581339cf412 100644 (file)
@@ -1,5 +1,18 @@
 2011-08-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * nnmail.el (nnmail-get-new-mail-1): If one mail source bugs out,
+       continue on and do the clean-up phase (bug#9188).
+
+       * gnus-sum.el (gnus-summary-expire-articles): When expiring articles,
+       just ignore groups that can't be opened instead of erroring out
+       (bug#9225).
+
+       * gnus-art.el (gnus-article-update-date-headers): Flip the default to
+       nil since some many people are fuddy-duddies.
+
+       * gnus-html.el (gnus-html-image-fetched): Don't cache zero-length
+       images.
+
        * nntp.el (nntp-authinfo-file): Mark as obsolete -- use auth-source
        instead.
 
index c6e0180dadc3ede5548741a177d87ac8b112461e..eaf0ed52f518560347a96e28ea36fce469b02fbf 100644 (file)
@@ -1039,7 +1039,7 @@ Some of these headers are updated automatically.  See
          (item :tag "ISO8601 format" :value 'iso8601)
          (item :tag "User-defined" :value 'user-defined)))
 
-(defcustom gnus-article-update-date-headers 1
+(defcustom gnus-article-update-date-headers nil
   "A number that says how often to update the date header (in seconds).
 If nil, don't update it at all."
   :version "24.1"
index d3da6aab1b72053dcdcbd71034df649cc3ee4634..f443c4021e295cc8764203ae163168c3425de39f 100644 (file)
@@ -399,15 +399,16 @@ Use ALT-TEXT for the image string."
 (defun gnus-html-image-fetched (status buffer image)
   "Callback function called when image has been fetched."
   (unless (plist-get status :error)
-    (when gnus-html-image-automatic-caching
-      (url-store-in-cache (current-buffer)))
     (when (and (or (search-forward "\n\n" nil t)
                    (search-forward "\r\n\r\n" nil t))
-               (buffer-live-p buffer))
-      (let ((data (buffer-substring (point) (point-max))))
-        (with-current-buffer buffer
-          (let ((inhibit-read-only t))
-            (gnus-html-put-image data (car image) (cadr image)))))))
+              (not (eobp)))
+      (when gnus-html-image-automatic-caching
+       (url-store-in-cache (current-buffer)))
+      (when (buffer-live-p buffer)
+       (let ((data (buffer-substring (point) (point-max))))
+         (with-current-buffer buffer
+           (let ((inhibit-read-only t))
+             (gnus-html-put-image data (car image) (cadr image))))))))
   (kill-buffer (current-buffer)))
 
 (defun gnus-html-get-image-data (url)
index 73ecffb090eee76ae461ab5befdedb9afe919ec0..c01f91973a0fd6b64f1a5e95281904dc5130aed9 100644 (file)
@@ -10287,34 +10287,33 @@ This will be the case if the article has both been mailed and posted."
        ;; There are expirable articles in this group, so we run them
        ;; through the expiry process.
        (gnus-message 6 "Expiring articles...")
-       (unless (gnus-check-group gnus-newsgroup-name)
-         (error "Can't open server for %s" gnus-newsgroup-name))
-       ;; The list of articles that weren't expired is returned.
-       (save-excursion
-         (if expiry-wait
-             (let ((nnmail-expiry-wait-function nil)
-                   (nnmail-expiry-wait expiry-wait))
-               (setq es (gnus-request-expire-articles
-                         expirable gnus-newsgroup-name)))
-           (setq es (gnus-request-expire-articles
-                     expirable gnus-newsgroup-name)))
-         (unless total
-           (setq gnus-newsgroup-expirable es))
-         ;; We go through the old list of expirable, and mark all
-         ;; really expired articles as nonexistent.
-         (unless (eq es expirable) ;If nothing was expired, we don't mark.
-           (let ((gnus-use-cache nil))
-             (dolist (article expirable)
-               (when (and (not (memq article es))
-                          (gnus-data-find article))
-                 (gnus-summary-mark-article article gnus-canceled-mark)
-                 (run-hook-with-args 'gnus-summary-article-expire-hook
-                                     'delete
-                                     (gnus-data-header
-                                      (assoc article (gnus-data-list nil)))
-                                     gnus-newsgroup-name
-                                     nil
-                                     nil))))))
+       (when (gnus-check-group gnus-newsgroup-name)
+         ;; The list of articles that weren't expired is returned.
+         (save-excursion
+           (if expiry-wait
+               (let ((nnmail-expiry-wait-function nil)
+                     (nnmail-expiry-wait expiry-wait))
+                 (setq es (gnus-request-expire-articles
+                           expirable gnus-newsgroup-name)))
+             (setq es (gnus-request-expire-articles
+                       expirable gnus-newsgroup-name)))
+           (unless total
+             (setq gnus-newsgroup-expirable es))
+           ;; We go through the old list of expirable, and mark all
+           ;; really expired articles as nonexistent.
+           (unless (eq es expirable) ;If nothing was expired, we don't mark.
+             (let ((gnus-use-cache nil))
+               (dolist (article expirable)
+                 (when (and (not (memq article es))
+                            (gnus-data-find article))
+                   (gnus-summary-mark-article article gnus-canceled-mark)
+                   (run-hook-with-args 'gnus-summary-article-expire-hook
+                                       'delete
+                                       (gnus-data-header
+                                        (assoc article (gnus-data-list nil)))
+                                       gnus-newsgroup-name
+                                       nil
+                                       nil)))))))
        (gnus-message 6 "Expiring articles...done")))))
 
 (defun gnus-summary-expire-articles-now ()
index dc2080dee1ac3e62343eda26cdd29cd8a340a75a..d83467a1ed59355456519e542aa414ad99d8cf80 100644 (file)
@@ -1842,18 +1842,23 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
       ;; and fetch the mail from each.
       (while (setq source (pop fetching-sources))
        (when (setq new
-                   (mail-source-fetch
-                    source
-                    (gnus-byte-compile
-                     `(lambda (file orig-file)
-                        (nnmail-split-incoming
-                         file ',(intern (format "%s-save-mail" method))
-                         ',spool-func
-                         (or in-group
-                             (if (equal file orig-file)
-                                 nil
-                               (nnmail-get-split-group orig-file ',source)))
-                         ',(intern (format "%s-active-number" method)))))))
+                   (condition-case cond
+                       (mail-source-fetch
+                        source
+                        (gnus-byte-compile
+                         `(lambda (file orig-file)
+                            (nnmail-split-incoming
+                             file ',(intern (format "%s-save-mail" method))
+                             ',spool-func
+                             (or in-group
+                                 (if (equal file orig-file)
+                                     nil
+                                   (nnmail-get-split-group orig-file
+                                                           ',source)))
+                             ',(intern (format "%s-active-number" method))))))
+                     ((error quit)
+                      (message "Mail source %s failed: %s" source cond)
+                      0)))
          (incf total new)
          (incf i)))
       ;; If we did indeed read any incoming spools, we save all info.