+ "Read a comma-separated list of search requests for mymail,
+create a temporary mbox with the resulting mails, and open it in
+vm with `vm-visit-folder'.
+
+If the request string is empty, use
+`mymail/default-search-request' instead.
+
+The string `mymail/default-additional-search-requests' is automatically
+concatenated to the provided request, except if the request is
+prefaced with `\\'."
+ (interactive
+ (list (read-string "mymail-vm: " nil 'mymail-vm-history)))
+
+ (if (string= param "")
+ (if mymail/default-search-request
+ (setq param mymail/default-search-request)
+ (error "mymail error: empty search")))
+
+ (let ((n 1)
+ (mbox-name nil)
+
+ (search-args
+ (apply 'nconc
+ (mapcar
+ (lambda (searche-request)
+ (if (not (string= searche-request ""))
+ (list "--search" searche-request)))
+ (if (string= (substring param 0 1) "\\")
+ (split-string (substring param 1 nil) ",")
+ (split-string (concat param ","
+ mymail/default-additional-search-requests) ","))
+ )))
+ )
+
+ (while (get-file-buffer (setq mbox-name (format "/tmp/mymail-vm-%d.mbox" n)))
+ (setq n (+ n 1)))
+
+ ;; (message (prin1-to-string
+ ;; (nconc (list "mymail"
+ ;; "--output" mbox-name
+ ;; "--default-search" "p"
+ ;; "--nb-mails-max" "500")
+ ;; search-args))
+ ;; )