From c71b0d1b6a3299e738d4c788cc1d8858bf6c0357 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Wed, 6 Feb 2013 21:09:39 +0100 Subject: [PATCH] Add a documentation string, and ignore the default search if it is prefaced with \. --- mymail-vm.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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) ",")) ))) ) -- 2.20.1