;ELC   
;;; compiled by amu@tux.mit.edu on Sun Nov 15 14:41:36 1998
;;; from file /afs/sipb.mit.edu/contrib/emacs/packages/gnus-5.6.44/lisp/gnus-cache.el
;;; emacs version 19.34.1.
;;; bytecomp version FSF 2.10
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`gnus-cache.el' was compiled for Emacs 19.29 or later"))


(byte-code "!!!!	&	&	&	&	&" [require gnus gnus-int gnus-range gnus-start custom-declare-variable gnus-cache-active-file (concat (file-name-as-directory gnus-cache-directory) "active") "*The cache active file." :group gnus-cache :type file gnus-cache-enter-articles (quote (ticked dormant)) "Classes of articles to enter into the cache." (set (const ticked) (const dormant) (const unread) (const read)) gnus-cache-remove-articles (quote (read)) "Classes of articles to remove from the cache." (set (const ticked) (const dormant) (const unread) (const read)) gnus-cacheable-groups nil "*Groups that match this regexp will be cached.\n\nIf you only want to cache your nntp groups, you could set this\nvariable to \"^nntp\".\n\nIf a group matches both gnus-cacheable-groups and gnus-uncacheable-groups\nit's not cached." (choice (const :tag "off" nil) regexp) gnus-uncacheable-groups "*Groups that match this regexp will not be cached.\n\nIf you want to avoid caching your nnml groups, you could set this\nvariable to \"^nnml\".\n\nIf a group matches both gnus-cacheable-groups and gnus-uncacheable-groups\nit's not cached." (choice (const :tag "off" nil) regexp)] 8)
#@41 Coding system used on Gnus cache files.
(defvar gnus-cache-overview-coding-system (quote raw-text) (#$ . 1733))
(byte-code "! B! B!  B!- B\"\"" [boundp gnus-cache-removable-articles nil current-load-list gnus-cache-buffer gnus-cache-active-hashtb gnus-cache-active-altered autoload nnml-generate-nov-databases-1 "nnml" nnvirtual-find-group-art "nnvirtual"] 3)
#@23 Initialize the cache.
(defalias 'gnus-cache-open #[nil "	! \n \n=?  " [file-exists-p gnus-cache-directory gnus-use-cache passive gnus-cache-read-active] 2 (#$ . 2142)])
(byte-code "" [G99127 (byte-code "\"" [gnus-add-shutdown gnus-cache-close gnus] 3) ((error))] 3)
#@22 Shut down the cache.
(defalias 'gnus-cache-close #[nil "  " [gnus-cache-write-active gnus-cache-save-buffers nil gnus-cache-active-hashtb] 2 (#$ . 2433)])
(defalias 'gnus-cache-save-buffers #[nil "] A@\"\f!: \fq V* 	!)9 !4 !Ϗ)\fO \f;L тM \f!)X !)͉*" [gnus-cache-buffer gnus-cache-file-name ".overview" overview-file buffer buffer-modified-p buffer-size 0 gnus-cache-overview-coding-system coding-system-for-write gnus-write-buffer file-exists-p delete-file nil (byte-code "\n!!" [delete-directory file-name-directory overview-file] 3) ((error)) buf get-buffer buffer-name kill-buffer] 5])
(defalias 'gnus-cache-possibly-enter-article #[(group article headers ticked dormant unread &optional force) " 	=?ffVf!f!S \n\n\": \nĕO< \n)\"@!AI)HeVe y \"e \"?e$e\"!?e!!! ݂eq\") Vc!!#Aqdby揃 y omyp!WyyyyHHHHHH2H:HBHJ&\nc3q\"5B5!)*" [force gnus-use-cache passive article 0 vectorp headers gnus-virtual-group-p group nnvirtual-find-group-art gname string-match "^[^:]+:" nil result copy-sequence file number gnus-cacheable-groups gnus-uncacheable-groups gnus-cache-member-of-class gnus-cache-enter-articles ticked dormant unread file-exists-p gnus-cache-file-name gnus-make-directory file-name-directory t nntp-server-buffer gnus-request-article-this-buffer buffer-size gnus-write-buffer gnus-cache-change-buffer gnus-cache-buffer -1 (byte-code "o?\n p!	V" [read number] 2) ((error (byte-code "y`y`|" [0 1 t] 2))) read 1 format "%s	%s	%s	%s	%s	%s	%s	%s	%s	\n" 2 3 4 5 "" 6 7 8 gnus-summary-buffer gnus-cache-update-active gnus-newsgroup-cached gnus-summary-update-secondary-mark] 13])
#@42 Mark ARTICLE for later possible removal.
(defalias 'gnus-cache-enter-remove-article #[(article) "	 	B" [article gnus-cache-removable-articles] 2 (#$ . 4332)])
#@49 Possibly remove some of the removable articles.
(defalias 'gnus-cache-possibly-remove-articles #[nil "	!	  F 	\"( ˕O* )A@\" AC@ * *ĉ" [gnus-virtual-group-p gnus-newsgroup-name gnus-cache-possibly-remove-articles-1 gnus-cache-removable-articles nil ga arts nnvirtual-find-group-art gname string-match "^[^:]+:" 0] 4 (#$ . 4503)])
#@49 Possibly remove some of the removable articles.
(defalias 'gnus-cache-possibly-remove-articles-1 #[nil "=?E \n	!B A@> >\f>>= >$ + " [gnus-use-cache passive gnus-cache-removable-articles gnus-newsgroup-cached nil article cache-articles articles gnus-cache-change-buffer gnus-newsgroup-name gnus-cache-possibly-remove-article gnus-newsgroup-marked gnus-newsgroup-dormant gnus-newsgroup-unreads gnus-newsgroup-unselected gnus-cache-save-buffers] 6 (#$ . 4885)])
#@43 Retrieve ARTICLE in GROUP from the cache.
(defalias 'gnus-cache-request-article #[(article group) "	\n\"!   !*" [gnus-cache-file-name group article nil buffer-read-only file file-exists-p erase-buffer gnus-kill-all-overlays insert-file-contents t] 3 (#$ . 5396)])
#@71 Alter the ACTIVE info for GROUP to reflect the articles in the cache.
(defalias 'gnus-cache-possibly-alter-active #[(group active) "( \n\"J' @\f@W \f@A\fAV' \fA)" [gnus-cache-active-hashtb intern-soft group cache-active active] 4 (#$ . 5683)])
#@45 Retrieve the headers for ARTICLES in GROUP.
(defalias 'gnus-cache-retrieve-headers #[(articles group &optional fetch-old) "	! 	#) \"\"	\"@ > 	#) !Q  f q !Ղ =w 	\" 	\"\",)" [gnus-cache-articles-in-group group gnus-newsgroup-cached cached nil gnus-use-cache gnus-retrieve-headers articles fetch-old gnus-sorted-intersection gnus-sorted-complement gnus-cache-file-name ".overview" type cache-file uncached-articles gnus-cache-save-buffers file-exists-p nntp-server-buffer erase-buffer insert-file-contents nov gnus-cache-braid-nov gnus-cache-braid-heads] 6 (#$ . 5951)])
#@145 Enter the next N articles into the cache.
If not given a prefix, use the process marked articles instead.
Returns the list of articles entered.
(defalias 'gnus-cache-enter-article #[(&optional n) "	!A@C \f!\f!6 	\f\f8&< \fB< \f#\f! ! +" [gnus-summary-work-articles n nil out article articles gnus-summary-remove-process-mark natnump gnus-cache-possibly-enter-article gnus-newsgroup-name 3 gnus-newsgroup-data t gnus-message 2 "Can't cache article %d" gnus-summary-update-secondary-mark gnus-summary-next-subject 1 gnus-summary-position-point] 8 (#$ . 6618) "P"])
#@146 Remove the next N articles from the cache.
If not given a prefix, use the process marked articles instead.
Returns the list of articles removed.
(defalias 'gnus-cache-remove-article #[(n) "	!!ĉ9 A@!ĉ%1 B! ! +" [gnus-cache-change-buffer gnus-newsgroup-name gnus-summary-work-articles n nil out article articles gnus-summary-remove-process-mark gnus-cache-possibly-remove-article t gnus-summary-update-secondary-mark gnus-summary-next-subject 1 gnus-summary-position-point] 6 (#$ . 7235) "P"])
#@53 Say whether ARTICLE is cached in the current group.
(defalias 'gnus-cached-article-p #[(article) "	>" [article gnus-newsgroup-cached] 2 (#$ . 7782)])
#@72 Insert all the articles cached for this group into the current buffer.
(defalias 'gnus-summary-insert-cached-articles #[nil "\n!\"] \"( A@\" *" [sort copy-sequence gnus-newsgroup-cached < 6 gnus-verbose cached gnus-message 3 "No cached articles for this group" gnus-summary-goto-subject t] 4 (#$ . 7940) nil])
(defalias (quote gnus-summary-limit-include-cached) (quote gnus-summary-insert-cached-articles))
(defalias 'gnus-cache-change-buffer #[(group) " 	@  ?9 	!qBp! 	\"		!4 	!)!)" [gnus-cache-buffer group gnus-cache-save-buffers gnus-get-buffer-create " *gnus-cache-overview*" buffer-disable-undo erase-buffer gnus-cache-file-name ".overview" file file-exists-p nnheader-insert-file-contents set-buffer-modified-p nil] 3])
(defalias 'gnus-cache-member-of-class #[(class ticked dormant unread) "\n 	>0 \n 	>0  	>0 ?0 ?0 \n?0 	>" [ticked class dormant unread read] 2])
(defalias 'gnus-cache-file-name #[(group article) "	!! ( #\"\" ˔I#)\"!;6 : !Q" [file-name-as-directory gnus-cache-directory nnheader-translate-file-chars gnus-use-long-file-name not-cache group nnheader-replace-chars-in-string 47 95 string-match ":" 0 46 t article int-to-string] 7])
#@56 If ARTICLE is in the cache, remove it and re-enter it.
(defalias 'gnus-cache-update-article #[(group article) "	!ĉ%\" \n8ĉ&)" [gnus-cache-change-buffer group gnus-cache-possibly-remove-article article nil t gnus-use-cache gnus-cache-possibly-enter-article gnus-newsgroup-name 3 gnus-newsgroup-data] 8 (#$ . 9218)])
#@41 Possibly remove ARTICLE from the cache.
(defalias 'gnus-cache-possibly-remove-article #[(article ticked dormant unread &optional force) "	!0 \"! ˕O# )	\"\f@\fA)\f\"! M $ !Aqeb\f!P!q \f!Qd#{ y`y`|)	\"	!+" [gnus-newsgroup-name article nil file number group gnus-virtual-group-p nnvirtual-find-group-art gname string-match "^[^:]+:" 0 result gnus-cache-file-name file-exists-p force gnus-cache-member-of-class gnus-cache-remove-articles ticked dormant unread delete-file gnus-cache-buffer looking-at int-to-string "	" search-forward "\n" t 1 delq gnus-newsgroup-cached gnus-summary-update-secondary-mark] 6 (#$ . 9563)])
#@51 Return a sorted list of cached articles in GROUP.
(defalias 'gnus-cache-articles-in-group #[(group) "\n\"!!3 $\"\"2 \n@#\n!@\"*" [file-name-directory gnus-cache-file-name group 1 nil articles dir file-exists-p sort mapcar #[(name) "	!" [string-to-int name] 2] directory-files "^[0-9]+$" t < gnus-cache-update-active last] 9 (#$ . 10269)])
(defalias 'gnus-cache-braid-nov #[(group cached &optional file) "! qp! \n! \f\"!ebceb)qeb mM p!@WM y9 yq@!Q#p y``r )\f \f#cA9 !+" [gnus-get-buffer-create " *gnus-cache*" nil end beg cache-buf gnus-cache-save-buffers buffer-disable-undo erase-buffer insert-file-contents file gnus-cache-file-name group ".overview" "\n" nntp-server-buffer cached read 1 0 search-forward int-to-string "	" t insert-buffer-substring kill-buffer] 5])
(defalias 'gnus-cache-braid-heads #[(group cached) "!\nqp! )qeb~ m< !< ɔbp!@W< # y\nq @\"!ebc@p\"c#`d|uc)\n!A \n!)" [gnus-get-buffer-create " *gnus-cache*" cache-buf buffer-disable-undo erase-buffer nntp-server-buffer cached looking-at "2.. +\\([0-9]+\\) " 1 read search-forward "\n.\n" nil move 0 insert-file-contents gnus-cache-file-name group "220 " princ " Article retrieved.\n" "\n\n" -1 "." insert-buffer-substring kill-buffer] 5])
#@121 Go through all groups and put the articles into the cache.

