Function: mh-index-create-sequences
mh-index-create-sequences is an autoloaded and byte-compiled function
defined in mh-search.el.gz.
Signature
(mh-index-create-sequences)
Documentation
Mirror sequences present in source folders in index folder.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-search.el.gz
;;; Sequence Support
;;;###mh-autoload
(defun mh-index-create-sequences ()
"Mirror sequences present in source folders in index folder."
(let ((seq-hash (make-hash-table :test #'equal))
(seq-list ()))
(cl-loop for folder being the hash-keys of mh-index-data
do (setf (gethash folder seq-hash)
(mh-create-sequence-map
(mh-read-folder-sequences folder nil))))
(dolist (msg (mh-translate-range mh-current-folder "all"))
(let* ((checksum (gethash msg mh-index-msg-checksum-map))
(pair (gethash checksum mh-index-checksum-origin-map))
(ofolder (car pair))
(omsg (cdr pair)))
(cl-loop for seq in (ignore-errors
(gethash omsg (gethash ofolder seq-hash)))
do (if (assoc seq seq-list)
(push msg (cdr (assoc seq seq-list)))
(push (list seq msg) seq-list)))))
(cl-loop for seq in seq-list
do (apply #'mh-exec-cmd "mark" mh-current-folder
"-sequence" (symbol-name (car seq)) "-add"
(mapcar (lambda (x) (format "%s" x)) (cdr seq))))))