*** empty log message ***
[gnus] / lisp / gnus-cache.el
index af2513b..d1f8290 100644 (file)
@@ -1,7 +1,7 @@
 ;;; gnus-cache.el --- cache interface for Gnus
 ;; Copyright (C) 1995,96,97,98 Free Software Foundation, Inc.
 
-;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
 
 ;; This file is part of GNU Emacs.
@@ -347,7 +347,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 +405,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)
@@ -607,8 +608,9 @@ If LOW, update the lower bound instead."
          (if top
              ""
            (string-match
-            (concat "^" (file-name-as-directory
-                         (expand-file-name gnus-cache-directory)))
+            (concat "^" (regexp-quote
+                         (file-name-as-directory
+                          (expand-file-name gnus-cache-directory))))
             (directory-file-name directory))
            (nnheader-replace-chars-in-string
             (substring (directory-file-name directory) (match-end 0))