Sync up with Gnus 5.6.30.
[elisp/gnus.git-] / lisp / gnus-cache.el
index 04a3ad7..ff070f8 100644 (file)
@@ -181,8 +181,12 @@ variable to \"^nnml\"."
              ;; [number subject from date id references chars lines xref]
              (insert (format "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\n"
                              (mail-header-number headers)
-                             (mail-header-subject headers)
-                             (mail-header-from headers)
+                             (let ((subject (mail-header-subject headers)))
+                               (or (get-text-property 0 'raw-text subject)
+                                   subject))
+                             (let ((from (mail-header-from headers)))
+                               (or (get-text-property 0 'raw-text from)
+                                   from))
                              (mail-header-date headers)
                              (mail-header-id headers)
                              (or (mail-header-references headers) "")
@@ -347,7 +351,7 @@ Returns the list of articles removed."
 (defun gnus-summary-insert-cached-articles ()
   "Insert all the articles cached for this group into the current buffer."
   (interactive)
-  (let ((cached gnus-newsgroup-cached)
+  (let ((cached (sort (copy-sequence gnus-newsgroup-cached) '<))
        (gnus-verbose (max 6 gnus-verbose)))
     (unless cached
       (gnus-message 3 "No cached articles for this group"))
@@ -405,7 +409,8 @@ Returns the list of articles removed."
 
 (defun gnus-cache-update-article (group article)
   "If ARTICLE is in the cache, remove it and re-enter it."
-  (when (gnus-cache-possibly-remove-article article nil nil nil t)
+  (gnus-cache-change-buffer group)
+  (when (gnus-cache-possibly-remove-article article nil nil nil t)    
     (let ((gnus-use-cache nil))
       (gnus-cache-possibly-enter-article
        gnus-newsgroup-name article (gnus-summary-article-header article)