;ELC   
;;; Compiled by jmorzins@kamp-krusty.mit.edu on Mon Oct  3 10:37:23 2005
;;; from file /afs/sipb/contrib/emacs/packages/mh-e-7.82/mh-index.el
;;; in Emacs version 21.4.1
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`mh-index.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\"\210\305\310\311\"\210\305\312\313\"\210\305\314\315\"\207" [require cl mh-e mh-mime mh-pick autoload gnus-local-map-property "gnus-util" gnus-eval-format "gnus-spec" widget-convert-button "wid-edit" executable-find "executable"] 3)
#@35 List of possible indexer choices.
(defvar mh-indexer-choices '((swish++ mh-swish++-binary mh-swish++-execute-search mh-swish++-next-result mh-swish++-regexp-builder) (swish mh-swish-binary mh-swish-execute-search mh-swish-next-result nil) (mairix mh-mairix-binary mh-mairix-execute-search mh-mairix-next-result mh-mairix-regexp-builder) (namazu mh-namazu-binary mh-namazu-execute-search mh-namazu-next-result nil) (pick mh-pick-binary mh-pick-execute-search mh-pick-next-result mh-pick-regexp-builder) (grep mh-grep-binary mh-grep-execute-search mh-grep-next-result nil)) (#$ . 945))
#@23 Chosen index program.
(defvar mh-indexer nil (#$ . 1535))
#@45 Function which executes the search program.
(defvar mh-index-execute-search-function nil (#$ . 1599))
#@44 Function to parse the next line of output.
(defvar mh-index-next-result-function nil (#$ . 1707))
#@43 Function used to construct search regexp.
(defvar mh-index-regexp-builder nil (#$ . 1811))
#@69 Folder that contains the folders resulting from the index searches.
(defvar mh-index-folder "+mhe-index" (#$ . 1908))
(byte-code "\301B\303\301!\204\f \304\302B\303\302!\204 \305\306B\307B\301\207" [current-load-list mh-index-temp-buffer mh-checksum-buffer boundp " *mh-index-temp*" " *mh-checksum-buffer*" mh-checksum-cmd mh-checksum-parser] 2)
#@53 Check if a program to create a checksum is present.
(defalias 'mh-checksum-choose #[nil "\303\301!?\205D \304\305\"\306\307!\203 \306\307!C\310\211\202C \306\311!\203/ \306\311!\312D\313\211\202C \306\312!\203@ \306\312!C\314\211\202C \315\316!)\207" [exec-path mh-checksum-cmd mh-checksum-parser boundp append ("/sbin" "/usr/sbin") executable-find "md5sum" mh-md5sum-parser "openssl" "md5" mh-openssl-parser mh-md5-parser error "No suitable checksum program"] 3 (#$ . 2271)])
#@22 Parse md5sum output.
(defalias 'mh-md5sum-parser #[nil "\304 \305 \306\211\307\310\n\311#\nb\210\312\313\311#	\2032 \2032 \314\315T\n\"!@\315	S\"B\2025 \306\211B,\207" [last-slash first-space end begin line-beginning-position line-end-position nil search-forward " " t search-backward "/" read-from-string buffer-substring-no-properties] 4 (#$ . 2763)])
#@23 Parse openssl output.
(defalias 'mh-openssl-parser #[nil "\304 \305 \306\211\nb\210\307\310\311#\307\312\311#\211\2050 	\2050 \313\314T	S\"!@\314	T\n\"B,\207" [last-slash last-space end begin line-beginning-position line-end-position nil search-backward " " t "/" read-from-string buffer-substring-no-properties] 5 (#$ . 3133)])
(defalias 'mh-md5-parser 'mh-openssl-parser)
#@38 Maximum number of command line args.
(defvar mh-index-max-cmdline-args 500 (#$ . 3522))
#@250 Partial imitation of xargs.
The current buffer contains a list of strings, one on each line. The function
will execute CMD with ARGS and pass the first `mh-index-max-cmdline-args'
strings to it. This is repeated till all the strings have been used.
(defalias 'mh-index-execute #[(cmd &rest args) "eb\210p\306\307\310!!\311\216r	q\210pq\210m\204N \312!\313m\204< \fW\203< \314`\315 \"B\fT\316y\210\202  \317\320\316\n\316D\316\237&\210*\202 \321 \210\322\n!-\207" [current-buffer #1=#:temp-buffer out args count arg-list get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) reverse 0 buffer-substring-no-properties line-end-position nil apply call-process erase-buffer insert-buffer-substring mh-index-max-cmdline-args cmd] 7 (#$ . 3617)])
#@415 Update various maps for one message.
MSG is a index folder message, CHECKSUM its MD5 hash and ORIGIN-MAP, if
non-nil, a hashtable containing which maps each message in the index folder to
the folder and message that it was copied from. The function updates the hash
tables `mh-index-msg-checksum-map' and `mh-index-checksum-origin-map'.

This function should only be called in the appropriate index folder buffer.
(defalias 'mh-index-update-single-msg #[(msg checksum origin-map) "\203< \306	\n\"\203< \306\"\211@\fA\307\310\311\211\211\312\313\314\311O$%\210\306\"\205: \315\306\"\"+\207\316	#\210\205O \316	\306\"\n#\207" [origin-map checksum mh-index-checksum-origin-map msg intermediate ofolder gethash call-process "rm" nil format "%s%s/%s" 1 remhash cl-puthash omsg mh-user-path mh-current-folder mh-index-data mh-index-msg-checksum-map] 12 (#$ . 4460)])
#@349 Annotate all as yet unannotated messages in FOLDER with their MD5 hash.
As a side effect msg -> checksum map is updated. Optional argument ORIGIN-MAP
is a hashtable which maps each message in the index folder to the original
folder and message from whence it was copied. If present the
checksum -> (origin-folder, origin-index) map is updated too.
(defalias 'mh-index-update-maps #[(folder &optional origin-map) "\306!\210\212\307	!q\210\310 \210\307\311\312!!\313\216r\nq\210\314\315\316\317\320\321\f\322&\210eb\210\315\211&m\204{ \323`\324 \"&\315y\210\212\325\326&\"\203t l\203[ 	q\210'\f\327\315O\330&\331\261\210\202t \323`\324 \"\332&!@&\fq\210\333&(#\210))\315y\210\202- -m\203\204 o\204\305 \334\335)\"\210eb\210m\204\305 * \211+@&+A&\203\276 \336\337\f&\340\341\342\343\344&	\210\212\fq\210\333&(#\210)\315y\210+\202\215 )\345 \207" [mh-index-msg-checksum-map mh-checksum-buffer #1=#:temp-buffer mh-scan-prog folder checksum clrhash get-buffer-create erase-buffer generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) mh-exec-cmd-output nil "-width" "80" "-format" "%(msg)\n%{x-mhe-checksum}\n" "all" buffer-substring-no-properties line-end-position string-match "^[0-9]*$" 1 "/" "\n" read-from-string mh-index-update-single-msg apply mh-index-execute mh-exec-cmd "anno" "-component" "X-MHE-Checksum" "-nodate" "-text" "-inplace" mh-index-write-data msg mh-user-path origin-map mh-checksum-cmd mh-checksum-parser intermediate] 11 (#$ . 5354)])
#@42 List of sequences that aren't preserved.
(defvar mh-unpropagated-sequences '(cur range subject search) (#$ . 6904))
#@200 Return a list of sequences that aren't propagated to the source folders.
It is just the sequences in the variable `mh-unpropagated-sequences' in
addition to the Previous-Sequence (see mh-profile 5).
(defalias 'mh-unpropagated-sequences #[nil "\203 	B\207	\207" [mh-previous-seq mh-unpropagated-sequences] 2 (#$ . 7027)])
#@187 Return a map from msg number to list of sequences in which it is present.
SEQ-LIST is an assoc list whose keys are sequence names and whose cdr is the
list of messages in that sequence.
(defalias 'mh-create-sequence-map #[(seq-list) "\306 	\307\n:\203F \n@\211@\310 >\204? \311@!\203? A\307\f:\203> \f@\312@\313\"B#\210\fA\211\202$ *\nA\211\202 +\207" [map seq-list #1=#:G2844 seq #2=#:G2845 msg make-hash-table nil mh-unpropagated-sequences mh-valid-seq-p cl-puthash gethash] 8 (#$ . 7358)])
#@61 Mirror sequences present in source folders in index folder.
(defalias 'mh-index-create-sequences #[nil "\306\307\310\"\311\312\313\n\"\210\314\315\"\311\211\203y @\316\f\"\316\"\211@A \317\320\321\217!\311\"!:\203p !@\"\322\"\"\203` \322\"\"\f\322\"\"AB\241\210\202g \"\fDB!A\211!\202= .A\211\204 *#\311\"#:\203\250 #@\"\323\324\325\326\327\"@!\330\331\332\"A\"&\210#A\211#\202\202 ,\311\207" [seq-list seq-hash mh-index-data mh-current-folder msg #1=#:--dolist-temp--2851 make-hash-table :test equal nil maphash #[(folder #2=#:G2850) "\n\305\306\307\"!\310	\f#+\207" [folder #3=#:--x--2853 seq-hash #4=#:--h--2854 #5=#:--store--2856 mh-create-sequence-map mh-read-folder-sequences nil cl-puthash] 4] mh-translate-range "all" gethash #6=#:G2858 (byte-code "\303\303	\n\"\"\207" [omsg ofolder seq-hash gethash] 5) ((error)) assoc apply mh-exec-cmd "mark" "-sequence" symbol-name "-add" mapcar #[(x) "\301\302\"\207" [x format "%s"] 3] mh-index-msg-checksum-map checksum mh-index-checksum-origin-map pair ofolder omsg #7=#:G2857 seq #8=#:G2852] 11 (#$ . 7875)])
#@64 Subfolder for `mh-index-folder' where flists output is placed.
(defvar mh-flists-results-folder "sequence" (#$ . 9003))
(byte-code "\302B\301B\303\301!\204 \304\304\207" [current-load-list mh-flists-called-flag mh-flists-sequence boundp nil] 2)
#@357 Given STRING generate a name which is suitable for use as a folder name.
White space from the beginning and end are removed. All spaces in the name are
replaced with underscores and all / are replaced with $. If STRING is longer
than 20 it is truncated too. STRING could be a list of strings in which case
they are concatenated to construct the base name.
(defalias 'mh-index-generate-pretty-name #[(string) "\306\307\310!!\311\216rq\210	;\203 	c\210\2029 	@\203  	@c\210	A\312\211\2038 @\313\n\261\210A\211\204) *\314\315\316\"\314\317\316\"\320ed\321\322\323%\210\320ed\324\322\323%\210\320ed\325\322\323%\210eb\210m\204p \312f\326>\203p \327\330!\210\202^ db\210o\204\206 `Sf\331>\203\206 \332\330!\210\202s \320ed\322\333\323%\210\320ed\334\333\323%\210\320ed\335\333\323%\210\320ed\336\333\323%\210\320ed\337\340\323%\210\341\342 \343\"\344=\203\304 \345\346()#\202\322 \f(\232\203\321 \f\347P\202\322 \f,\207" [#1=#:temp-buffer string s #2=#:--dolist-temp--2861 out mh-indexer get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) nil "_" mh-replace-string "-lbrace" " " "-rbrace" subst-char-in-region 40 32 t 41 45 (32 9 10 13 95) delete-char 1 (32 9 10 13 95) delete-backward-char 95 9 10 13 47 36 truncate-string-to-width buffer-string 20 flists format "%s/%s" "1" mh-flists-results-folder mh-flists-sequence] 6 (#$ . 9261)])
#@1663 Perform an indexed search in an MH mail folder.
Use a prefix argument to repeat the search, as in REDO-SEARCH-FLAG below.

If REDO-SEARCH-FLAG is non-nil and the current folder buffer was generated by a
index search, then the search is repeated. Otherwise, FOLDER is searched with
SEARCH-REGEXP and the results are presented in an MH-E folder. If FOLDER is
"+" then mail in all folders are searched. Optional argument WINDOW-CONFIG
stores the window configuration that will be restored after the user quits the
folder containing the index search results.

Four indexing programs are supported; if none of these are present, then grep
is used. This function picks the first program that is available on your
system. If you would prefer to use a different program, set the customization
variable `mh-index-program' accordingly.

The documentation for the following functions describes how to generate the
index for each program:

    - `mh-swish++-execute-search'
    - `mh-swish-execute-search'
    - `mh-mairix-execute-search'
    - `mh-namazu-execute-search'

If none of these programs are present then we use pick. If desired grep can be
used instead. Details about these methods can be found in:

    - `mh-pick-execute-search'
    - `mh-grep-execute-search'

This and related functions use an X-MHE-Checksum header to cache the MD5
checksum of a message. This means that already present X-MHE-Checksum headers
in the incoming email could result in messages not being found. The following
procmail recipe should avoid this:

  :0 wf
  | formail -R "X-MHE-Checksum" "Old-X-MHE-Checksum"

This has the effect of renaming already present X-MHE-Checksum headers.
(defalias 'mh-index-search #[(redo-search-flag folder search-regexp &optional window-config) "\300\301\215\207" [--cl-block-mh-index-search-- (byte-code "\203 	\203 \n\203 \204 \306\307\310\f\"\210)\311\312\313\"\2109\2031 \31434\"\210\3155\311\312\313\"\210\316 \210\3174\206< 6\f\320\3217\322!#89:;\203y \f\203y \323p!\324!\210\212\325\313\326#\210)\325\313\327\330\331%\2108)\202\200 \3328\"8\320\333<3\334\313O#\335\336\337\"\335\336\337\"=>?\340\341@\"\210A?\"\210\340\342@\"\210eb\210\313BC \211B\203B\343=\204\261 \344B@>\"\204\344 B@D>E\335\336\337\"F\345DFE#\210+B\211GA@)H\344B@>\"I\345H\306I#\210*\202\261 )\346\347>\"\210\3508\313>=D#\210eb\210\313y\210\351 \210\352\313!\210\353 \203-\354\306J\"\210\20369\204;4\203?:63D\204K\355 \210\340\356\357\360@!!\317K\346\361	\"\210K)\317L\346\362	\"\210L)$.\207" [redo-search-flag mh-index-data mh-index-sequence-search-flag mh-flists-called-flag mh-index-previous-search search-regexp t apply mh-index-sequenced-messages throw --cl-block-mh-index-search-- nil mh-search-folder mh-index-do-search mh-checksum-choose 0 format "%s/%s" mh-index-generate-pretty-name buffer-name mh-process-or-undo-commands mh-exec-cmd-quiet "rmf" "folder" "-create" "-fast" mh-index-new-folder "%s%s" 1 make-hash-table :test equal message "Executing %s... " "Processing %s output... " error gethash cl-puthash maphash #[(folder msgs) "\306\307\"@\310\311\312\313\n\"\210	\237)\314\"\315\316\n\317\320\f&\210\2031 \321\311\322\323\324\325\307\326\327\"&\210\n\311:\203V @T\330B#\210A\211\2027 ,\311\207" [folder #1=#:G2875 msgs cur index-folder #2=#:G2876 mh-translate-range "cur" sort nil maphash #[(msg #3=#:G2874) "	B\211\207" [msg #1#] 2] < mh-exec-cmd "refile" "-src" "-link" mh-exec-cmd-quiet "mark" "-add" "-zero" "-sequence" format "%s" cl-puthash msg result-count origin-map] 11] mh-visit-folder mh-update-sequences mh-recenter mh-speed-flists-active-p mh-speed-flists mh-index-write-data "%s found %s matches in %s folders" upcase-initials symbol-name #[(#4=#:G2862 msg-hash) "\302	!\\\211\207" [#5=#:G2863 msg-hash hash-table-count] 3] #[(#6=#:G2864 msg-hash) "\302!\303V\205\f 	T\211\207" [msg-hash #7=#:G2865 hash-table-count 0] 2] folder window-config mh-searching-function mh-previous-window-config mh-index-folder index-folder previous-search old-window-config result-count mh-user-path origin-map folder-results-map folder-path mh-indexer mh-index-execute-search-function next-result mh-index-next-result-function #8=#:--x--2866 #9=#:--h--2867 #10=#:--store--2869 x #11=#:--x--2870 #12=#:--h--2871 mh-current-folder #5# #7#] 8)] 2 (#$ . 10700) (list current-prefix-arg (progn (unless mh-find-path-run (mh-find-path)) (or (and current-prefix-arg mh-index-sequence-search-flag) (and current-prefix-arg (car mh-index-previous-search)) (mh-prompt-for-folder "Search" "+" nil "all" t))) (progn (unless (mh-index-choose) (error "No indexing program found")) (or (and current-prefix-arg (cadr mh-index-previous-search)) mh-index-regexp-builder (read-string (format "%s regexp: " (upcase-initials (symbol-name mh-indexer)))))) (if (and (not (and current-prefix-arg (cadr mh-index-previous-search))) mh-index-regexp-builder) (current-window-configuration) nil))])
#@27 Write index data to file.
(defalias 'mh-index-write-data #[nil "\300\301\302\217\207" [#1=#:G2881 (byte-code "\306=\204 \307\310\"\210	\n\fP\311\211\312\313\314!! \315\216rq\210\316\317\"\210\316\320\"\210\316\320\"\210\321p\"\210\322c\210\321p\"\210\322c)rq\210~\210\323ed \311\324%\210.\f\207" [major-mode mh-index-data mh-index-msg-checksum-map mh-index-checksum-origin-map mh-index-previous-search mh-index-sequence-search-flag mh-folder-mode error "Can't be called from folder in `%s'" nil get-buffer-create generate-new-buffer-name " *temp file*" ((byte-code "\301!\203\n \302!\210\301\207" [#2=#:temp-buffer buffer-name kill-buffer] 2)) mh-index-write-hashtable #[(x) "\302\303\304	\"\210\237)\207" [#3=#:G2883 x nil maphash #[(y #4=#:G2882) "	B\211\207" [y #3#] 2]] 3] identity pp "\n" write-region 0 buffer-file-name mh-index-data-file print-level print-length outfile sequence-search-flag previous-search checksum-origin-map msg-checksum-map data #2# #5=#:temp-file] 8) ((error))] 3 (#$ . 15703)])
#@28 Read index data from file.
(defalias 'mh-index-read-data #[nil "\300\301\302\217\207" [#1=#:G2884 (byte-code "\306=\204 \307\310\"\210	\nP\311\211\211\211\211\312\313\314!!\315\216rq\210\316!\210eb\210\317\320!\317\321!\317\321!\322p!\322p!+\f\211.\207" [major-mode buffer-file-name mh-index-data-file t5 t4 t3 mh-folder-mode error "Can't be called from folder in `%s'" nil get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#2=#:temp-buffer buffer-name kill-buffer] 2)) insert-file-contents-literally mh-index-read-hashtable #[(data) "\304\305\306\"	\307\n:\203 \n@\310\311#\210\nA\211\202\n +\207" [table data #3=#:G2885 x make-hash-table :test equal nil cl-puthash t] 5] identity read t2 t1 infile #2# mh-index-data mh-index-msg-checksum-map mh-index-checksum-origin-map mh-index-previous-search mh-index-sequence-search-flag] 6) ((error))] 3 (#$ . 16768)])
#@109 Write TABLE to `current-buffer'.
PROC is used to serialize the values corresponding to the hash table keys.
(defalias 'mh-index-write-hashtable #[(table proc) "\302\303\304\305	\"\210\237)p\"\210\306c\207" [#1=#:G2891 table pp nil maphash #[(x #2=#:G2890) "	\304\n\"!BB\211\207" [x proc table #1# gethash] 5] "\n"] 4 (#$ . 17736)])
#@103 From BUFFER read a hash table serialized as a list.
PROC is used to convert the value to actual data.
(defalias 'mh-index-read-hashtable #[(proc) "\306\307\310\"\311p!\312	:\203- 	@\211@\nA!\f\313\f\f#\210+	A\211\202\f +\207" [table #1=#:G2892 pair #2=#:--x--2893 #3=#:--h--2894 proc make-hash-table :test equal read nil cl-puthash #4=#:--store--2896] 5 (#$ . 18081)])
#@66 Non-nil means that this folder was generated by an index search.
(defalias 'mh-index-p #[nil "\207" [mh-index-data] 1 (#$ . 18469)])
#@58 Construct appropriate regexp and call `mh-index-search'.
(defalias 'mh-index-do-search #[nil "\305 \204	 \306\307!\210\310 	!\211\203 \311\312\n\f$\202  \306\313!*\207" [regexp-list mh-index-regexp-builder pattern mh-current-folder mh-previous-window-config mh-index-choose error "No indexing program found" mh-pick-parse-search-buffer mh-index-search nil "No search terms"] 6 (#$ . 18609) nil])
#@174 Construct parse tree for INPUT-STRING.
All occurrences of &, |, ! and ~ in INPUT-STRING are replaced by AND, OR and
NOT as appropriate. Then the resulting string is parsed.
(defalias 'mh-index-parse-search-regexp #[(input-string) "\306\307\310\311!!\312\216r	q\210\nc\210\313\314\315\"\210\313\316\317\"\210\313\320\317\"\210\313\321\317\"\210\313\322\323\"\210\313\324\323\"\210\313\325\323\"\210\313\326\327\"\210\313\330\327\"\210\313\331\327\"\210\313\332\327\"\210\313\333\334\"\210\313\335\334\"\210\313\336\337\"\210\313\340\337\"\210\341\342ed{\"+\343\344!!\306\211\211\211/\3060\2111\203U1@\2110\333\232\203\215 \345B\202L0\346\232\203\233 \347B\202L0\350\232\203\251 \351B\202L0\352\232\203\267 \353B\202L0\336\232\203\377 \354\f\"\2112@2A@)@\347=\203\341 A\347\f\211A@D\fB@\353=\203LA\f\211A@\353\f\211A@E\fB\202L@\347=\203.A\3470D\fB@\353=\203LA\f\211A@\353\f\211A@E\fB\202L@\353=\203GA\353\f\211A@0E\fB\202L0\fB1A\2111\204{ *\f\211A@\204c\f\203h\355\356\"\210-\207" [input #1=#:temp-buffer input-string oper1 operand-stack op-stack nil get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) mh-replace-string "	" " " " AND " " and " "&" " -and " " OR " " or " "|" " -or " " NOT " " not " "!" "~" " -not " "(" " ( " " -lbrace " ")" " ) " " -rbrace " format "( %s )" mh-index-add-implicit-ops split-string paren "not" not "or" or "and" and mh-index-evaluate error "Invalid regexp: %s" tokens token #2=#:--dolist-temp--2897 #3=#:G2898] 5 (#$ . 19017)])
#@44 Add implicit operators in the list TOKENS.
(defalias 'mh-index-add-implicit-ops #[(tokens) "\304\211\211\203N \211A@\211\305\232\204\" \306\232\204\" \307\232\203+ \304\nB\202 	\2039 \306\nB\211\2039 \304\nB\310\232\204 \311\232\204 \312\202 \n\237+\207" [current literal-seen result tokens nil ")" "and" "or" "(" "not" t] 4 (#$ . 20646)])
#@74 Read expression till starting paren based on OP-STACK and OPERAND-STACK.
(defalias 'mh-index-evaluate #[(op-stack operand-stack) "\300\301\215\207" [--cl-block-mh-index-evaluate-- (byte-code "\304\211\n\203R \n\211A@\211\305=\203 \306\307\310\n\"\"\210\202 	\311=\2032 \311\211A@DB\202 	\312=\204> 	\313=\203 \211A@	\211A@EB\202 \314\315!*\207" [oper1 op op-stack operand-stack nil paren throw --cl-block-mh-index-evaluate-- values not and or error "Ran out of tokens"] 6)] 2 (#$ . 21015)])
#@194 Jump to the next folder marker.
The function is only applicable to folders displaying index search results.
With non-nil optional argument BACKWARD-FLAG, jump to the previous group of
results.
(defalias 'mh-index-next-folder #[(&optional backward-flag) "\204 \303\304!\207`\n\203 \305\202 \306y\210\n\203! \307\310e\311#\202& \312\310d\311#\203. \313 \202V \n\2038 db\210\202; eb\210\n\203G \307\310e\311#\202L \312\310d\311#\203T \313 \202V 	b)\207" [mh-index-data point backward-flag message "Only applicable in an MH-E index search buffer" -1 1 re-search-backward "^+" t re-search-forward beginning-of-line] 4 (#$ . 21535) "P"])
#@37 Jump to the previous folder marker.
(defalias 'mh-index-previous-folder #[nil "\300\301!\207" [mh-index-next-folder t] 2 (#$ . 22178) nil])
#@25 Check if FOLDER exists.
(defalias 'mh-folder-exists-p #[(folder) "\302!\205! \212\303\304\305!!\306\216r	q\210\307\310\311\312\313%\210eb\210m,?\207" [folder #1=#:temp-buffer mh-folder-name-p get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) mh-exec-cmd-output "folder" nil "-fast" "-nocreate"] 6 (#$ . 22324)])
#@32 Check if MSG exists in FOLDER.
(defalias 'mh-msg-exists-p #[(msg folder) "\303\304\305	\306\307O\n$!\207" [mh-user-path folder msg file-exists-p format "%s%s/%s" 1 nil] 7 (#$ . 22728)])
#@401 Return a folder name based on NAME for search results of SEARCH-REGEXP.

If folder NAME already exists and was generated for the same SEARCH-REGEXP
then it is reused.

Otherwise if the folder NAME was generated from a different search then check
if NAME<2> can be used. Otherwise try NAME<3>. This is repeated till we find a
new folder name.

If the folder returned doesn't exist then it is created.
(defalias 'mh-index-new-folder #[(name search-regexp) "\306!\204\n \307\310!\210\311\312\313\312	\311\232\203 \202! \314\315	#\316\n!\2030 \317\n!\232\2038 \n\312\211\2029 \313\203C 	T\211\202 \f,\320!\203S \321!\210\212\322\312\323#\210)\322\312\324\325\326%\210\327!\210\330\331!\203u \332!\210)\207" [name i candidate #1=#:G2899 #2=#:G2900 search-regexp mh-folder-name-p error "The argument should be a valid MH folder name" 1 nil t format "%s<%s>" mh-folder-exists-p mh-index-folder-search-regexp get-buffer mh-process-or-undo-commands mh-exec-cmd-quiet "rmf" "folder" "-create" "-fast" mh-remove-from-sub-folders-cache boundp mh-speed-folder-map mh-speed-add-folder chosen-name] 6 (#$ . 22922)])
#@138 If FOLDER was created by a index search, return the search regexp.
Return nil if FOLDER doesn't exist or the .mhe_index file is garbled.
(defalias 'mh-index-folder-search-regexp #[(folder) "\300\301\302\217\207" [#1=#:G2901 (byte-code "\305\306\307!!\310\216rq\210\311\312\313	\n\314\315O$!\210eb\210\316\317!\210\320p!\211A@,\207" [#2=#:temp-buffer mh-user-path folder mh-index-data-file x get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#2# buffer-name kill-buffer] 2)) insert-file-contents format "%s%s/%s" 1 nil forward-list 3 read] 8) ((error))] 3 (#$ . 24060)])
#@57 Annotate the search results with original folder names.
(defalias 'mh-index-insert-folder-headers #[nil "\306\307!\310 \307\211\211eb\210m\204@ \311\211\306\307!\"\"@\211\203: 	\232\204: \2032 \312\2023 \313	\312\261\210	\307y\210\202 \f\203L \314 \210\315\f\316\"\210\317!\210-\320 \207" [last-folder current-folder buffer-read-only old-buffer-modified-flag cur-msg mh-index-msg-checksum-map mh-get-msg-num nil buffer-modified-p gethash "\n" "" mh-notate-cur mh-goto-msg t set-buffer-modified-p mh-index-create-imenu-index mh-index-checksum-origin-map] 6 (#$ . 24690)])
#@69 Create alist of folder names and positions in index folder buffers.
(defalias 'mh-index-create-imenu-index #[nil "\212\303\304eb\210\305\306\304\303#\203& \212\307 \210\310`\311 \"\312 `\304\223B	B)\202 	\237\211*\207" [which-func-mode alist imenu--index-alist t nil re-search-forward "^+" beginning-of-line buffer-substring-no-properties line-end-position make-marker] 4 (#$ . 25282)])
#@170 Partition the messages based on source folder.
Returns an alist with the the folder names in the car and the cdr being the
list of messages originally from that folder.
(defalias 'mh-index-group-by-folder #[nil "\212eb\210\303\304\305\"\306\307	\"\210\310\306\311\"\210\n\237+\207" [result-table mh-index-msg-checksum-map #1=#:G2904 make-hash-table :test equal maphash #[(msg #2=#:G2902) "\304\305\211	\"\n\"@\305\211\211	\"\n\"@\"B#\207" [msg mh-index-msg-checksum-map mh-index-checksum-origin-map result-table cl-puthash gethash] 8] nil #[(x #3=#:G2903) "\303	\"\237B\nB\211\207" [x result-table #1# gethash] 4]] 3 (#$ . 25681)])
#@28 Delete the folder headers.
(defalias 'mh-index-delete-folder-headers #[nil "\303\304!\305 \304\211\204 m\204 \304y\210\303\304!\211\203 eb\210m\204C \306\304f\307\"\2043 \306\304f\310\"\203= `\304y\210`|\210\202 \304y\210\202 \n\203M \311\n\312\211#\210\313	!+\207" [buffer-read-only old-buffer-modified-flag cur-msg mh-get-msg-num nil buffer-modified-p char-equal 43 10 mh-goto-msg t set-buffer-modified-p] 5 (#$ . 26330)])
#@66 Visit original folder from where the message at point was found.
(defalias 'mh-index-visit-folder #[nil "\204 \306\307!\210\310\211\212n\203! l\203! \311\312\313\217\210\314\315!\2027 \316 f\317\232\2033 \320\316 \321 \"\2027 \314\315!)\n\204E \322\211	\"\f\"@\323\n!\203T \324\325\326\n\"!\205d \327\n\310\330\331\322\n\"\"\210\237)\"*\207" [mh-index-data msg folder mh-index-msg-checksum-map mh-index-checksum-origin-map #1=#:G2911 error "Not in an index folder" nil #2=#:G2909 (forward-line -1) ((error)) mh-get-msg-num t line-beginning-position 43 buffer-substring-no-properties line-end-position gethash get-buffer y-or-n-p format "Reuse buffer displaying %s? " mh-visit-folder maphash #[(x #3=#:G2910) "\303	\"\205\f \nB\211\207" [x folder #1# mh-msg-exists-p] 3]] 7 (#$ . 26770) nil])
#@69 Check if MSG in FOLDER has X-MHE-Checksum header value of CHECKSUM.
(defalias 'mh-index-match-checksum #[(msg folder checksum) "\305\306\307!!\310\216rq\210\311	\312\313\314\315\316\n&\210eb\210\317`\320 \"\f\230+\207" [#1=#:temp-buffer mh-scan-prog folder msg checksum get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) mh-exec-cmd-output nil "-width" "80" "-format" "%{x-mhe-checksum}\n" buffer-substring-no-properties line-end-position] 9 (#$ . 27583)])
#@238 Return a table of original messages and folders for messages in MSGS.
If optional argument DELETE-FROM-INDEX-DATA is non-nil, then each of the
messages, whose counter-part is found in some source folder, is removed from
`mh-index-data'.
(defalias 'mh-index-matching-source-msgs #[(msgs &optional delete-from-index-data) "\306\307\310\"	\311\211\203c @\312\n\f\"\312\"\203[ @\203[ A\203[ \313A@#\203[ \314@A\312@\"B#\210\203[ \315A\312@\"\"\210*A\211\204 *)\207" [table msgs msg #1=#:--dolist-temp--2912 mh-index-msg-checksum-map checksum make-hash-table :test equal nil gethash mh-index-match-checksum cl-puthash remhash mh-index-checksum-origin-map pair delete-from-index-data mh-index-data] 7 (#$ . 28133)])
#@265 Delete/refile the actual messages.
The copies in the searched folder are then deleted/refiled to get the desired
result. Before deleting the messages we make sure that the message being
deleted is identical to the one that the user has marked in the index buffer.
(defalias 'mh-index-execute-commands #[nil "\212\306\307\310\311\312\313\n\306\306:\203% @\314\fA!\244A\211\202 \237+\"\307\"\"\210	+\207" [mh-speed-flists-inhibit-flag folders mh-refile-list #1=#:G2917 x #2=#:G2918 nil t maphash #[(folder msgs) "	B\306!\204 \307\310\311\312\n!$\207\212q\210\f\313\n\314\216\315 ,\207" [folder folders msgs mh-refile-list mh-delete-list old-delete-list get-buffer apply mh-exec-cmd "rmm" mh-coalesce-msg-list nil ((byte-code "\306\307\"\n\310\310:\203% @\211\f>\204 \fBA\211\202\f \237+\311\312 !\210\312 \2037 \313 \210\310\207" [old-refile-list mh-refile-list old-delete-list #3=#:G2919 x #4=#:G2920 mapcar #[(x) "@A\305\305	:\203\" 	@\211\f>\204 \nB	A\211\202\n \237+B\207" [x #5=#:G2921 y #6=#:G2922 msgs nil] 4] nil mh-set-folder-modified-p mh-outstanding-commands-p mh-notate-deleted-and-refiled msgs mh-delete-list] 3)) mh-execute-commands old-refile-list] 6] mh-index-matching-source-msgs append reverse mh-delete-list] 7 (#$ . 28891)])
#@171 Add to SEQ the messages in the list MSGS.
This function updates the source folder sequences. Also makes an attempt to
update the source folder buffer if we have it open.
(defalias 'mh-index-add-to-sequence #[(seq msgs) "\212\304 >?\205 \305!\205 \306\307\310\311\312!\"\210\n*)\207" [seq mh-speed-flists-inhibit-flag folders msgs mh-unpropagated-sequences mh-valid-seq-p nil t maphash #[(folder msgs) "	B\304\305\306\307\310\311\312\313\n!\314\315\316!\"&	\210\317!\205' \212q\210\320\n\")\207" [folder folders seq msgs apply mh-exec-cmd-quiet nil "mark" "-add" "-nozero" "-sequence" symbol-name mapcar #[(x) "\301\302\"\207" [x format "%s"] 3] mh-coalesce-msg-list get-buffer mh-put-msg-in-seq] 13] mh-index-matching-source-msgs] 4 (#$ . 30197)])
#@159 Delete from SEQ the messages in MSGS.
This function updates the source folder sequences. Also makes an attempt to
update the source folder buffer if present.
(defalias 'mh-index-delete-from-sequence #[(seq msgs) "\212\304 >?\205 \305!\205 \306\307\310\311\312!\"\210\n*)\207" [seq mh-speed-flists-inhibit-flag folders msgs mh-unpropagated-sequences mh-valid-seq-p nil t maphash #[(folder msgs) "	B\304\305\306\307\310\311\312\313\n!\314\315\316!\"&	\210\317!\205( \212q\210\320\n\321#)\207" [folder folders seq msgs apply mh-exec-cmd-quiet nil "mark" "-del" "-nozero" "-sequence" symbol-name mapcar #[(x) "\301\302\"\207" [x format "%s"] 3] mh-coalesce-msg-list get-buffer mh-delete-msg-from-seq t] 13] mh-index-matching-source-msgs] 4 (#$ . 30967)])
(byte-code "\302B\301B\303\301!\204 \304\302\207" [current-load-list mh-pick-binary mh-index-pick-folder boundp "pick"] 2)
#@292 Execute pick.

Unlike the other index search programs "pick" only searches messages present
in the folder itself and does not descend into any sub-folders that may be
present.

FOLDER-PATH is the directory containing the mails to be searched and
SEARCH-REGEXP is the pattern that pick gets.
(defalias 'mh-pick-execute-search #[(folder-path search-regexp) "\306!q\210\307 \210\310	\nG\311OP\312\313\314\315\f\"\311\316\311\317&\210eb\207" [mh-index-temp-buffer folder-path mh-user-path mh-index-pick-folder mh-progs search-regexp get-buffer-create erase-buffer "+" nil apply call-process expand-file-name "pick" (t nil) "-list"] 9 (#$ . 31869)])
#@37 Return the next pick search result.
(defalias 'mh-pick-next-result #[nil "\300\301\215\302y\210\207" [--cl-block-nil-- (byte-code "m\203	 \301\302\303\"\210\304\305\306 \307#\204 \301\302\310\"\210\311\312\313 \306 \"!@\303E\207" [mh-index-pick-folder throw --cl-block-nil-- nil re-search-forward "^[1-9][0-9]*$" line-end-position t error read-from-string buffer-substring-no-properties line-beginning-position] 5) nil] 2 (#$ . 32525)])
(byte-code "\301B\302\301!\204 \303\304!\301\207" [current-load-list mh-grep-binary boundp executable-find "grep"] 2)
#@107 Execute grep and read the results.
FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search.
(defalias 'mh-grep-execute-search #[(folder-path search-regexp) "\304!q\210\305 \210\306	\307\310\307\311\312\n&\210eb\207" [mh-index-temp-buffer mh-grep-binary search-regexp folder-path get-buffer-create erase-buffer call-process nil (t nil) "-i" "-r"] 9 (#$ . 33093)])
#@182 Read the next result.
Parse it and return the message folder, message index and the match. If no
other matches left then return nil. If the current record is invalid return
'error.
(defalias 'mh-grep-next-result #[nil "\300\301\215\302y\210\207" [--cl-block-nil-- (byte-code "m\203	 \306\307\310\"\210\311 \312 \310\211\nb\210\313\f\314#\204# \306\307\315\"\210`\313\316\314#\2042 \306\307\315\"\210\317`\"\320u\210`\321\322	\314#\204I \306\307\315\"\210\323\324\317	`\"\"\325\326\327\217\211:\203h @\250\203h @\202l \306\307\315\")E-\207" [msg-end folder-start bol-pos eol-pos mh-user-path match throw --cl-block-nil-- nil line-end-position line-beginning-position search-forward t error ":" buffer-substring-no-properties -1 search-backward "/" format "+%s" #1=#:G2923 (byte-code "\301\302`T\"!\207" [msg-end read-from-string buffer-substring-no-properties] 4) ((error)) val] 6) nil] 2 (#$ . 33480)])
(byte-code "\301B\304\301!\204 \305\306!\302B\304\302!\204 \307\303B\304\303!\204& \310\310\207" [current-load-list mh-mairix-binary mh-mairix-directory mh-mairix-folder boundp executable-find "mairix" ".mairix" nil] 2)
#@789 Execute mairix and read the results.

In the examples below replace /home/user/Mail with the path to your MH
directory.

First create the directory /home/user/Mail/.mairix. Then create the file
/home/user/Mail/.mairix/config with the following contents:

   # This should contain the same thing as your `mh-user-path'
   base=/home/user/Mail

   # List of folders that should be indexed. 3 dots at the end means there are
   # subfolders within the folder
   mh_folders=archive...:inbox:drafts:news:sent:trash

   vfolder_format=raw
   database=/home/user/Mail/mairix/database

Use the following command line to generate the mairix index. Run this daily
from cron:

    mairix -f /home/user/Mail/.mairix/config

FOLDER-PATH is the directory in which SEARCH-REGEXP-LIST is used to search.
(defalias 'mh-mairix-execute-search #[(folder-path search-regexp-list) "\306!q\210\307 \210	\204 \310\311!\210\312\313	\314\315\314\316\317\320\n#\f&\210eb\210\211GS\314O\211\321\232\2035 \2029 \317\322\")\211\207" [mh-index-temp-buffer mh-mairix-binary mh-user-path mh-mairix-directory search-regexp-list folder-path get-buffer-create erase-buffer error "Set mh-mairix-binary appropriately" apply call-process nil (t nil) "-f" format "%s%s/config" "/" "%s/" last-char mh-mairix-folder] 12 (#$ . 34639)])
#@40 Return next result from mairix output.
(defalias 'mh-mairix-next-result #[nil "\300\301\215\302y\210\207" [--cl-block-nil-- (byte-code "m\204\f n\203 l\203 \305\306\307\"\210\307f\310=\204 \305\306\311\"\210`\307\211\312 \313	\314#\2043 \305\306\311\"\210\315\224b\210`\n\232\204B \305\306\311\"\210	b\210\316\317\n\314#\204R \305\306\311\"\210`T\nb\210\313\f	\314#\204e \305\306\311\"\210\320\321\322`S\"\"\323\322	\"!@\307E+\207" [msg-start end start mh-mairix-folder mh-user-path throw --cl-block-nil-- nil 47 error line-end-position search-forward t 0 search-backward "/" format "+%s" buffer-substring-no-properties read-from-string] 5) nil] 2 (#$ . 35949)])
#@74 Generate query for mairix.
REGEXP-LIST is an alist of fields and values.
(defalias 'mh-mairix-regexp-builder #[(regexp-list) "\306	\306\211\203\311 @\211A\203\302 \n@\307=\203 \310\202J \n@\311=\203( \312\202J \n@\313=\2033 \314\202J \n@\315=\203> \316\202J \n@\317=\203I \320\202J \321\322\nA!A\321\211\306\211\203\270 @\211A\321\211\306\211\203\244 @\323:\204\204 \321\202\205 \324:\204\220 \202\230 \211A@)RA\211\204r *\f\325\326\306OQ*A\211\204\\ *\f\326\306O*PBA\211\204\n *)\207" [result regexp-list pair #1=#:--dolist-temp--2924 final sop nil to "t:" from "f:" cc "c:" subject "s:" date "d:" "" mh-mairix-convert-to-sop* "+" "~" "," 1 conjunct #2=#:--dolist-temp--2925 expr-string expr-list e #3=#:--dolist-temp--2926 x] 8 (#$ . 36629)])
#@38 Convert EXPR to sum of product form.
(defalias 'mh-mairix-convert-to-sop* #[(expr) ":\204 \306\307DD\207@\306=\2038 \306\310\311A\"\312\312	:\2033 	@\313\nA!\244	A\211\202 \237+B\207@\307=\203\260 \310\311A\"\312\211\211\211A@\203\255 \211A@\312A\312\211\203\243 @\fA\312\211\203\231 @\307\314AA\"BBA\211\204| *A\211\204l *\306)B\202Q +\207\211A@):\204\301 \306\307DD\207\211A@)@\315=\203\332 \311\211A@)A@!\207\211A@)@\307=\203\367 \311\306\310\316\211A@)A\"B!\207\211A@)@\306=\203\311\307\310\317\211A@)A\"B!\207\320\321\"\207" [expr #1=#:G2927 e #2=#:G2928 next-factor result or and mapcar mh-mairix-convert-to-sop* nil reverse append not #[(x) "\301D\207" [x not] 2] #[(x) "\301D\207" [x not] 2] error "Unreachable: %s" conjuncts res t1 #3=#:--dolist-temp--2929 t2 #4=#:--dolist-temp--2930 x] 7 (#$ . 37438)])
(byte-code "\301B\301\207" [current-load-list mh-flists-search-folders] 2)
#@27 Quote STRING for /bin/sh.
(defalias 'mh-index-quote-for-shell #[(string) "\305\306\307\310\nT\211	GW\203+ 	\nH\f\311\312>\203# \313\202$ \314\"P\202	 \f,\305Q\207" [string #1=#:G2931 #2=#:G2932 x #3=#:G2933 "\"" -1 nil "" format (92 96 36) "\\%c" "%c"] 5 (#$ . 38431)])
#@240 Execute flists.
Search for messages belonging to `mh-flists-sequence' in the folders
specified by `mh-flists-search-folders'. If `mh-recursive-folders-flag' is t,
then the folders are searched recursively. All parameters ARGS are ignored.
(defalias 'mh-flists-execute #[(&rest args) "\306!q\210\307 \210\310\311!\204 \312\313!\210\306\314\315!!\316\216r	q\210\317\n!\320\321\322\f\"\323\324=\2035 \325!!\202o \326=\203? \327\202o <\205o \"\326#\327$\":\203l \"@#$\323\325#!PP$\"A\211\"\202O $+%\203x \330\202y \327\331\332\321\333\f\"\334\335\336\261\210)\337ed\311\326\340!%+\207" [mh-index-temp-buffer #1=#:temp-buffer mh-flists-sequence seq mh-progs mh-flists-search-folders get-buffer-create erase-buffer executable-find "sh" error "Didn't find sh" generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) symbol-name "for folder in `" expand-file-name "flists" " " t mh-index-quote-for-shell nil "" " -recurse" " -sequence " " -noshowzero -fast` ; do\n" "mhpath" " \"+$folder\" " "\n" "done\n" call-process-region get-buffer mh-inbox #2=#:G2935 folder #3=#:G2936 mh-recursive-folders-flag] 13 (#$ . 38718)])
#@248 Display messages from FOLDERS in SEQUENCE.
All messages in the sequence you provide from the folders in
`mh-index-new-messages-folders' are listed. With a prefix argument, enter a
space-separated list of folders, or nothing to search all folders.
(defalias 'mh-index-sequenced-messages #[(folders sequence) "\204 	\n\306\307\310\311\312\313\314$\211 \232\2032 !\2024 \315 \"\312#\312\316\317!!\203T q\210\nD$\306#\202b \320!\203b \321\312\322#\210\323#\324\"$\306%\nD$\325 \210;\205\202 \326!.\f\207" [sequence mh-unseen-seq folders mh-flists-search-folders mh-flists-sequence mh-flists-called-flag t flists mh-flists-execute mh-mairix-next-result nil format "%s/%s/%s" current-window-configuration buffer-live-p get-buffer mh-folder-exists-p mh-exec-cmd-quiet "rmf" mh-index-search "+" mh-index-write-data message mh-indexer mh-index-execute-search-function mh-index-next-result-function mh-user-path mh-mairix-folder mh-index-regexp-builder mh-index-folder mh-flists-results-folder new-folder mh-current-folder mh-previous-window-config window-config redo-flag mh-index-previous-search mh-index-sequence-search-flag] 6 (#$ . 39922) (list (if current-prefix-arg (split-string (read-string "Search folder(s): [all] ")) mh-index-new-messages-folders) (mh-read-seq-default "Search" nil))])
#@385 Display unseen messages.
If you use a program such as `procmail' to use `rcvstore' to file your
incoming mail automatically, you can display new, unseen, messages using this
command. All messages in the `unseen' sequence from the folders in
`mh-index-new-messages-folders' are listed. With a prefix argument, enter a
space-separated list of FOLDERS, or nothing to search all folders.
(defalias 'mh-index-new-messages #[(folders) "\302	\"\207" [folders mh-unseen-seq mh-index-sequenced-messages] 3 (#$ . 41273) (list (if current-prefix-arg (split-string (read-string "Search folder(s): [all] ")) mh-index-new-messages-folders))])
#@222 Display ticked messages.
All messages in `mh-tick-seq' from the folders in
`mh-index-ticked-messages-folders' are listed. With a prefix argument, enter a
space-separated list of FOLDERS, or nothing to search all folders.
(defalias 'mh-index-ticked-messages #[(folders) "\302	\"\207" [folders mh-tick-seq mh-index-sequenced-messages] 3 (#$ . 41910) (list (if current-prefix-arg (split-string (read-string "Search folder(s): [all] ")) mh-index-ticked-messages-folders))])
(byte-code "\301B\304\301!\204 \305\306!\302B\304\302!\204 \307\303B\304\303!\204& \310\310\207" [current-load-list mh-swish-binary mh-swish-directory mh-swish-folder boundp executable-find "swish-e" ".swish" nil] 2)
#@1688 Execute swish-e and read the results.

In the examples below, replace /home/user/Mail with the path to your MH
directory.

First create the directory /home/user/Mail/.swish. Then create the file
/home/user/Mail/.swish/config with the following contents:

    IndexDir /home/user/Mail
    IndexFile /home/user/Mail/.swish/index
    IndexName "Mail Index"
    IndexDescription "Mail Index"
    IndexPointer "http://nowhere"
    IndexAdmin "nobody"
    #MetaNames automatic
    IndexReport 3
    FollowSymLinks no
    UseStemming no
    IgnoreTotalWordCountWhenRanking yes
    WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-
    BeginCharacters abcdefghijklmnopqrstuvwxyz
    EndCharacters abcdefghijklmnopqrstuvwxyz0123456789
    IgnoreLimit 50 1000
    IndexComments 0
    FileRules pathname contains /home/user/Mail/.swish
    FileRules pathname contains /home/user/Mail/mhe-index
    FileRules filename is index
    FileRules filename is \..*
    FileRules filename is #.*
    FileRules filename is ,.*
    FileRules filename is .*~

If there are any directories you would like to ignore, append lines like the
following to config:

    FileRules pathname contains /home/user/Mail/scripts

You do not want to index the folders that hold the results of your searches
since they tend to be ephemeral and the original messages are indexed anyway.
The configuration file above assumes that the results are found in sub-folders
of `mh-index-folder' which is +mhe-index by default.

Use the following command line to generate the swish index. Run this
daily from cron:

    swish-e -c /home/user/Mail/.swish/config

FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search.
(defalias 'mh-swish-execute-search #[(folder-path search-regexp) "\306!q\210\307 \210	\204 \310\311!\210\312	\313\314\313\315\n\316\317\320\f#&\210eb\210\211GS\313O\211\321\232\2035 \2029 \317\322\")\211\207" [mh-index-temp-buffer mh-swish-binary search-regexp mh-user-path mh-swish-directory folder-path get-buffer-create erase-buffer error "Set mh-swish-binary appropriately" call-process nil (t nil) "-w" "-f" format "%s%s/index" "/" "%s/" last-char mh-swish-folder] 13 (#$ . 42617)])
#@40 Get the next result from swish output.
(defalias 'mh-swish-next-result #[nil "\300\301\215\302y\210\207" [--cl-block-nil-- (byte-code "m\204 `f\306\232\203 \307\310\311\"\210`f\312\232\203 \307\310\313\"\210\314\315\316 \317#\314\315\316 \317#\2032 	\2047 \307\310\313\"\210	S\320\321	\"!\204H \307\310\313\"\210\322\323\317#\204U \307\310\313\"\210\321`T\"\324\n\"\204g \307\310\313\"\210\324\f\n\"\203{ \325\326\n\327\225\nGSO\"\202 \307\310\313\")\321`T	\"\330\331\332\217\211:\203\233 @\247\203\233 @\202\237 \307\310\313\"*\311E*\207" [start end s mh-swish-folder mh-user-path val 46 throw --cl-block-nil-- nil 35 error search-forward " " line-end-position t file-exists-p buffer-substring-no-properties search-backward "/" string-match format "+%s" 0 #1=#:G2938 (read-from-string s) ((error))] 6) nil] 2 (#$ . 44809)])
(byte-code "\301B\303\301!\204 \304\305!\206 \304\306!\302B\303\302!\204  \307\301\207" [current-load-list mh-swish++-binary mh-swish++-directory boundp executable-find "search++" "search" ".swish++"] 2)
#@1307 Execute swish++ and read the results.

In the examples below, replace /home/user/Mail with the path to your MH
directory.

First create the directory /home/user/Mail/.swish++. Then create the file
/home/user/Mail/.swish++/swish++.conf with the following contents:

    IncludeMeta         Bcc Cc Comments Content-Description From Keywords
    IncludeMeta         Newsgroups Resent-To Subject To
    IncludeMeta         Message-Id References In-Reply-To
    IncludeFile         Mail    *
    IndexFile           /home/user/Mail/.swish++/swish++.index

Use the following command line to generate the swish index. Run this
daily from cron:

 find /home/user/Mail -path /home/user/Mail/mhe-index -prune \
                   -o -path /home/user/Mail/.swish++ -prune \
                   -o -name "[0-9]*" -print \
    | index -c /home/user/Mail/.swish++/swish++.conf /home/user/Mail

You do not want to index the folders that hold the results of your searches
since they tend to be ephemeral and the original messages are indexed anyway.
The command above assumes that the results are found in sub-folders of
`mh-index-folder' which is +mhe-index by default.

On some systems (Debian GNU/Linux, for example), use index++ instead of index.

FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search.
(defalias 'mh-swish++-execute-search #[(folder-path search-regexp) "\306!q\210\307 \210	\204 \310\311!\210\312	\313\314\313\315\316\317\320\n#\f&\210eb\210\211GS\313O\211\321\232\2035 \2029 \317\322\")\211\207" [mh-index-temp-buffer mh-swish++-binary mh-user-path mh-swish++-directory search-regexp folder-path get-buffer-create erase-buffer error "Set mh-swish++-binary appropriately" call-process nil (t nil) "-m" "10000" format "-i%s%s/swish++.index" "/" "%s/" last-char mh-swish-folder] 12 (#$ . 45871)])
(defalias 'mh-swish++-next-result 'mh-swish-next-result)
#@75 Generate query for swish++.
REGEXP-LIST is an alist of fields and values.
(defalias 'mh-swish++-regexp-builder #[(regexp-list) "\304	\305\211\203M @\211A\203F \306\n@\203 \307\202 \304\n@\203* \310\n@!\202+ \304\n@\2034 \311\2025 \304\312\nA!\n@\203B \313\202C \304\260A\211\204\n *\314\305O)\207" [regexp regexp-list elem #1=#:--dolist-temp--2939 "" nil " and " "(" symbol-name " = " mh-swish++-print-regexp ")" 4] 8 (#$ . 47760)])
#@48 Return infix expression corresponding to EXPR.
(defalias 'mh-swish++-print-regexp #[(expr) ":\204\n \302\303\"\207@\304=\203 \302\305\306\211A@)!\"\207\302\307\306\211A@)!\310@!\306\211AA)@!$\207" [expr x format "%s" not "(not %s)" mh-swish++-print-regexp "(%s %s %s)" symbol-name] 7 (#$ . 48212)])
(byte-code "\301B\304\301!\204 \305\306!\302B\304\302!\204 \307\303B\304\303!\204& \310\310\207" [current-load-list mh-namazu-binary mh-namazu-directory mh-namazu-folder boundp executable-find "namazu" ".namazu" nil] 2)
#@1120 Execute namazu and read the results.

In the examples below, replace /home/user/Mail with the path to your MH
directory.

First create the directory /home/user/Mail/.namazu. Then create the file
/home/user/Mail/.namazu/mknmzrc with the following contents:

    package conf;  # Don't remove this line!
    $ADDRESS = 'user@localhost';
    $ALLOW_FILE = "[0-9]*";
    $EXCLUDE_PATH = "^/home/user/Mail/(mhe-index|spam)";

In the above example configuration, none of the mail files contained in the
directories /home/user/Mail/mhe-index and /home/user/Mail/spam are indexed.

You do not want to index the folders that hold the results of your searches
since they tend to be ephemeral and the original messages are indexed anyway.
The configuration file above assumes that the results are found in sub-folders
of `mh-index-folder' which is +mhe-index by default.

Use the following command line to generate the namazu index. Run this
daily from cron:

   mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \
         /home/user/Mail

FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search.
(defalias 'mh-namazu-execute-search #[(folder-path search-regexp) "\306\307	#\310\n!\204 \311\312\n\"\210\313!\204 \311\314!\210\315\f!q\210\316 \210\317\320\321\320\322\n&\210eb\210\211GS\320O\211\323\232\203E \202J \306\324\")\211)\207" [mh-user-path mh-namazu-directory namazu-index-directory mh-namazu-binary mh-index-temp-buffer search-regexp format "%s%s" file-exists-p error "Namazu directory %s not present" executable-find "Set mh-namazu-binary appropriately" get-buffer-create erase-buffer call-process nil (t nil) "-alR" "/" "%s/" folder-path last mh-namazu-folder] 9 (#$ . 48761)])
#@41 Get the next result from namazu output.
(defalias 'mh-namazu-next-result #[nil "\300\301\215\302y\210\207" [--cl-block-nil-- (byte-code "m\203	 \306\307\310\"\210\311`\312 \"\313	\"\314\232\204 \306\307\315\"\210\316!\204( \306\307\315\"\210\313\n\"\210\314\225\310O\317\320\"\211\204A \306\307\315\"\210\321\322\314\fO\"\323\324\325\217\211:\203] @\247\203] @\202a \306\307\315\")\310E+\207" [file-name mh-namazu-folder mh-user-path folder/msg mark n throw --cl-block-nil-- nil buffer-substring-no-properties line-end-position string-match 0 error file-exists-p mh-search-from-end 47 format "+%s" #1=#:G2940 (byte-code "\302	T\303O!\207" [folder/msg mark read-from-string nil] 4) ((error))] 6) nil] 2 (#$ . 50498)])
#@259 Choose an indexing function.
The side-effects of this function are that the variables `mh-indexer',
`mh-index-execute-search-function', and `mh-index-next-result-function' are
set according to the first indexer in `mh-indexer-choices' present on the
system.
(defalias 'mh-index-choose #[nil "\300\301\215\207" [--cl-block-nil-- (byte-code "\203\f \306	\"C\202 \n\203 \306\n	\"C\202 	\203L \211A@\211\211A@)J\211\203H \f@\307\f8\310\f8\311\f8\312\313\n\"\210*\202 )\314\207" [mh-index-program mh-indexer-choices mh-indexer program-alist current x assoc 2 3 4 throw --cl-block-nil-- nil executable mh-index-execute-search-function mh-index-next-result-function mh-index-regexp-builder] 4)] 2 (#$ . 51236)])
(provide 'mh-index)
