X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=mymail.git;a=blobdiff_plain;f=mymail-vm.el;h=1f9329fca836995245179d1b1abfccf959fb0520;hp=5d31d6a8a546603c0b527a83f86affe8bee05ae5;hb=99c2641263ec72ae9721ef8eb667c5bb2cf03fc4;hpb=68ba7a639bbd352c067df464b3ff0ff35a2d9263 diff --git a/mymail-vm.el b/mymail-vm.el index 5d31d6a..1f9329f 100644 --- a/mymail-vm.el +++ b/mymail-vm.el @@ -21,10 +21,16 @@ ;; (add-to-list 'recentf-exclude "/tmp/mymail-vm-.*\.mbox") ;; ;; to your .emacs +;; +;; I also use +;; +;; (define-key vm-summary-mode-map "\\" 'mymail/vm-visit-folder) +;; +;; So that pressing "\" in the summary start a search with mymail (defgroup mymail () - "Command to visit a folder build on-the-fly with mymail" - :version "0.9.5") + "Command to visit a folder built on-the-fly with mymail" + :version "0.9.8") (defcustom mymail/default-additional-search-requests "" "Comma-separated list of search requests to add to any search" @@ -74,12 +80,21 @@ prefaced with \\." (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)) + ;; ) + (if (= (apply 'call-process - (nconc (list "mymail" nil nil nil + (nconc (list "mymail" nil '(nil "/tmp/mymail.err") nil "--output" mbox-name - "--default-search" "p") + "--default-search" "p" + "--nb-mails-max" "500") search-args)) 0) (vm-visit-folder mbox-name t) - (message "mymail failed")) + (message "mymail failed. See /tmp/mymail.err")) ))