Function: mh-index-execute-commands
mh-index-execute-commands is an autoloaded and byte-compiled function
defined in mh-search.el.gz.
Signature
(mh-index-execute-commands)
Documentation
Perform the outstanding operations on the actual messages.
The copies in the searched folder are then deleted, refiled, blocklisted and allowlisted to get the desired result. Before processing the messages we make sure that the message is identical to the one that the user has marked in the index buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-search.el.gz
;;;###mh-autoload
(defun mh-index-execute-commands ()
"Perform the outstanding operations on the actual messages.
The copies in the searched folder are then deleted, refiled,
blocklisted and allowlisted to get the desired result. Before
processing the messages we make sure that the message is
identical to the one that the user has marked in the index
buffer."
(save-excursion
(let ((folders ())
(mh-speed-flists-inhibit-flag t))
(maphash
(lambda (folder msgs)
(push folder folders)
(if (not (get-buffer folder))
;; If source folder not open, just delete the messages...
(apply #'mh-exec-cmd "rmm" folder (mh-coalesce-msg-list msgs))
;; Otherwise delete the messages in the source buffer...
(with-current-buffer folder
(let ((old-refile-list mh-refile-list)
(old-delete-list mh-delete-list)
(old-blocklist mh-blocklist)
(old-allowlist mh-allowlist))
(setq mh-refile-list nil
mh-delete-list msgs
mh-blocklist nil
mh-allowlist nil)
(unwind-protect (mh-execute-commands)
(setq mh-refile-list
(mapcar (lambda (x)
(cons (car x)
(cl-loop for y in (cdr x)
unless (memq y msgs)
collect y)))
old-refile-list)
mh-delete-list
(cl-loop for x in old-delete-list
unless (memq x msgs) collect x)
mh-blocklist
(cl-loop for x in old-blocklist
unless (memq x msgs) collect x)
mh-allowlist
(cl-loop for x in old-allowlist
unless (memq x msgs) collect x))
(mh-set-folder-modified-p (mh-outstanding-commands-p))
(when (mh-outstanding-commands-p)
(mh-notate-deleted-and-refiled)))))))
(mh-index-matching-source-msgs (append (cl-loop for x in mh-refile-list
append (cdr x))
mh-delete-list
mh-blocklist
mh-allowlist)
t))
folders)))