From: Francois Fleuret Date: Wed, 6 Feb 2013 20:09:39 +0000 (+0100) Subject: Add a documentation string, and ignore the default search if it is prefaced with \. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=c71b0d1b6a3299e738d4c788cc1d8858bf6c0357;p=mymail.git Add a documentation string, and ignore the default search if it is prefaced with \. --- diff --git a/mymail-vm.el b/mymail-vm.el index db10a86..6e72e2e 100644 --- a/mymail-vm.el +++ b/mymail-vm.el @@ -23,6 +23,13 @@ :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))) @@ -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) ",")) ))) )