;ELC   
;;; compiled by gsstark@lola-granola.MIT.EDU on Tue Jul 23 13:34:44 1996
;;; from file /afs/sipb.mit.edu/contrib/emacs/packages/gnus-5.2.37/lisp/gnus-soup.el
;;; emacs version 19.30.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-soup.el' was compiled for Emacs 19.29 or later"))


(byte-code "!!" [require gnus-msg gnus] 2)
#@48 *Directory containing an unpacked SOUP packet.
(defvar gnus-soup-directory "~/SoupBrew/" (#$ . -562))
#@54 *Directory where Gnus will do processing of replies.
(defvar gnus-soup-replies-directory (concat gnus-soup-directory "SoupReplies/") (#$ . -670))
#@59 *Name of the file where Gnus stores the last used prefix.
(defvar gnus-soup-prefix-file "gnus-prefix" (#$ . -822))
#@205 Format string command for packing a SOUP packet.
The SOUP files will be inserted where the %s is in the string.
This string MUST contain both %s and %d. The file number will be
inserted where %d appears.
(defvar gnus-soup-packer "tar cf - %s | gzip > $HOME/Soupout%d.tgz" (#$ . 944))
#@107 *Format string command for unpacking a SOUP packet.
The SOUP packet file name will be inserted at the %s.
(defvar gnus-soup-unpacker "gunzip -c %s | tar xvf -" (#$ . -1235))
#@49 *Where gnus-soup will look for REPLIES packets.
(defvar gnus-soup-packet-directory "~/" (#$ . -1415))
#@84 *Regular expression matching SOUP REPLIES packets in `gnus-soup-packet-directory'.
(defvar gnus-soup-packet-regexp "Soupin" (#$ . -1523))
#@67 *Regexp to match headers to be removed when brewing SOUP packets.
(defvar gnus-soup-ignored-headers "^Xref:" (#$ . -1667))
#@99 *Soup encoding type.
`n' is news format, `m' is Unix mbox format, and `M' is MMDF mailbox
format.
(defvar gnus-soup-encoding-type 110 (#$ . -1796))
#@89 *Soup index type.
`n' means no index file and `c' means standard Cnews overview
format.
(defvar gnus-soup-index-type 99 (#$ . -1950))
(byte-code "! B! B!  B!- B" [boundp gnus-soup-areas nil current-load-list gnus-soup-last-prefix gnus-soup-prev-prefix gnus-soup-buffers] 2)
(defalias 'gnus-soup-area-prefix '(macro . #[(area) "	BB" [aref area (0)] 3]))
(defalias 'gnus-soup-set-area-prefix '(macro . #[(area prefix) "	F" [aset area 0 prefix] 4]))
(defalias 'gnus-soup-area-name '(macro . #[(area) "	BB" [aref area (1)] 3]))
(defalias 'gnus-soup-area-encoding '(macro . #[(area) "	BB" [aref area (2)] 3]))
(defalias 'gnus-soup-area-description '(macro . #[(area) "	BB" [aref area (3)] 3]))
(defalias 'gnus-soup-area-number '(macro . #[(area) "	BB" [aref area (4)] 3]))
(defalias 'gnus-soup-area-set-number '(macro . #[(area value) "	F" [aset area 4 value] 4]))
(defalias 'gnus-soup-encoding-format '(macro . #[(encoding) "	BB" [aref encoding (0)] 3]))
(defalias 'gnus-soup-encoding-index '(macro . #[(encoding) "	BB" [aref encoding (1)] 3]))
(defalias 'gnus-soup-encoding-kind '(macro . #[(encoding) "	BB" [aref encoding (2)] 3]))
(defalias 'gnus-soup-reply-prefix '(macro . #[(reply) "	BB" [aref reply (0)] 3]))
(defalias 'gnus-soup-reply-kind '(macro . #[(reply) "	BB" [aref reply (1)] 3]))
(defalias 'gnus-soup-reply-encoding '(macro . #[(reply) "	BB" [aref reply (2)] 3]))
#@50 Unpack and send all replies in the reply packet.
(defalias 'gnus-soup-send-replies #[nil "	# \f@! \f@!\fA\n )" [directory-files gnus-soup-packet-directory t gnus-soup-packet-regexp packets gnus-soup-send-packet delete-file nil] 5 (#$ . 3410) nil])
#@247 Add the current article to SOUP packet.
If N is a positive number, add the N next articles.
If N is a negative number, add the N previous articles.
If N is nil and any articles have been marked with the process mark,
move those articles instead.
(defalias 'gnus-soup-add-article #[(n) " \n!!!	H! q@8h q@\"h  \")%		He TIq@!@\"A$ !) -" [gnus-set-global-variables gnus-summary-work-articles n articles get-buffer-create "*soup work*" tmp-buf gnus-soup-area gnus-newsgroup-name area 0 prefix nil headers buffer-disable-undo gnus-summary-buffer 3 gnus-newsgroup-data gnus-request-article-this-buffer message-narrow-to-head message-remove-header gnus-soup-ignored-headers t gnus-soup-store gnus-soup-directory gnus-soup-encoding-type gnus-soup-index-type 4 gnus-summary-remove-process-mark gnus-summary-mark-as-read gnus-souped-mark kill-buffer gnus-soup-save-areas] 7 (#$ . 3682) "P"])
#@41 Make a SOUP packet from the SOUP areas.
(defalias 'gnus-soup-pack-packet #[nil " \n\"" [gnus-soup-read-areas gnus-soup-pack gnus-soup-directory gnus-soup-packer] 3 (#$ . 4664) nil])
#@80 Make a soup packet from the current group.
Uses the process/prefix convention.
(defalias 'gnus-group-brew-soup #[(n) "	! \n@!\n@\"\nA  )" [gnus-group-process-prefix n groups gnus-group-remove-mark gnus-soup-group-brew t gnus-soup-save-areas] 4 (#$ . 4857) "P"])
#@64 Go through all groups on LEVEL or less and make a soup packet.
(defalias 'gnus-brew-soup #[(&optional level) " 	\nA$ @A@X @@\"A  *" [level gnus-level-subscribed gnus-newsrc-alist newsrc gnus-soup-group-brew t gnus-soup-save-areas] 4 (#$ . 5141) "P"])
#@350 Brew a SOUP packet from groups mention on the command line.
Will use the remaining command line arguments as regular expressions
for matching on group names.

For instance, if you want to brew on all the nnml groups, as well as
groups with "emacs" in the name, you could say something like:

$ emacs -batch -f gnus-batch-brew-soup ^nnml ".*emacs.*"
(defalias 'gnus-batch-brew-soup #[nil "" [nil] 1 (#$ . 5421) nil])
(defalias 'gnus-soup-store #[(directory prefix headers format index) "	!\n 	!	\fQ!U?  	\fQ!\np\"B!\nR \nB\n!dbiU_ ceb!r !r !!ebU  \" U # #   հ U ꂿ \"qdbc`!U \nq0\" U \"." [file-directory-p directory gnus-make-directory find-file-noselect prefix ".MSG" msg-buf index 110 ".IDX" idx-buf article-buf nil from head-line beg type delq gnus-soup-buffers buffer-disable-undo 0 "\n" gnus-mail-strip-quoted-names mail-fetch-field "from" "really-from" "sender" gnus-soup-encoding-type format "#! rnews %d\n" buffer-size 109 search-forward "\nFrom " t replace-match "\n>From " "From " "unknown" " " current-time-string 77 "\n" error "Unsupported type: %c" insert-buffer-substring 99 gnus-soup-insert-idx headers "Unknown index type: %c"] 5])
#@93 Enter GROUP and add all articles to a SOUP package.
If NOT-ALL, don't pack ticked articles.
(defalias 'gnus-soup-group-brew #[(group &optional not-all) "\f\"J6 @=6 @# @V6 	?X 88A!X #X 	M \"O !! +" [t nil intern-soft group gnus-newsrc-hashtb entry gnus-large-newsgroup gnus-expert-user 0 not-all gnus-range-length tick 3 2 gnus-summary-read-group reverse append gnus-newsgroup-marked gnus-newsgroup-unreads gnus-newsgroup-processable gnus-soup-add-article gnus-summary-exit] 5 (#$ . 6745)])
(defalias 'gnus-soup-insert-idx #[(offset header) "db\nH H H H)  #PH0 H7 H> &	c" [format "%d	%s	%s	%s	%s	%s	%d	%s		\n" offset header 1 "(none)" 2 "(nobody)" 3 "" 4 "soup-dummy-id-" mapconcat #[(time) "	!" [int-to-string time] 2] current-time "-" 5 6 0 7 "0"] 11])
(defalias 'gnus-soup-save-areas #[nil " ( @A\n! \nq !  p! ) )" [gnus-soup-write-areas nil buf gnus-soup-buffers buffer-name buffer-modified-p save-buffer kill-buffer gnus-soup-write-prefixes] 2])
(defalias 'gnus-soup-write-prefixes #[nil "	-  	@A\"c	@@!ed	@@P%	A *" [gnus-soup-last-prefix prefix gnus-set-work-buffer format "(setq gnus-soup-prev-prefix %d)\n" gnus-make-directory write-region gnus-soup-prefix-file nil nomesg] 7])
(defalias 'gnus-soup-pack #[(dir packer) "#\"\"W\" \f\f!!#- \f!!\f#\f!\f\f!A \f!#Љ\fR&U{ Љ\f\fR&#~ !+" [mapconcat identity ("AREAS" "*.MSG" "*.IDX" "INFO" "LIST" "REPLIES" "COMMANDS" "ERRORS") " " files string-match "%s" packer "%d" format string-to-int gnus-soup-unique-prefix dir expand-file-name file-directory-p gnus-make-directory nil gnus-soup-areas gnus-message 4 "Packing %s..." call-process shell-file-name shell-command-switch "cd " " ; " 0 " ; rm " "Packing...done" error "Couldn't pack packet."] 10])
#@232 Parse soup area file FILE.
The result is a of vectors, each containing one entry from the AREA file.
The vector contain five strings, 
  [prefix name encoding description number]
though the two last may be nil if they are missing.
(defalias 'gnus-soup-parse-areas #[(file) "\"qp!ebm=    h=#  h=-  !%	Bh= y p!)	)" [nil areas find-file-noselect file force buffer-disable-undo vector gnus-soup-field 9 string-to-int 1 kill-buffer] 7 (#$ . 8673)])
#@166 Parse soup REPLIES file FILE.
The result is a of vectors, each containing one entry from the REPLIES
file. The vector contain three strings, [prefix name encoding].
(defalias 'gnus-soup-parse-replies #[(file) "!qp!ebm*    #	Bh= y p!)	)" [nil replies find-file-noselect file buffer-disable-undo vector gnus-soup-field 9 1 kill-buffer] 4 (#$ . 9157)])
(defalias 'gnus-soup-field #[nil "`w`{u" ["^	\n" nil 1] 3])
(defalias 'gnus-soup-read-areas #[nil " \nP!" [gnus-soup-areas gnus-soup-parse-areas gnus-soup-directory "AREAS"] 3])
#@23 Write the AREAS file.
(defalias 'gnus-soup-write-areas #[nil " 	P!!& !!& !\"̎A@~ HHHHW Hw H` Hr H!Ps Qx %c. * qed%," [gnus-soup-areas gnus-soup-directory "AREAS" nnheader-set-temp-buffer generate-new-buffer-name " *nnheader temp*" nnheader-temp-cur-buffer nnheader-temp-file file-directory-p file-name-directory make-directory t ((byte-code "	!\n 	!" [buffer-name nnheader-temp-cur-buffer kill-buffer] 2)) nil area areas format "%s	%s	%s%s\n" 0 1 2 3 4 "	" "" int-to-string write-region nomesg] 12 (#$ . 9730) nil])
#@47 Write a REPLIES file in DIR containing AREAS.
(defalias 'gnus-soup-write-replies #[(dir areas) "P!!! !!! !\"ˎA@G HHH$c& )Y qed%," [dir "REPLIES" nnheader-set-temp-buffer generate-new-buffer-name " *nnheader temp*" nnheader-temp-cur-buffer nnheader-temp-file file-directory-p file-name-directory make-directory t ((byte-code "	!\n 	!" [buffer-name nnheader-temp-cur-buffer kill-buffer] 2)) nil area areas format "%s	%s	%s\n" 0 1 2 write-region nomesg] 8 (#$ . 10353)])
(defalias 'gnus-soup-area #[(group) " 	\n\" ƔTO )ǉ	\nB @	A	H\n\" 	\" h  \n\n\"] Ղ^ $ǉ%	B," [gnus-soup-read-areas gnus-soup-areas group gname string-match ":[^:]+$" 0 nil result area real-group areas 1 vector gnus-soup-unique-prefix format "%c%c%c" gnus-soup-encoding-type gnus-soup-index-type gnus-member-of-valid mail 109 110] 11])
(defalias 'gnus-soup-unique-prefix #[(&optional dir) "	 \n!	\f\"/ 		P!\" ˏ	) B\fBAT A!+" [file-name-as-directory dir gnus-soup-directory assoc gnus-soup-last-prefix entry nil gnus-soup-prev-prefix file-exists-p gnus-soup-prefix-file (byte-code "	\nPĉ$" [load dir gnus-soup-prefix-file nil t] 5) ((error)) 0 gnus-soup-write-prefixes int-to-string] 3])
#@85 Unpack PACKET into DIR using UNPACKER.
Return whether the unpacking was successful.
(defalias 'gnus-soup-unpack-packet #[(dir unpacker packet) "	!\"#	ʉ	!\"#&U\"" [gnus-make-directory dir gnus-message 4 "Unpacking: %s" format unpacker packet call-process shell-file-name nil shell-command-switch "cd %s ; %s" expand-file-name 0 "Unpacking...done"] 12 (#$ . 11680)])
(defalias 'gnus-soup-send-packet #[(packet) "	\n#	P!		@HQ		!( 	!\f!@HHUH ! \f \f!!\fqebm !l !y``۔ە{!\\! \f#eb!u#c %&@H瘃 !#!.  @H !#!  !\fqb^  !\f!!\"-A *" [gnus-soup-unpack-packet gnus-soup-replies-directory gnus-soup-unpacker packet gnus-soup-parse-replies "REPLIES" replies 0 ".MSG" msg-file file-exists-p find-file-noselect msg-buf get-buffer-create " *soup send*" tmp-buf nil beg end 2 110 error "Unsupported encoding" buffer-disable-undo looking-at "#! *rnews +\\([0-9]+\\)" "Bad header." 1 string-to-int switch-to-buffer erase-buffer insert-buffer-substring search-forward "\n\n" -1 mail-header-separator gnus-extended-version message-mailer message-newsreader "news" gnus-message 5 "Sending news message to %s..." mail-fetch-field "newsgroups" sit-for message-send-news-function "mail" "Sending mail to %s..." "to" message-send-mail "Unknown reply kind" delete-file buffer-file-name kill-buffer 4 "Sent packet" t] 6])
(provide (quote gnus-soup))
