;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Apr 17 19:47:39 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/nnspool.el ;;; emacs version 19.28.90.26. ;;; 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"))) (error "`/gd/gnu/emacs/19.0/lisp/nnspool.el' was compiled for Emacs 19")) (require (quote nntp)) #@24 *Program to post news. (defvar nnspool-inews-program news-inews-program (#$ . -506)) #@73 *Switches for nnspool-request-post to pass to `inews' for posting news. (defvar nnspool-inews-switches (quote ("-h")) (#$ . -597)) #@30 *Local news spool directory. (defvar nnspool-spool-directory news-path (#$ . -734)) #@26 *Local news active file. (defvar nnspool-active-file "/usr/lib/news/active" (#$ . -824)) #@30 *Local news newsgroups file. (defvar nnspool-newsgroups-file "/usr/lib/news/newsgroups" (#$ . -919)) #@33 *Local news distributions file. (defvar nnspool-distributions-file "/usr/lib/news/distributions" (#$ . -1026)) #@27 *Local news history file. (defvar nnspool-history-file "/usr/lib/news/history" (#$ . -1143)) #@45 Version numbers of this version of NNSPOOL. (defconst nnspool-version "NNSPOOL 1.12" (#$ . 1242)) #@31 Current news group directory. (defvar nnspool-current-directory nil (#$ . 1346)) #@413 Return list of article headers specified by SEQUENCE of article id. The format of list is `([NUMBER SUBJECT FROM XREF LINES DATE MESSAGE-ID REFERENCES] ...)'. If there is no References: field, In-Reply-To: field is used instead. Reader macros for the vector are defined as `nntp-header-FIELD'. Writer macros for the vector are defined as `nntp-set-header-FIELD'. Newsgroup must be selected before calling this. (defalias 'nnspool-retrieve-headers #[(sequence) "q\nG \n \f \n\n@  !P!X!X !eb#e`}eb#oۉ#^ebceb#``){eb#``){\n\neb#``){  eb#``){eb#``){!eb#``){eb#*#6``){8 X X \n  \f&\fB\f\nA T +'+V' U' _\"'++V!\f. " [nntp-server-buffer nil sequence 0 references date lines xref from message-id subject article headers count number file nnspool-current-directory prin1-to-string file-exists-p file-directory-p erase-buffer insert-file-contents search-forward "\n\n" move re-search-forward "\\( ?\n[ ]+\\)+" t replace-match " " "\n" "\nFrom: " "(Unknown User)" "\nSubject: " "(None)" "\nMessage-ID: " "\nDate: " "\nLines: " string-to-int "\nXref: " "\nReferences: " "\nIn-Reply-To: " vector nntp-large-newsgroup 20 message "NNSPOOL: Receiving headers... %d%%" 100 "NNSPOOL: Receiving headers... done"] 12 (#$ . 1434)]) #@158 Open news server on HOST. If HOST is nil, use value of environment variable `NNTPSERVER'. If optional argument SERVICE is non-nil, open by the service name. (defalias 'nnspool-open-server #[(host &optional service) "!!+\n!+ + \"K ;\"KEK\"\f*" [host getenv "NNTPSERVER" nil status "" nntp-status-string file-directory-p nnspool-spool-directory file-exists-p nnspool-active-file system-name nnspool-open-server-internal service format "%s has no news spool. Goodbye." "NNTP server is not specified." "NNSPOOL: cannot talk to %s."] 3 (#$ . 2934)]) #@20 Close news server. (defalias 'nnspool-close-server #[nil " " [nnspool-close-server-internal] 1 (#$ . 3544)]) (byte-code "KM" [nnspool-request-quit nnspool-close-server] 2) #@98 Return server process status, T or NIL. If the stream is opened, return T, otherwise return NIL. (defalias 'nnspool-server-opened #[nil "!" [nntp-server-buffer get-buffer] 2 (#$ . 3727)]) #@42 Return server status response as string. (defalias 'nnspool-status-message #[nil "" [nntp-status-string] 1 (#$ . 3928)]) #@43 Select article by message ID (or number). (defalias 'nnspool-request-article #[(id) "; !\n!P;(\f!(\f!?(\f!))" [id nnspool-find-article-by-message-id nnspool-current-directory prin1-to-string file file-exists-p file-directory-p nnspool-find-file] 4 (#$ . 4057)]) #@48 Select article body by message ID (or number). (defalias 'nnspool-request-body #[(id) " !\nqeb#e`|)Ƈ" [nnspool-request-article id nntp-server-buffer search-forward "\n\n" nil t] 4 (#$ . 4348)]) #@48 Select article head by message ID (or number). (defalias 'nnspool-request-head #[(id) " !\nqeb#`Sd|)Ƈ" [nnspool-request-article id nntp-server-buffer search-forward "\n\n" nil t] 4 (#$ . 4564)]) #@43 Select article by message ID (or number). (defalias 'nnspool-request-stat #[(id) "‡" ["NNSPOOL: STAT is not implemented." nntp-status-string nil] 1 (#$ . 4781)]) #@20 Select news GROUP. (defalias 'nnspool-request-group #[(group) "\n#! ! )" [nnspool-article-pathname nnspool-replace-chars-in-string group 46 47 pathname file-directory-p nnspool-current-directory] 5 (#$ . 4952)]) #@24 List active newsgoups. (defalias 'nnspool-request-list #[nil " !)" [nnspool-find-file nnspool-active-file] 2 (#$ . 5183)]) #@37 List newsgroups (defined in NNTP2). (defalias 'nnspool-request-list-newsgroups #[nil " !)" [nnspool-find-file nnspool-newsgroups-file] 2 (#$ . 5315)]) #@40 List distributions (defined in NNTP2). (defalias 'nnspool-request-list-distributions #[nil " !)" [nnspool-find-file nnspool-distributions-file] 2 (#$ . 5475)]) #@80 Set current article pointer to the previous article in the current news group. (defalias 'nnspool-request-last #[nil "‡" ["NNSPOOL: LAST is not implemented." nntp-status-string nil] 1 (#$ . 5644)]) #@34 Advance current article pointer. (defalias 'nnspool-request-next #[nil "‡" ["NNSPOOL: NEXT is not implemented." nntp-status-string nil] 1 (#$ . 5851)]) #@36 Post a new news in current buffer. (defalias 'nnspool-request-post #[nil " ed# qed\f& U# \"ed%  )" [copy-to-buffer nntp-server-buffer apply call-process-region nnspool-inews-program delete t nil nnspool-inews-switches buffer-size 0 string-match "spooled" buffer-string subst-char-in-region 10 92 noundo nntp-status-string erase-buffer] 9 (#$ . 6012)]) #@70 Open connection to news server on HOST by SERVICE (default is nntp). (defalias 'nnspool-open-server-internal #[(host &optional service) " \"!qp!   !)ʇ" [host system-name error "NNSPOOL: cannot talk to %s." get-buffer-create " *nntpd*" nntp-server-buffer buffer-flush-undo erase-buffer kill-all-local-variables t case-fold-search nil nntp-server-process nntp-server-name run-hooks nntp-server-hook] 4 (#$ . 6401)]) #@34 Close connection to news server. (defalias 'nnspool-close-server-internal #[nil " !\f !!  !ĉ" [get-file-buffer nnspool-history-file kill-buffer nntp-server-buffer nil nntp-server-process] 3 (#$ . 6856)]) #@62 Return full pathname of an article identified by message-ID. (defalias 'nnspool-find-article-by-message-id #[(id) " !\nq! !q!)db\n!Q#HΔΕ{ϔϕ{#!P*)" [get-file-buffer nnspool-history-file buffer message "Reading history file..." find-file-noselect "Reading history file... done" re-search-backward "^" regexp-quote id "[ ].*[ ]\\([^ /]+\\)/\\([0-9]+\\)[ ]*$" nil t 1 2 number group nnspool-article-pathname nnspool-replace-chars-in-string 46 47] 6 (#$ . 7082)]) #@38 Insert FILE in server buffer safely. (defalias 'nnspool-find-file #[(file) "q ď" [nntp-server-buffer erase-buffer nil (byte-code " !‡" [insert-file-contents file t] 2) ((file-error))] 3 (#$ . 7597)]) #@26 Make pathname for GROUP. (defalias 'nnspool-article-pathname #[(group) " !\nQ" [file-name-as-directory nnspool-spool-directory group "/"] 3 (#$ . 7814)]) #@47 Replace characters in STRING from FROM to TO. (defalias 'nnspool-replace-chars-in-string #[(string from to) "OG \fW% H U I T +" [string 0 nil idx len from to] 4 (#$ . 7977)]) (provide (quote nnspool))