Update.
authorFrancois Fleuret <francois@fleuret.org>
Thu, 18 Jul 2013 06:26:13 +0000 (08:26 +0200)
committerFrancois Fleuret <francois@fleuret.org>
Thu, 18 Jul 2013 06:26:13 +0000 (08:26 +0200)
vm

diff --git a/vm b/vm
index 71e6629..d6521b2 100644 (file)
--- a/vm
+++ b/vm
@@ -653,3 +653,15 @@ instance, someone in bbdb named \"Paul Smith\" would generate an alias
     (bbdb-insinuate-vm)
     (ff/mail-aliases-from-bbdb))
   )
+
+(defun ff/pipe-to-tmp () (interactive)
+  (let ((link "/tmp/attach")
+        (dir (format-time-string "/tmp/attach-%Y%m%d-%H%M%S" (current-time))))
+    (mkdir dir)
+    (when (file-symlink-p link) (delete-file link))
+    (unless (file-exists-p link)
+      (make-symbolic-link dir "/tmp/attach" 1))
+    (vm-pipe-message-to-command (concat "munpack -C " dir))
+    (message "Wrote files to %s" dir)
+    )
+  )