emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103028: nnimap.el (nnimap-request-he


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103028: nnimap.el (nnimap-request-head): Protect against not finding the article by Message-ID.
Date: Sun, 30 Jan 2011 01:46:32 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103028
author: Lars Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Sun 2011-01-30 01:46:32 +0000
message:
  nnimap.el (nnimap-request-head): Protect against not finding the article by 
Message-ID.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/nnimap.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-01-29 02:29:38 +0000
+++ b/lisp/gnus/ChangeLog       2011-01-30 01:46:32 +0000
@@ -1,3 +1,8 @@
+2011-01-30  Lars Ingebrigtsen  <address@hidden>
+
+       * nnimap.el (nnimap-request-head): Protect against not finding the
+       article by Message-ID.
+
 2011-01-29  Lars Ingebrigtsen  <address@hidden>
 
        * gnus-art.el (article-update-date-lapsed): Try a better way to really

=== modified file 'lisp/gnus/nnimap.el'
--- a/lisp/gnus/nnimap.el       2011-01-25 23:51:40 +0000
+++ b/lisp/gnus/nnimap.el       2011-01-30 01:46:32 +0000
@@ -519,15 +519,17 @@
     (with-current-buffer (nnimap-buffer)
       (when (stringp article)
        (setq article (nnimap-find-article-by-message-id group article)))
-      (nnimap-get-whole-article
-       article (format "UID FETCH %%d %s"
-                      (nnimap-header-parameters)))
-      (let ((buffer (current-buffer)))
-       (with-current-buffer (or to-buffer nntp-server-buffer)
-         (erase-buffer)
-         (insert-buffer-substring buffer)
-         (nnheader-ms-strip-cr)
-         (cons group article))))))
+      (if (null article)
+         nil
+       (nnimap-get-whole-article
+        article (format "UID FETCH %%d %s"
+                        (nnimap-header-parameters)))
+       (let ((buffer (current-buffer)))
+         (with-current-buffer (or to-buffer nntp-server-buffer)
+           (erase-buffer)
+           (insert-buffer-substring buffer)
+           (nnheader-ms-strip-cr)
+           (cons group article)))))))
 
 (defun nnimap-get-whole-article (article &optional command)
   (let ((result


reply via email to

[Prev in Thread] Current Thread [Next in Thread]