X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=mymail.git;a=blobdiff_plain;f=mymail-vm.el;h=c2b96ae0fa58bd87d334e6b9e1b58c84367be3de;hp=db10a86f2da1e1bb6f9dba26090fa9a3100acc43;hb=4daf9c65395d6f7f6368194d5bf32047db0eea8c;hpb=ed9a958f95d7436aa585bc57a5e4761e8120be02 diff --git a/mymail-vm.el b/mymail-vm.el index db10a86..c2b96ae 100644 --- a/mymail-vm.el +++ b/mymail-vm.el @@ -23,8 +23,15 @@ :type 'string) (defun mymail/vm-visit-folder (param) + "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'. + +The string `mymail/default-search-request' is automatically +concatenated to the provided request, except if the request is +prefaced with \\." (interactive - (list (read-string "mymail: " nil 'mymail-vm-history))) + (list (read-string "mymail-vm: " nil 'mymail-vm-history))) (let ((n 1) (mbox-name nil) @@ -36,7 +43,9 @@ (lambda (searche-request) (if (not (string= searche-request "")) (list "-s" searche-request))) - (split-string (concat param "," mymail/default-search-request) ",") + (if (string= (substring param 0 1) "\\") + (split-string (substring param 1 nil)) + (split-string (concat param "," mymail/default-search-request) ",")) ))) )