Mercurial > emacs
annotate lisp/gnus/gnus-cache.el @ 86733:78712c70c05b
Move to etc/nxml
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 28 Nov 2007 05:08:52 +0000 |
parents | a3c27999decb |
children | 781256628613 880960b70474 |
rev | line source |
---|---|
17493 | 1 ;;; gnus-cache.el --- cache interface for Gnus |
64754
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
2 |
61424
ad05d91d3598
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Miles Bader <miles@gnu.org>
parents:
59089
diff
changeset
|
3 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, |
75347 | 4 ;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc. |
17493 | 5 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
17493 | 7 ;; Keywords: news |
8 | |
9 ;; This file is part of GNU Emacs. | |
10 | |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
78224
24202b793a08
Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents:
75347
diff
changeset
|
13 ;; the Free Software Foundation; either version 3, or (at your option) |
17493 | 14 ;; any later version. |
15 | |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
64085 | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 ;; Boston, MA 02110-1301, USA. | |
17493 | 25 |
26 ;;; Commentary: | |
27 | |
28 ;;; Code: | |
29 | |
19493
8d840c4548c0
Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
30 (eval-when-compile (require 'cl)) |
8d840c4548c0
Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
31 |
17493 | 32 (require 'gnus) |
33 (eval-when-compile | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
34 (unless (fboundp 'gnus-agent-load-alist) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
35 (defun gnus-agent-load-alist (group))) |
17493 | 36 (require 'gnus-sum)) |
37 | |
38 (defcustom gnus-cache-active-file | |
33379
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
39 (expand-file-name "active" gnus-cache-directory) |
17493 | 40 "*The cache active file." |
41 :group 'gnus-cache | |
42 :type 'file) | |
43 | |
44 (defcustom gnus-cache-enter-articles '(ticked dormant) | |
45 "Classes of articles to enter into the cache." | |
46 :group 'gnus-cache | |
47 :type '(set (const ticked) (const dormant) (const unread) (const read))) | |
48 | |
49 (defcustom gnus-cache-remove-articles '(read) | |
50 "Classes of articles to remove from the cache." | |
51 :group 'gnus-cache | |
52 :type '(set (const ticked) (const dormant) (const unread) (const read))) | |
53 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
54 (defcustom gnus-cacheable-groups nil |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
55 "*Groups that match this regexp will be cached. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
56 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
57 If you only want to cache your nntp groups, you could set this |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
58 variable to \"^nntp\". |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
59 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
60 If a group matches both gnus-cacheable-groups and gnus-uncacheable-groups |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
61 it's not cached." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
62 :group 'gnus-cache |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
63 :type '(choice (const :tag "off" nil) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
64 regexp)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
65 |
17493 | 66 (defcustom gnus-uncacheable-groups nil |
67 "*Groups that match this regexp will not be cached. | |
68 | |
69 If you want to avoid caching your nnml groups, you could set this | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
70 variable to \"^nnml\". |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
71 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
72 If a group matches both gnus-cacheable-groups and gnus-uncacheable-groups |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
73 it's not cached." |
17493 | 74 :group 'gnus-cache |
75 :type '(choice (const :tag "off" nil) | |
76 regexp)) | |
77 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
78 (defvar gnus-cache-overview-coding-system 'raw-text |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
79 "Coding system used on Gnus cache files.") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
80 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
81 (defvar gnus-cache-coding-system 'raw-text |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
82 "Coding system used on Gnus cache files.") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
83 |
17493 | 84 |
85 | |
86 ;;; Internal variables. | |
87 | |
88 (defvar gnus-cache-removable-articles nil) | |
89 (defvar gnus-cache-buffer nil) | |
90 (defvar gnus-cache-active-hashtb nil) | |
91 (defvar gnus-cache-active-altered nil) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
92 (defvar gnus-cache-total-fetched-hashtb nil) |
17493 | 93 |
94 (eval-and-compile | |
95 (autoload 'nnml-generate-nov-databases-1 "nnml") | |
96 (autoload 'nnvirtual-find-group-art "nnvirtual")) | |
97 | |
98 | |
99 | |
100 ;;; Functions called from Gnus. | |
101 | |
102 (defun gnus-cache-open () | |
103 "Initialize the cache." | |
104 (when (or (file-exists-p gnus-cache-directory) | |
105 (and gnus-use-cache | |
106 (not (eq gnus-use-cache 'passive)))) | |
107 (gnus-cache-read-active))) | |
108 | |
109 ;; Complexities of byte-compiling make this kludge necessary. Eeek. | |
110 (ignore-errors | |
111 (gnus-add-shutdown 'gnus-cache-close 'gnus)) | |
112 | |
113 (defun gnus-cache-close () | |
114 "Shut down the cache." | |
115 (gnus-cache-write-active) | |
116 (gnus-cache-save-buffers) | |
117 (setq gnus-cache-active-hashtb nil)) | |
118 | |
119 (defun gnus-cache-save-buffers () | |
120 ;; save the overview buffer if it exists and has been modified | |
121 ;; delete empty cache subdirectories | |
122 (when gnus-cache-buffer | |
123 (let ((buffer (cdr gnus-cache-buffer)) | |
124 (overview-file (gnus-cache-file-name | |
125 (car gnus-cache-buffer) ".overview"))) | |
126 ;; write the overview only if it was modified | |
57243
c5e16264557d
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-575
Miles Bader <miles@gnu.org>
parents:
56927
diff
changeset
|
127 (when (and (buffer-live-p buffer) (buffer-modified-p buffer)) |
c5e16264557d
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-575
Miles Bader <miles@gnu.org>
parents:
56927
diff
changeset
|
128 (with-current-buffer buffer |
17493 | 129 (if (> (buffer-size) 0) |
130 ;; Non-empty overview, write it to a file. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
131 (let ((coding-system-for-write |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
132 gnus-cache-overview-coding-system)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
133 (gnus-write-buffer overview-file)) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
134 (let ((file-name-coding-system nnmail-pathname-coding-system)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
135 ;; Empty overview file, remove it |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
136 (when (file-exists-p overview-file) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
137 (delete-file overview-file)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
138 ;; If possible, remove group's cache subdirectory. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
139 (condition-case nil |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
140 ;; FIXME: we can detect the error type and warn the user |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
141 ;; of any inconsistencies (articles w/o nov entries?). |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
142 ;; for now, just be conservative...delete only if safe -- sj |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
143 (delete-directory (file-name-directory overview-file)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
144 (error)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
145 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
146 (gnus-cache-update-overview-total-fetched-for |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
147 (car gnus-cache-buffer) overview-file))) |
17493 | 148 ;; Kill the buffer -- it's either unmodified or saved. |
149 (gnus-kill-buffer buffer) | |
150 (setq gnus-cache-buffer nil)))) | |
151 | |
152 (defun gnus-cache-possibly-enter-article | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
153 (group article ticked dormant unread &optional force) |
17493 | 154 (when (and (or force (not (eq gnus-use-cache 'passive))) |
155 (numberp article) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
156 (> article 0)) ; This might be a dummy article. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
157 (let ((number article) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
158 file headers lines-chars |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
159 (file-name-coding-system nnmail-pathname-coding-system)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
160 ;; If this is a virtual group, we find the real group. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
161 (when (gnus-virtual-group-p group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
162 (let ((result (nnvirtual-find-group-art |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
163 (gnus-group-real-name group) article))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
164 (setq group (car result) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
165 number (cdr result)))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
166 (when (and number |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
167 (> number 0) ; Reffed article. |
17493 | 168 (or force |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
169 (and (gnus-cache-fully-p group) |
17493 | 170 (gnus-cache-member-of-class |
171 gnus-cache-enter-articles ticked dormant unread))) | |
172 (not (file-exists-p (setq file (gnus-cache-file-name | |
173 group number))))) | |
174 ;; Possibly create the cache directory. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
175 (gnus-make-directory (file-name-directory file)) |
17493 | 176 ;; Save the article in the cache. |
177 (if (file-exists-p file) | |
178 t ; The article already is saved. | |
179 (save-excursion | |
180 (set-buffer nntp-server-buffer) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
181 (require 'gnus-art) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
182 (let ((gnus-use-cache nil) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
183 (gnus-article-decode-hook nil)) |
17493 | 184 (gnus-request-article-this-buffer number group)) |
185 (when (> (buffer-size) 0) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
186 (let ((coding-system-for-write gnus-cache-coding-system)) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
187 (gnus-write-buffer file) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
188 (gnus-cache-update-file-total-fetched-for group file)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
189 (setq lines-chars (nnheader-get-lines-and-char)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
190 (nnheader-remove-body) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
191 (setq headers (nnheader-parse-naked-head)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
192 (mail-header-set-number headers number) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
193 (mail-header-set-lines headers (car lines-chars)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
194 (mail-header-set-chars headers (cadr lines-chars)) |
17493 | 195 (gnus-cache-change-buffer group) |
196 (set-buffer (cdr gnus-cache-buffer)) | |
197 (goto-char (point-max)) | |
198 (forward-line -1) | |
199 (while (condition-case () | |
200 (when (not (bobp)) | |
201 (> (read (current-buffer)) number)) | |
202 (error | |
203 ;; The line was malformed, so we just remove it!! | |
204 (gnus-delete-line) | |
205 t)) | |
206 (forward-line -1)) | |
207 (if (bobp) | |
208 (if (not (eobp)) | |
209 (progn | |
210 (beginning-of-line) | |
211 (when (< (read (current-buffer)) number) | |
212 (forward-line 1))) | |
213 (beginning-of-line)) | |
214 (forward-line 1)) | |
215 (beginning-of-line) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
216 (nnheader-insert-nov headers) |
17493 | 217 ;; Update the active info. |
218 (set-buffer gnus-summary-buffer) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
219 (gnus-cache-possibly-update-active group (cons number number)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
220 (setq gnus-newsgroup-cached |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
221 (gnus-add-to-sorted-list gnus-newsgroup-cached article)) |
17493 | 222 (gnus-summary-update-secondary-mark article)) |
223 t)))))) | |
224 | |
225 (defun gnus-cache-enter-remove-article (article) | |
226 "Mark ARTICLE for later possible removal." | |
227 (when article | |
228 (push article gnus-cache-removable-articles))) | |
229 | |
230 (defun gnus-cache-possibly-remove-articles () | |
231 "Possibly remove some of the removable articles." | |
232 (if (not (gnus-virtual-group-p gnus-newsgroup-name)) | |
233 (gnus-cache-possibly-remove-articles-1) | |
234 (let ((arts gnus-cache-removable-articles) | |
235 ga) | |
236 (while arts | |
237 (when (setq ga (nnvirtual-find-group-art | |
238 (gnus-group-real-name gnus-newsgroup-name) (pop arts))) | |
239 (let ((gnus-cache-removable-articles (list (cdr ga))) | |
240 (gnus-newsgroup-name (car ga))) | |
241 (gnus-cache-possibly-remove-articles-1))))) | |
242 (setq gnus-cache-removable-articles nil))) | |
243 | |
244 (defun gnus-cache-possibly-remove-articles-1 () | |
245 "Possibly remove some of the removable articles." | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
246 (when (gnus-cache-fully-p gnus-newsgroup-name) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
247 (let ((cache-articles gnus-newsgroup-cached)) |
17493 | 248 (gnus-cache-change-buffer gnus-newsgroup-name) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
249 (dolist (article gnus-cache-removable-articles) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
250 (when (memq article cache-articles) |
17493 | 251 ;; The article was in the cache, so we see whether we are |
252 ;; supposed to remove it from the cache. | |
253 (gnus-cache-possibly-remove-article | |
254 article (memq article gnus-newsgroup-marked) | |
255 (memq article gnus-newsgroup-dormant) | |
256 (or (memq article gnus-newsgroup-unreads) | |
257 (memq article gnus-newsgroup-unselected)))))) | |
258 ;; The overview file might have been modified, save it | |
259 ;; safe because we're only called at group exit anyway. | |
260 (gnus-cache-save-buffers))) | |
261 | |
262 (defun gnus-cache-request-article (article group) | |
263 "Retrieve ARTICLE in GROUP from the cache." | |
264 (let ((file (gnus-cache-file-name group article)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
265 (buffer-read-only nil) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
266 (file-name-coding-system nnmail-pathname-coding-system)) |
17493 | 267 (when (file-exists-p file) |
268 (erase-buffer) | |
269 (gnus-kill-all-overlays) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
270 (let ((coding-system-for-read gnus-cache-coding-system)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
271 (insert-file-contents file)) |
17493 | 272 t))) |
273 | |
274 (defun gnus-cache-possibly-alter-active (group active) | |
275 "Alter the ACTIVE info for GROUP to reflect the articles in the cache." | |
276 (when gnus-cache-active-hashtb | |
277 (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb))) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
278 (when cache-active |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
279 (when (< (car cache-active) (car active)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
280 (setcar active (car cache-active))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
281 (when (> (cdr cache-active) (cdr active)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
282 (setcdr active (cdr cache-active))))))) |
17493 | 283 |
284 (defun gnus-cache-retrieve-headers (articles group &optional fetch-old) | |
285 "Retrieve the headers for ARTICLES in GROUP." | |
286 (let ((cached | |
287 (setq gnus-newsgroup-cached (gnus-cache-articles-in-group group)))) | |
288 (if (not cached) | |
289 ;; No cached articles here, so we just retrieve them | |
290 ;; the normal way. | |
291 (let ((gnus-use-cache nil)) | |
292 (gnus-retrieve-headers articles group fetch-old)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
293 (let ((uncached-articles (gnus-sorted-difference articles cached)) |
17493 | 294 (cache-file (gnus-cache-file-name group ".overview")) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
295 type |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
296 (file-name-coding-system nnmail-pathname-coding-system)) |
17493 | 297 ;; We first retrieve all the headers that we don't have in |
298 ;; the cache. | |
299 (let ((gnus-use-cache nil)) | |
300 (when uncached-articles | |
301 (setq type (and articles | |
302 (gnus-retrieve-headers | |
303 uncached-articles group fetch-old))))) | |
304 (gnus-cache-save-buffers) | |
305 ;; Then we insert the cached headers. | |
306 (save-excursion | |
307 (cond | |
308 ((not (file-exists-p cache-file)) | |
309 ;; There are no cached headers. | |
310 type) | |
311 ((null type) | |
312 ;; There were no uncached headers (or retrieval was | |
313 ;; unsuccessful), so we use the cached headers exclusively. | |
314 (set-buffer nntp-server-buffer) | |
315 (erase-buffer) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
33379
diff
changeset
|
316 (let ((coding-system-for-read |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
317 gnus-cache-overview-coding-system)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
318 (insert-file-contents cache-file)) |
17493 | 319 'nov) |
320 ((eq type 'nov) | |
321 ;; We have both cached and uncached NOV headers, so we | |
322 ;; braid them. | |
323 (gnus-cache-braid-nov group cached) | |
324 type) | |
325 (t | |
326 ;; We braid HEADs. | |
327 (gnus-cache-braid-heads group (gnus-sorted-intersection | |
328 cached articles)) | |
329 type))))))) | |
330 | |
331 (defun gnus-cache-enter-article (&optional n) | |
332 "Enter the next N articles into the cache. | |
333 If not given a prefix, use the process marked articles instead. | |
334 Returns the list of articles entered." | |
335 (interactive "P") | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
336 (let (out) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
337 (dolist (article (gnus-summary-work-articles n)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
338 (gnus-summary-remove-process-mark article) |
17493 | 339 (if (natnump article) |
340 (when (gnus-cache-possibly-enter-article | |
341 gnus-newsgroup-name article | |
342 nil nil nil t) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
343 (setq gnus-newsgroup-undownloaded (delq article gnus-newsgroup-undownloaded)) |
17493 | 344 (push article out)) |
345 (gnus-message 2 "Can't cache article %d" article)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
346 (gnus-summary-update-download-mark article) |
17493 | 347 (gnus-summary-update-secondary-mark article)) |
348 (gnus-summary-next-subject 1) | |
349 (gnus-summary-position-point) | |
350 (nreverse out))) | |
351 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
352 (defun gnus-cache-remove-article (&optional n) |
17493 | 353 "Remove the next N articles from the cache. |
354 If not given a prefix, use the process marked articles instead. | |
355 Returns the list of articles removed." | |
356 (interactive "P") | |
357 (gnus-cache-change-buffer gnus-newsgroup-name) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
358 (let (out) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
359 (dolist (article (gnus-summary-work-articles n)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
360 (gnus-summary-remove-process-mark article) |
17493 | 361 (when (gnus-cache-possibly-remove-article article nil nil nil t) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
362 (when gnus-newsgroup-agentized |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
363 (let ((alist (gnus-agent-load-alist gnus-newsgroup-name))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
364 (unless (cdr (assoc article alist)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
365 (setq gnus-newsgroup-undownloaded |
64754
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
366 (gnus-add-to-sorted-list |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
367 gnus-newsgroup-undownloaded article))))) |
17493 | 368 (push article out)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
369 (gnus-summary-update-download-mark article) |
17493 | 370 (gnus-summary-update-secondary-mark article)) |
371 (gnus-summary-next-subject 1) | |
372 (gnus-summary-position-point) | |
373 (nreverse out))) | |
374 | |
375 (defun gnus-cached-article-p (article) | |
376 "Say whether ARTICLE is cached in the current group." | |
377 (memq article gnus-newsgroup-cached)) | |
378 | |
379 (defun gnus-summary-insert-cached-articles () | |
380 "Insert all the articles cached for this group into the current buffer." | |
381 (interactive) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
382 (let ((gnus-verbose (max 6 gnus-verbose))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
383 (if (not gnus-newsgroup-cached) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
384 (gnus-message 3 "No cached articles for this group") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
385 (gnus-summary-goto-subjects gnus-newsgroup-cached)))) |
17493 | 386 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
387 (defun gnus-summary-limit-include-cached () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
388 "Limit the summary buffer to articles that are cached." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
389 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
390 (let ((gnus-verbose (max 6 gnus-verbose))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
391 (if gnus-newsgroup-cached |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
392 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
393 (gnus-summary-limit gnus-newsgroup-cached) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
394 (gnus-summary-position-point)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
395 (gnus-message 3 "No cached articles for this group")))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
396 |
17493 | 397 ;;; Internal functions. |
398 | |
399 (defun gnus-cache-change-buffer (group) | |
400 (and gnus-cache-buffer | |
401 ;; See if the current group's overview cache has been loaded. | |
402 (or (string= group (car gnus-cache-buffer)) | |
403 ;; Another overview cache is current, save it. | |
404 (gnus-cache-save-buffers))) | |
405 ;; if gnus-cache buffer is nil, create it | |
406 (unless gnus-cache-buffer | |
407 ;; Create cache buffer | |
408 (save-excursion | |
409 (setq gnus-cache-buffer | |
410 (cons group | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
411 (set-buffer (gnus-get-buffer-create |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
412 " *gnus-cache-overview*")))) |
17493 | 413 ;; Insert the contents of this group's cache overview. |
414 (erase-buffer) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
415 (let ((file (gnus-cache-file-name group ".overview")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
416 (file-name-coding-system nnmail-pathname-coding-system)) |
17493 | 417 (when (file-exists-p file) |
418 (nnheader-insert-file-contents file))) | |
419 ;; We have a fresh (empty/just loaded) buffer, | |
420 ;; mark it as unmodified to save a redundant write later. | |
421 (set-buffer-modified-p nil)))) | |
422 | |
423 ;; Return whether an article is a member of a class. | |
424 (defun gnus-cache-member-of-class (class ticked dormant unread) | |
425 (or (and ticked (memq 'ticked class)) | |
426 (and dormant (memq 'dormant class)) | |
427 (and unread (memq 'unread class)) | |
428 (and (not unread) (not ticked) (not dormant) (memq 'read class)))) | |
429 | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
430 (defvar gnus-cache-decoded-group-names nil |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
431 "Alist of original group names and decoded group names. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
432 Decoding is done according to `gnus-group-name-charset-method-alist' |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
433 or `gnus-group-name-charset-group-alist'.") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
434 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
435 (defvar gnus-cache-unified-group-names nil |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
436 "Alist of unified decoded group names and original group names. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
437 A group name is decoded according to |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
438 `gnus-group-name-charset-method-alist' or |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
439 `gnus-group-name-charset-group-alist' first, and is encoded and |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
440 decoded again according to `nnmail-pathname-coding-system', |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
441 `file-name-coding-system', or `default-file-name-coding-system'. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
442 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
443 It is used when asking for a original group name from a cache |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
444 directory name, in which non-ASCII characters might have been unified |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
445 into the ones of a certain charset particularly if the `utf-8' coding |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
446 system for example was used.") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
447 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
448 (defun gnus-cache-decoded-group-name (group) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
449 "Return a decoded group name of GROUP." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
450 (or (cdr (assoc group gnus-cache-decoded-group-names)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
451 (let ((decoded (gnus-group-decoded-name group)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
452 (coding (or nnmail-pathname-coding-system |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
453 (and (boundp 'file-name-coding-system) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
454 file-name-coding-system) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
455 (and (boundp 'default-file-name-coding-system) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
456 default-file-name-coding-system)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
457 (push (cons group decoded) gnus-cache-decoded-group-names) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
458 (push (cons (mm-decode-coding-string |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
459 (mm-encode-coding-string decoded coding) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
460 coding) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
461 group) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
462 gnus-cache-unified-group-names) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
463 decoded))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
464 |
17493 | 465 (defun gnus-cache-file-name (group article) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
466 (setq group (gnus-cache-decoded-group-name group)) |
33379
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
467 (expand-file-name |
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
468 (if (stringp article) article (int-to-string article)) |
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
469 (file-name-as-directory |
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
470 (expand-file-name |
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
471 (nnheader-translate-file-chars |
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
472 (if (gnus-use-long-file-name 'not-cache) |
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
473 group |
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
474 (let ((group (nnheader-replace-duplicate-chars-in-string |
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
475 (nnheader-replace-chars-in-string group ?/ ?_) |
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
476 ?. ?_))) |
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
477 ;; Translate the first colon into a slash. |
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
478 (when (string-match ":" group) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
479 (setq group (concat (substring group 0 (match-beginning 0)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
480 "/" (substring group (match-end 0))))) |
33379
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
481 (nnheader-replace-chars-in-string group ?. ?/))) |
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
482 t) |
33c4d154294b
(gnus-cache-active-file): Don't use
Dave Love <fx@gnu.org>
parents:
31716
diff
changeset
|
483 gnus-cache-directory)))) |
17493 | 484 |
485 (defun gnus-cache-update-article (group article) | |
486 "If ARTICLE is in the cache, remove it and re-enter it." | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
487 (gnus-cache-change-buffer group) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
488 (when (gnus-cache-possibly-remove-article article nil nil nil t) |
17493 | 489 (let ((gnus-use-cache nil)) |
490 (gnus-cache-possibly-enter-article | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
491 gnus-newsgroup-name article |
17493 | 492 nil nil nil t)))) |
493 | |
494 (defun gnus-cache-possibly-remove-article (article ticked dormant unread | |
495 &optional force) | |
496 "Possibly remove ARTICLE from the cache." | |
497 (let ((group gnus-newsgroup-name) | |
498 (number article) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
499 file |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
500 (file-name-coding-system nnmail-pathname-coding-system)) |
17493 | 501 ;; If this is a virtual group, we find the real group. |
502 (when (gnus-virtual-group-p group) | |
503 (let ((result (nnvirtual-find-group-art | |
504 (gnus-group-real-name group) article))) | |
505 (setq group (car result) | |
506 number (cdr result)))) | |
507 (setq file (gnus-cache-file-name group number)) | |
508 (when (and (file-exists-p file) | |
509 (or force | |
510 (gnus-cache-member-of-class | |
511 gnus-cache-remove-articles ticked dormant unread))) | |
512 (save-excursion | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
513 (gnus-cache-update-file-total-fetched-for group file t) |
17493 | 514 (delete-file file) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
515 |
17493 | 516 (set-buffer (cdr gnus-cache-buffer)) |
517 (goto-char (point-min)) | |
518 (when (or (looking-at (concat (int-to-string number) "\t")) | |
519 (search-forward (concat "\n" (int-to-string number) "\t") | |
520 (point-max) t)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
521 (gnus-delete-line))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
522 (unless (setq gnus-newsgroup-cached |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
523 (delq article gnus-newsgroup-cached)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
524 (gnus-sethash gnus-newsgroup-name nil gnus-cache-active-hashtb) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
525 (setq gnus-cache-active-altered t)) |
17493 | 526 (gnus-summary-update-secondary-mark article) |
527 t))) | |
528 | |
529 (defun gnus-cache-articles-in-group (group) | |
530 "Return a sorted list of cached articles in GROUP." | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
531 (let ((dir (file-name-directory (gnus-cache-file-name group 1))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
532 articles |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
533 (file-name-coding-system nnmail-pathname-coding-system)) |
17493 | 534 (when (file-exists-p dir) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
535 (setq articles |
62907
88db2adda4b7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-339
Miles Bader <miles@gnu.org>
parents:
61424
diff
changeset
|
536 (sort (mapcar (lambda (name) (string-to-number name)) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
537 (directory-files dir nil "^[0-9]+$" t)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
538 '<)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
539 ;; Update the cache active file, just to synch more. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
540 (if articles |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
541 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
542 (gnus-cache-update-active group (car articles) t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
543 (gnus-cache-update-active group (car (last articles)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
544 (when (gnus-gethash group gnus-cache-active-hashtb) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
545 (gnus-sethash group nil gnus-cache-active-hashtb) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
546 (setq gnus-cache-active-altered t))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
547 articles))) |
17493 | 548 |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
549 (defun gnus-cache-braid-nov (group cached &optional file) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
550 (let ((cache-buf (gnus-get-buffer-create " *gnus-cache*")) |
17493 | 551 beg end) |
552 (gnus-cache-save-buffers) | |
553 (save-excursion | |
554 (set-buffer cache-buf) | |
555 (erase-buffer) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
556 (let ((coding-system-for-read gnus-cache-overview-coding-system) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
557 (file-name-coding-system nnmail-pathname-coding-system)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
33379
diff
changeset
|
558 (insert-file-contents |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
559 (or file (gnus-cache-file-name group ".overview")))) |
17493 | 560 (goto-char (point-min)) |
561 (insert "\n") | |
562 (goto-char (point-min))) | |
563 (set-buffer nntp-server-buffer) | |
564 (goto-char (point-min)) | |
565 (while cached | |
566 (while (and (not (eobp)) | |
567 (< (read (current-buffer)) (car cached))) | |
568 (forward-line 1)) | |
569 (beginning-of-line) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
570 (set-buffer cache-buf) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
571 (if (search-forward (concat "\n" (int-to-string (car cached)) "\t") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
572 nil t) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
573 (setq beg (point-at-bol) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
574 end (progn (end-of-line) (point))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
575 (setq beg nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
576 (set-buffer nntp-server-buffer) |
17493 | 577 (when beg |
578 (insert-buffer-substring cache-buf beg end) | |
579 (insert "\n")) | |
580 (setq cached (cdr cached))) | |
581 (kill-buffer cache-buf))) | |
582 | |
583 (defun gnus-cache-braid-heads (group cached) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
584 (let ((cache-buf (gnus-get-buffer-create " *gnus-cache*"))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
585 (with-current-buffer cache-buf |
17493 | 586 (erase-buffer)) |
587 (set-buffer nntp-server-buffer) | |
588 (goto-char (point-min)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
589 (dolist (entry cached) |
17493 | 590 (while (and (not (eobp)) |
591 (looking-at "2.. +\\([0-9]+\\) ") | |
592 (< (progn (goto-char (match-beginning 1)) | |
593 (read (current-buffer))) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
594 entry)) |
17493 | 595 (search-forward "\n.\n" nil 'move)) |
596 (beginning-of-line) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
597 (set-buffer cache-buf) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
598 (erase-buffer) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
599 (let ((coding-system-for-read gnus-cache-coding-system) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
600 (file-name-coding-system nnmail-pathname-coding-system)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
601 (insert-file-contents (gnus-cache-file-name group entry))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
602 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
603 (insert "220 ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
604 (princ (car cached) (current-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
605 (insert " Article retrieved.\n") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
606 (search-forward "\n\n" nil 'move) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
607 (delete-region (point) (point-max)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
608 (forward-char -1) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
609 (insert ".") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
610 (set-buffer nntp-server-buffer) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
611 (insert-buffer-substring cache-buf)) |
17493 | 612 (kill-buffer cache-buf))) |
613 | |
614 ;;;###autoload | |
615 (defun gnus-jog-cache () | |
616 "Go through all groups and put the articles into the cache. | |
617 | |
618 Usage: | |
619 $ emacs -batch -l ~/.emacs -l gnus -f gnus-jog-cache" | |
620 (interactive) | |
621 (let ((gnus-mark-article-hook nil) | |
622 (gnus-expert-user t) | |
623 (nnmail-spool-file nil) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
624 (mail-sources nil) |
17493 | 625 (gnus-use-dribble-file nil) |
626 (gnus-novice-user nil) | |
627 (gnus-large-newsgroup nil)) | |
628 ;; Start Gnus. | |
629 (gnus) | |
630 ;; Go through all groups... | |
631 (gnus-group-mark-buffer) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
632 (gnus-group-iterate nil |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
633 (lambda (group) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
634 (let (gnus-auto-select-next) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
635 (gnus-summary-read-group group nil t) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
636 ;; ... and enter the articles into the cache. |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
637 (when (eq major-mode 'gnus-summary-mode) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
638 (gnus-uu-mark-buffer) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
639 (gnus-cache-enter-article) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
640 (kill-buffer (current-buffer)))))))) |
17493 | 641 |
642 (defun gnus-cache-read-active (&optional force) | |
643 "Read the cache active file." | |
644 (gnus-make-directory gnus-cache-directory) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
645 (if (or (not (file-exists-p gnus-cache-active-file)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
646 (zerop (nth 7 (file-attributes gnus-cache-active-file))) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
647 force) |
17493 | 648 ;; There is no active file, so we generate one. |
649 (gnus-cache-generate-active) | |
650 ;; We simply read the active file. | |
651 (save-excursion | |
652 (gnus-set-work-buffer) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
653 (nnheader-insert-file-contents gnus-cache-active-file) |
17493 | 654 (gnus-active-to-gnus-format |
655 nil (setq gnus-cache-active-hashtb | |
656 (gnus-make-hashtable | |
657 (count-lines (point-min) (point-max))))) | |
658 (setq gnus-cache-active-altered nil)))) | |
659 | |
660 (defun gnus-cache-write-active (&optional force) | |
661 "Write the active hashtb to the active file." | |
662 (when (or force | |
663 (and gnus-cache-active-hashtb | |
664 gnus-cache-active-altered)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
665 (gnus-write-active-file gnus-cache-active-file gnus-cache-active-hashtb t) |
17493 | 666 ;; Mark the active hashtb as unaltered. |
667 (setq gnus-cache-active-altered nil))) | |
668 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
669 (defun gnus-cache-possibly-update-active (group active) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
670 "Update active info bounds of GROUP with ACTIVE if necessary. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
671 The update is performed if ACTIVE contains a higher or lower bound |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
672 than the current." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
673 (let ((lower t) (higher t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
674 (if gnus-cache-active-hashtb |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
675 (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
676 (when cache-active |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
677 (unless (< (car active) (car cache-active)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
678 (setq lower nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
679 (unless (> (cdr active) (cdr cache-active)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
680 (setq higher nil)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
681 (gnus-cache-read-active)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
682 (when lower |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
683 (gnus-cache-update-active group (car active) t)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
684 (when higher |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
685 (gnus-cache-update-active group (cdr active))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
686 |
17493 | 687 (defun gnus-cache-update-active (group number &optional low) |
688 "Update the upper bound of the active info of GROUP to NUMBER. | |
689 If LOW, update the lower bound instead." | |
690 (let ((active (gnus-gethash group gnus-cache-active-hashtb))) | |
691 (if (null active) | |
692 ;; We just create a new active entry for this group. | |
693 (gnus-sethash group (cons number number) gnus-cache-active-hashtb) | |
694 ;; Update the lower or upper bound. | |
695 (if low | |
696 (setcar active number) | |
697 (setcdr active number))) | |
698 ;; Mark the active hashtb as altered. | |
699 (setq gnus-cache-active-altered t))) | |
700 | |
701 ;;;###autoload | |
702 (defun gnus-cache-generate-active (&optional directory) | |
703 "Generate the cache active file." | |
704 (interactive) | |
705 (let* ((top (null directory)) | |
706 (directory (expand-file-name (or directory gnus-cache-directory))) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
707 (file-name-coding-system nnmail-pathname-coding-system) |
17493 | 708 (files (directory-files directory 'full)) |
709 (group | |
710 (if top | |
711 "" | |
712 (string-match | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
713 (concat "^" (regexp-quote |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
714 (file-name-as-directory |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
715 (expand-file-name gnus-cache-directory)))) |
17493 | 716 (directory-file-name directory)) |
717 (nnheader-replace-chars-in-string | |
718 (substring (directory-file-name directory) (match-end 0)) | |
719 ?/ ?.))) | |
720 nums alphs) | |
721 (when top | |
722 (gnus-message 5 "Generating the cache active file...") | |
723 (setq gnus-cache-active-hashtb (gnus-make-hashtable 123))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
724 (when (string-match "^\\(nn[^_]+\\)_" group) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
725 (setq group (replace-match "\\1:" t nil group))) |
17493 | 726 ;; Separate articles from all other files and directories. |
727 (while files | |
728 (if (string-match "^[0-9]+$" (file-name-nondirectory (car files))) | |
62907
88db2adda4b7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-339
Miles Bader <miles@gnu.org>
parents:
61424
diff
changeset
|
729 (push (string-to-number (file-name-nondirectory (pop files))) nums) |
17493 | 730 (push (pop files) alphs))) |
731 ;; If we have nums, then this is probably a valid group. | |
732 (when (setq nums (sort nums '<)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
733 ;; Use non-decoded group name. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
734 ;; FIXME: this is kind of a workaround. The active file should |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
735 ;; be updated at the time articles are cached. It will make |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
736 ;; `gnus-cache-unified-group-names' needless. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
737 (gnus-sethash (or (cdr (assoc group gnus-cache-unified-group-names)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
738 group) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
739 (cons (car nums) (gnus-last-element nums)) |
17493 | 740 gnus-cache-active-hashtb)) |
741 ;; Go through all the other files. | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
742 (dolist (file alphs) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
743 (when (and (file-directory-p file) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19969
diff
changeset
|
744 (not (string-match "^\\." |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
745 (file-name-nondirectory file)))) |
17493 | 746 ;; We descend directories. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
747 (gnus-cache-generate-active file))) |
17493 | 748 ;; Write the new active file. |
749 (when top | |
750 (gnus-cache-write-active t) | |
751 (gnus-message 5 "Generating the cache active file...done")))) | |
752 | |
753 ;;;###autoload | |
754 (defun gnus-cache-generate-nov-databases (dir) | |
755 "Generate NOV files recursively starting in DIR." | |
756 (interactive (list gnus-cache-directory)) | |
757 (gnus-cache-close) | |
758 (let ((nnml-generate-active-function 'identity)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
759 (nnml-generate-nov-databases-1 dir)) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
760 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
761 (setq gnus-cache-total-fetched-hashtb nil) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
762 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
763 (gnus-cache-open)) |
17493 | 764 |
765 (defun gnus-cache-move-cache (dir) | |
766 "Move the cache tree to somewhere else." | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19493
diff
changeset
|
767 (interactive "FMove the cache tree to: ") |
17493 | 768 (rename-file gnus-cache-directory dir)) |
769 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
770 (defun gnus-cache-fully-p (&optional group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
771 "Returns non-nil if the cache should be fully used. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
772 If GROUP is non-nil, also cater to `gnus-cacheable-groups' and |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
773 `gnus-uncacheable-groups'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
774 (and gnus-use-cache |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
775 (not (eq gnus-use-cache 'passive)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
776 (if (null group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
777 t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
778 (and (or (not gnus-cacheable-groups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
779 (string-match gnus-cacheable-groups group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
780 (or (not gnus-uncacheable-groups) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
781 (not (string-match gnus-uncacheable-groups group))))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
782 |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
783 ;;;###autoload |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
784 (defun gnus-cache-rename-group (old-group new-group) |
67418
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
785 "Rename OLD-GROUP as NEW-GROUP. |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
786 Always updates the cache, even when disabled, as the old cache |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
787 files would corrupt Gnus when the cache was next enabled. It |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
788 depends on the caller to determine whether group renaming is |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
789 supported." |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
790 (let ((old-dir (gnus-cache-file-name old-group "")) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
791 (new-dir (gnus-cache-file-name new-group "")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
792 (file-name-coding-system nnmail-pathname-coding-system)) |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
793 (gnus-rename-file old-dir new-dir t)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
794 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
795 (gnus-cache-rename-group-total-fetched-for old-group new-group) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
796 |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
797 (let ((no-save gnus-cache-active-hashtb)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
798 (unless gnus-cache-active-hashtb |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
799 (gnus-cache-read-active)) |
67418
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
800 (let* ((old-group-hash-value |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
801 (gnus-gethash old-group gnus-cache-active-hashtb)) |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
802 (new-group-hash-value |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
803 (gnus-gethash new-group gnus-cache-active-hashtb)) |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
804 (delta |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
805 (or old-group-hash-value new-group-hash-value))) |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
806 (gnus-sethash new-group old-group-hash-value gnus-cache-active-hashtb) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
807 (gnus-sethash old-group nil gnus-cache-active-hashtb) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
808 |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
809 (if no-save |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
810 (setq gnus-cache-active-altered delta) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
811 (gnus-cache-write-active delta))))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
812 |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
813 ;;;###autoload |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
814 (defun gnus-cache-delete-group (group) |
67418
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
815 "Delete GROUP from the cache. |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
816 Always updates the cache, even when disabled, as the old cache |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
817 files would corrupt gnus when the cache was next enabled. |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
818 Depends upon the caller to determine whether group deletion is |
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
819 supported." |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
820 (let ((dir (gnus-cache-file-name group "")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
821 (file-name-coding-system nnmail-pathname-coding-system)) |
59089
22da0004ae3c
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-750
Miles Bader <miles@gnu.org>
parents:
57617
diff
changeset
|
822 (gnus-delete-directory dir)) |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
823 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
824 (gnus-cache-delete-group-total-fetched-for group) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
825 |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
826 (let ((no-save gnus-cache-active-hashtb)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
827 (unless gnus-cache-active-hashtb |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
828 (gnus-cache-read-active)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
829 (let* ((group-hash-value (gnus-gethash group gnus-cache-active-hashtb))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
830 (gnus-sethash group nil gnus-cache-active-hashtb) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
831 |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
832 (if no-save |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
833 (setq gnus-cache-active-altered group-hash-value) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
834 (gnus-cache-write-active group-hash-value))))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57243
diff
changeset
|
835 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
836 (defvar gnus-cache-inhibit-update-total-fetched-for nil) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
837 (defvar gnus-cache-need-update-total-fetched-for nil) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
838 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
839 (defmacro gnus-cache-with-refreshed-group (group &rest body) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
840 `(prog1 (let ((gnus-cache-inhibit-update-total-fetched-for t)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
841 ,@body) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
842 (when (and gnus-cache-need-update-total-fetched-for |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
843 (not gnus-cache-inhibit-update-total-fetched-for)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
844 (save-excursion |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
845 (set-buffer gnus-group-buffer) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
846 (setq gnus-cache-need-update-total-fetched-for nil) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
847 (gnus-group-update-group ,group t))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
848 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
849 (defun gnus-cache-update-file-total-fetched-for (group file &optional subtract) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
850 (when gnus-cache-total-fetched-hashtb |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
851 (gnus-cache-with-refreshed-group |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
852 group |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
853 (let* ((entry (or (gnus-gethash group gnus-cache-total-fetched-hashtb) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
854 (gnus-sethash group (make-vector 2 0) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
855 gnus-cache-total-fetched-hashtb))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
856 size) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
857 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
858 (if file |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
859 (setq size (or (nth 7 (file-attributes file)) 0)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
860 (let* ((file-name-coding-system nnmail-pathname-coding-system) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
861 (files (directory-files (gnus-cache-file-name group "") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
862 t nil t)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
863 file attrs) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
864 (setq size 0.0) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
865 (while (setq file (pop files)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
866 (setq attrs (file-attributes file)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
867 (unless (nth 0 attrs) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
868 (incf size (float (nth 7 attrs))))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
869 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
870 (setq gnus-cache-need-update-total-fetched-for t) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
871 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
872 (incf (nth 1 entry) (if subtract (- size) size)))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
873 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
874 (defun gnus-cache-update-overview-total-fetched-for (group file) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
875 (when gnus-cache-total-fetched-hashtb |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
876 (gnus-cache-with-refreshed-group |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
877 group |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
878 (let* ((entry (or (gnus-gethash group gnus-cache-total-fetched-hashtb) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
879 (gnus-sethash group (make-list 2 0) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
880 gnus-cache-total-fetched-hashtb))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
881 (file-name-coding-system nnmail-pathname-coding-system) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
882 (size (or (nth 7 (file-attributes |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
883 (or file |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
884 (gnus-cache-file-name group ".overview")))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
885 0))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
886 (setq gnus-cache-need-update-total-fetched-for t) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
887 (setf (nth 0 entry) size))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
888 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
889 (defun gnus-cache-rename-group-total-fetched-for (old-group new-group) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
890 "Record of disk space used by OLD-GROUP now associated with NEW-GROUP." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
891 (when gnus-cache-total-fetched-hashtb |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
892 (let ((entry (gnus-gethash old-group gnus-cache-total-fetched-hashtb))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
893 (gnus-sethash new-group entry gnus-cache-total-fetched-hashtb) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
894 (gnus-sethash old-group nil gnus-cache-total-fetched-hashtb)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
895 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
896 (defun gnus-cache-delete-group-total-fetched-for (group) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
897 "Delete record of disk space used by GROUP being deleted." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
898 (when gnus-cache-total-fetched-hashtb |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
899 (gnus-sethash group nil gnus-cache-total-fetched-hashtb))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
900 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
901 (defun gnus-cache-total-fetched-for (group &optional no-inhibit) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
902 "Get total disk space used by the cache for the specified GROUP." |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
903 (unless (equal group "dummy.group") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
904 (unless gnus-cache-total-fetched-hashtb |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
905 (setq gnus-cache-total-fetched-hashtb (gnus-make-hashtable 1024))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
906 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
907 (let* ((entry (gnus-gethash group gnus-cache-total-fetched-hashtb))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
908 (if entry |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
909 (apply '+ entry) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
910 (let ((gnus-cache-inhibit-update-total-fetched-for (not no-inhibit))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
911 (+ |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
912 (gnus-cache-update-overview-total-fetched-for group nil) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
913 (gnus-cache-update-file-total-fetched-for group nil))))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
914 |
17493 | 915 (provide 'gnus-cache) |
916 | |
52401 | 917 ;;; arch-tag: 05a79442-8c58-4e65-bd0a-3cbb1b89a33a |
17493 | 918 ;;; gnus-cache.el ends here |