+ /*
+ * So, what's happening here?
+ *
+ * - Re-read the folder and sequences, but with locking.
+ * - Recreate the original set of selected messages from the command line
+ * - Set the previous sequence
+ * - Remove any messages that did NOT result in hits from the selection
+ * - Add to any new sequences
+ */
+
+ if (!(mp2 = folder_read (folder, 1)))
+ adios (NULL, "unable to reread folder %s", folder);
+
+ for (msgnum = 0; msgnum < msgs.size; msgnum++)
+ if (!m_convert (mp2, msgs.msgs[msgnum]))
+ done (1);
+ seq_setprev (mp2); /* set the previous-sequence */
+
+ /*
+ * Nums contains a list of messages that we did NOT match. Remove
+ * that from the selection.
+ */
+
+ for (msgnum = 0; msgnum < nums.size; msgnum++) {
+ unset_selected(mp2, nums.msgnums[msgnum]);
+ mp2->numsel--;
+ }