;ELC ;;; compiled by kwzh@nutrimat.gnu.ai.mit.edu on Wed Jul 17 17:00:56 1996 ;;; from file /gd/gnu/emacs/19.0/lisp/gnus-cache.el ;;; emacs version 19.31.94.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")) (require (quote gnus)) #@54 *The directory where cached articles will be stored. (defvar gnus-cache-directory (nnheader-concat gnus-directory "cache/") (#$ . -507)) #@25 *The cache active file. (defvar gnus-cache-active-file (byte-code " !P" [file-name-as-directory gnus-cache-directory "active"] 2) (#$ . -650)) #@47 *Classes of articles to enter into the cache. (defvar gnus-cache-enter-articles (quote (ticked dormant)) (#$ . -802)) #@48 *Classes of articles to remove from the cache. (defvar gnus-cache-remove-articles (quote (read)) (#$ . -926)) #@140 *Groups that match this regexp will not be cached. If you want to avoid caching your nnml groups, you could set this variable to "^nnml". (defvar gnus-uncacheable-groups nil (#$ . -1043)) (byte-code "! B! B!  B\"\"" [boundp gnus-cache-buffer nil current-load-list 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 (#$ . 1486)]) (byte-code "" [nil (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 (#$ . 1774)]) (defalias 'gnus-cache-save-buffers #[nil "bA@\"\f!?\fq V/ !!ed %> !9 !Џ)\fT\f;Q҂R\f!)]!)ˉ*" [gnus-cache-buffer gnus-cache-file-name ".overview" overview-file buffer buffer-modified-p buffer-size 0 gnus-make-directory file-name-directory write-region nil quietly file-exists-p delete-file (byte-code "\n!!" [delete-directory file-name-directory overview-file] 3) ((error)) buf get-buffer buffer-name kill-buffer] 7]) (defalias 'gnus-cache-possibly-enter-article #[(group article headers ticked dormant unread &optional force) " =?e e Ve!e!T\n\n\";\nĔTO=\n) \"@!AI)H͉Vdu\"?d$d\"!?d!!!!݂dq\") Vbed%!$Aqdby珃yo myp!WyyyyHHHHHH1H9HAHI&\nc4q\" 6B6 !)+" [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 dir file number gnus-uncacheable-groups gnus-cache-member-of-class gnus-cache-enter-articles ticked dormant unread file-exists-p gnus-cache-file-name file-name-directory gnus-make-directory t nntp-server-buffer gnus-request-article-this-buffer buffer-size write-region quiet gnus-cache-change-buffer gnus-cache-buffer -1 (byte-code "o?\np! 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 (#$ . 3644)]) #@49 Possibly remove some of the removable articles. (defalias 'gnus-cache-possibly-remove-articles #[nil " ! G \")˔TO+)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 (#$ . 3815)]) #@49 Possibly remove some of the removable articles. (defalias 'gnus-cache-possibly-remove-articles-1 #[nil "=?E\n  !BA@>  > \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 (#$ . 4198)]) #@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 (#$ . 4709)]) #@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 (#$ . 4996)]) #@45 Retrieve the headers for ARTICLES in GROUP. (defalias 'gnus-cache-retrieve-headers #[(articles group &optional fetch-old) " ! #) \"\" \" @> # ) !Q  fq !Ղ =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 (#$ . 5268)]) #@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) " \n!É;A@ \n8É&0 \fB ! !\f! \f+" [gnus-set-global-variables gnus-summary-work-articles n nil out article articles gnus-cache-possibly-enter-article gnus-newsgroup-name 3 gnus-newsgroup-data t gnus-summary-remove-process-mark gnus-summary-update-secondary-mark gnus-summary-next-subject 1 gnus-summary-position-point] 8 (#$ . 5935) "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) " \n!\f!ʼn?A@ʼn%2B!!! +" [gnus-set-global-variables gnus-cache-change-buffer gnus-newsgroup-name gnus-summary-work-articles n nil out article articles gnus-cache-possibly-remove-article t gnus-summary-remove-process-mark gnus-summary-update-secondary-mark gnus-summary-next-subject 1 gnus-summary-position-point] 6 (#$ . 6520) "P"]) #@53 Say whether ARTICLE is cached in the current group. (defalias 'gnus-cached-article-p #[(article) " >" [article gnus-newsgroup-cached] 2 (#$ . 7102)]) (defalias 'gnus-cache-change-buffer #[(group) " @ 8 !qBp! \"  !3 !)!)" [gnus-cache-buffer group gnus-cache-save-buffers get-buffer-create " *gnus-cache-overview*" buffer-disable-undo erase-buffer gnus-cache-file-name ".overview" file file-exists-p 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) " !!\f%\fP\f\"\fȔI\f#)!\f;1\f5\f!Q" [file-name-as-directory gnus-cache-directory gnus-use-long-file-name not-cache group "" string-match ":" 0 47 nnheader-replace-chars-in-string 46 article int-to-string] 6]) #@56 If ARTICLE is in the cache, remove it and re-enter it. (defalias 'gnus-cache-update-article #[(group article) " ‰% 8‰&)" [gnus-cache-possibly-remove-article article nil t gnus-use-cache gnus-cache-possibly-enter-article gnus-newsgroup-name 3 gnus-newsgroup-data] 8 (#$ . 8050)]) #@41 Possibly remove ARTICLE from the cache. (defalias 'gnus-cache-possibly-remove-article #[(article ticked dormant unread &optional force) "  !1 \"\"˔TO$) \"\f@\fA) \f\" !N$ !Aqeb\f!P!r\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 (#$ . 8357)]) #@51 Return a sorted list of cached articles in GROUP. (defalias 'gnus-cache-articles-in-group #[(group) "\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 <] 8 (#$ . 9065)]) (defalias 'gnus-cache-braid-nov #[(group cached) "!‰ qp!  \"!ebceb)qebmHp!@WHy4y q@!Q#ky``m)\f{ \f #cA4 !+" [get-buffer-create " *gnus-cache*" nil end beg cache-buf gnus-cache-save-buffers buffer-disable-undo erase-buffer insert-file-contents 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!)" [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]) #@60 Go through all groups and put the articles into the 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-universal-argument #[nil "# = p!" [gnus-summary-read-group nil t major-mode gnus-summary-mode gnus-uu-mark-buffer gnus-cache-enter-article kill-buffer] 4]] 6 (#$ . 10381) nil]) #@29 Read the cache active file. (defalias 'gnus-cache-read-active #[(&optional force) " ! \"\f!  \f!ed\"!\"ˉ)" [file-exists-p gnus-cache-directory make-directory t gnus-cache-active-file force gnus-cache-active-hashtb 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-altered] 6 (#$ . 10866)]) #@45 Write the active hashtb to the active file. (defalias 'gnus-cache-write-active #[(&optional force) "\f )\n) \"!!ed%)ʉ" [force gnus-cache-active-hashtb gnus-cache-active-altered gnus-set-work-buffer mapatoms #[(sym) "!!JAJ@$c" [sym boundp format "%s %d %d y\n" symbol-name] 5] gnus-make-directory file-name-directory gnus-cache-active-file write-region nil silent] 6 (#$ . 11301)]) #@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)! % lj)" [intern-soft group gnus-cache-active-hashtb active intern number low t gnus-cache-active-altered] 4 (#$ . 11733)]) #@33 Generate the cache active file. (defalias 'gnus-cache-generate-active #[(&optional directory) "? !\" ǂ1 !!P!\"!͕O# G\"!y@!\"jA@!!BGA@BG\"\"@!BL@!@!\"@!A !\"." [directory top expand-file-name gnus-cache-directory directory-files full files "" string-match "^" 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"] 6 (#$ . 12073) 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 (#$ . 12919) (list gnus-cache-directory)]) (provide (quote gnus-cache))