(add-hook 'vm-mail-send-hook 'flyspell-mode-off)
;; Append so that it happens after the mime encoding
;; (add-hook 'vm-mail-send-hook 'ff/check-badly-encoded-address t)
+
;; Append this hook so that it runs after all other checks
(add-hook 'vm-mail-send-hook 'ff/dissociate-file-from-vm-mail-buffer t)
(add-hook 'vm-summary-mode-hook 'mc-install-read-mode)
(add-hook 'vm-virtual-mode-hook 'mc-install-read-mode)
(add-hook 'vm-mail-mode-hook 'mc-install-write-mode)
+(add-hook 'vm-presentation-mode-hook 'mc-install-read-mode)
;; (defun ff/encrypt-mail-if-possible () (interactive)
-;; (condition-case nil (mc-encrypt)
-;; (error nil)))
+ ;; (condition-case nil (mc-encrypt-message)
+ ;; (error nil)))
;; (add-hook 'vm-mail-send-hook 'ff/encrypt-mail-if-possible t)
(defun ff/goto-next-mail-field () (interactive)
(let ((field (save-excursion
(end-of-line)
- (re-search-backward (concat "\\(^[a-zA-Z\-]*: \\|^" mail-header-separator "$\\)") nil t)
+ (re-search-backward
+ (concat "\\(^[a-zA-Z\-]*: \\|^" mail-header-separator "$\\)") nil t)
(match-string 1))))
(cond ((string= field "To: ")
t)
(substitute-key-definition 'next-line 'mail-abbrev-next-line vm-mail-mode-map global-map)
+
(substitute-key-definition 'end-of-buffer 'mail-abbrev-end-of-buffer vm-mail-mode-map global-map)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(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)
+ )
+ )