projects
/
mymail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ca29e38
)
Pick the mbox name dynamically so that it is not currently used in another buffer.
author
Francois Fleuret
<francois@fleuret.org>
Fri, 1 Feb 2013 17:16:13 +0000
(18:16 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Fri, 1 Feb 2013 17:16:13 +0000
(18:16 +0100)
mymail-vm.el
patch
|
blob
|
history
diff --git
a/mymail-vm.el
b/mymail-vm.el
index
03b52cc
..
b65d732
100644
(file)
--- a/
mymail-vm.el
+++ b/
mymail-vm.el
@@
-19,10
+19,14
@@
(defun mymail/vm-visit-folder (param)
(interactive (list (read-string "mymail-vm search: " nil 'mymail-vm-history)))
(defun mymail/vm-visit-folder (param)
(interactive (list (read-string "mymail-vm search: " nil 'mymail-vm-history)))
- (let ((args (mapconcat (lambda (x) (concat "-s " "\"" x "\""))
+ (let ((n 1)
+ (mbox-name nil)
+ (args (mapconcat (lambda (x) (concat "-s " "\"" x "\""))
(split-string param ",")
" ")))
(split-string param ",")
" ")))
- (shell-command (concat "mymail " args " > /tmp/mymail.mbox"))
- )
- (vm-visit-folder "/tmp/mymail.mbox")
- )
+ (while (get-file-buffer (setq mbox-name (format "/tmp/mymail-vm-%d.mbox" n)))
+ (setq n (+ n 1)))
+
+ (shell-command (concat "mymail " args " > " mbox-name))
+ (vm-visit-folder mbox-name)
+ ))