Update.
[elisp.git] / vm
diff --git a/vm b/vm
index 71e6629..f196896 100644 (file)
--- a/vm
+++ b/vm
 ;; Contact <francois@fleuret.org> for comments & bug reports             ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; A fast indexed / search in mbox
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; This is one of my own things, check my web page to get it
+
+(when (ff/load-or-alert "~/sources/gpl/mymail/mymail-vm.el")
+
+  (define-key vm-summary-mode-map "\\" 'mymail/vm-visit-folder)
+  (define-key global-map [S-f7] 'mymail/vm-visit-folder)
+  (setq mymail/default-search-request "today"
+        mymail/default-additional-search-requests "!s ^\\[SPAM\\],!s \\] STATUS,")
+  (add-to-list 'recentf-exclude "/tmp/mymail-vm-.*\.mbox")
+)
+
 (setq-default vm-summary-show-threads t)
 
 ;; (setq vm-preview-lines nil)
@@ -299,6 +313,7 @@ attachement from mail."
   (flyspell-mode)
   (auto-fill-mode)
   (mail-abbrevs-setup)
+  (yas/minor-mode)
 
   ;; (setq fill-paragraph-function 'mail-mode-fill-paragraph)
 
@@ -653,3 +668,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)
+    )
+  )