Usage:
$ emacs -batch -l ~/.emacs -l gnus -f gnus-jog-cache
(defalias 'gnus-jog-cache #[nil "  \"." [nil t gnus-large-newsgroup gnus-novice-user gnus-use-dribble-file nnmail-spool-file gnus-expert-user gnus-mark-article-hook gnus gnus-group-mark-buffer gnus-group-iterate #[(group) "#=   p!)" [nil gnus-auto-select-next gnus-summary-read-group group t major-mode gnus-summary-mode gnus-uu-mark-buffer gnus-cache-enter-article kill-buffer] 4]] 6 (#$ . 11678) nil])
#@29 Read the cache active file.
(defalias 'gnus-cache-read-active #[(&optional force) "	!! !8U    !ed\"!\"̉)" [gnus-make-directory gnus-cache-directory file-exists-p gnus-cache-active-file 7 file-attributes 0 force gnus-cache-generate-active gnus-set-work-buffer insert-file-contents gnus-active-to-gnus-format nil gnus-make-hashtable count-lines gnus-cache-active-hashtb gnus-cache-active-altered] 6 (#$ . 12248)])
#@45 Write the active hashtb to the active file.
(defalias 'gnus-cache-write-active #[(&optional force) "\f 	V \nV !!q\n\f͎	\"\f\fQ \f=6 \nqQ \nq\f!!I \f!\"ed\f%.ˉ" [force gnus-cache-active-hashtb gnus-cache-active-altered gnus-cache-active-file temp-file fundamental-mode default-major-mode get-buffer-create generate-new-buffer-name " *nnheader temp*" temp-buffer nil temp-results ((byte-code "	!\n 	!" [buffer-name temp-buffer kill-buffer] 2)) mapatoms #[(sym) " ! !JAJ@$c" [sym boundp format "%s %d %d y\n" symbol-name] 5] t file-directory-p file-name-directory make-directory write-region nomesg] 6 (#$ . 12702)])
#@103 Update the upper bound of the active info of GROUP to NUMBER.
If LOW, update the lower bound instead.
(defalias 'gnus-cache-update-active #[(group number &optional low) "	\n\"J 	\n\"BL& \" & ǉ)" [intern-soft group gnus-cache-active-hashtb active intern number low t gnus-cache-active-altered] 4 (#$ . 13386)])
#@33 Generate the cache active file.
(defalias 'gnus-cache-generate-active #[(&optional directory) "?	 !\"	 ǂ3 !!!P!\"!ΕO#	I \"!{ @!\"l A@!!BI A@BI \" \"@!BL @! @!\" @!A 	 !\"." [directory top expand-file-name gnus-cache-directory directory-files full files "" string-match "^" regexp-quote file-name-as-directory directory-file-name nnheader-replace-chars-in-string 0 nil 47 46 group nums alphs gnus-message 5 "Generating the cache active file..." gnus-make-hashtable 123 gnus-cache-active-hashtb "^[0-9]+$" file-name-nondirectory string-to-int sort < intern gnus-last-element file-directory-p "^\\.\\.?$" gnus-cache-generate-active gnus-cache-write-active t "Generating the cache active file...done"] 7 (#$ . 13728) nil])
#@49 Generate NOV files recursively starting in DIR.
(defalias 'gnus-cache-generate-nov-databases #[(dir) " \f!)" [gnus-cache-close identity nnml-generate-active-function nnml-generate-nov-databases-1 dir] 2 (#$ . 14589) (list gnus-cache-directory)])
#@40 Move the cache tree to somewhere else.
(defalias 'gnus-cache-move-cache #[(dir) "	\n\"" [rename-file gnus-cache-directory dir] 3 (#$ . 14847) "FMove the cache tree to: "])
(provide (quote gnus-cache))
