X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=vm;h=7326c1b639d9685b1c123d8699b3ad48144e2247;hb=e61bde32719843a643f003ed0e85914495adc3ee;hp=6393b45d1ebba5ee762e32a7fd386b9408d04d82;hpb=c6ea2d2f094677c7ea15e40bd0ac35a3023d4e0c;p=elisp.git diff --git a/vm b/vm index 6393b45..7326c1b 100644 --- a/vm +++ b/vm @@ -351,7 +351,8 @@ attachement from mail." (ff/configure-faces ;; '((ff/mail-header-face :background "#c8c8ff")) - '((ff/mail-header-face :background "#f0f0f0")) + '((ff/mail-header-face :background "#eaf0ff")) + ;; '((ff/mail-header-face :background "#fff0a0")) ;; '((ff/mail-header-face :foreground "blue4")) ) @@ -517,7 +518,6 @@ an attachment") ) s)) - ;; You can not have a line starting with "From:" in a pure text ;; mail. The smtp server would add a leading character to prevent it. @@ -588,11 +588,14 @@ an attachment") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; If we can, encrypt! -(add-hook 'vm-mode-hook 'mc-install-read-mode) -(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) +;; (autoload 'mc-install-write-mode "mailcrypt" nil t) +;; (autoload 'mc-install-read-mode "mailcrypt" nil t) + +;; (add-hook 'vm-mode-hook 'mc-install-read-mode) +;; (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-message) @@ -660,12 +663,13 @@ an attachment") (ff/first-buffer-in-mode (cdr l) m)))) (defun ff/compose-mail (&optional force-new) - "Cycles through an existing buffers with major mode `mail-mode', + "Cycles through existing buffers with major mode `mail-mode', or invoke `vm-compose-mail' if none can be found or if FORCE-NEW is t." (interactive "P") (when (eq major-mode 'mail-mode) (bury-buffer)) (let ((buf (and (not force-new) + ;; (not (eq major-mode 'mail-mode)) (ff/first-buffer-in-mode (buffer-list) 'mail-mode)))) (if buf (switch-to-buffer buf) (vm-compose-mail)))) @@ -713,13 +717,26 @@ instance, someone in bbdb named \"Paul Smith\" would generate an alias (let ((link "/tmp/at") (dir (format-time-string "/tmp/at-%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 link 1)) + + (when (file-symlink-p (concat link "~~")) + (delete-file (concat link "~~"))) + + (when (and (file-symlink-p (concat link "~")) + (not (file-exists-p (concat link "~~")))) + (rename-file (concat link "~") (concat link "~~"))) + + (when (and (file-symlink-p link) + (not (file-exists-p (concat link "~")))) + (file-symlink-p link) (rename-file link (concat link "~"))) + + (unless (file-exists-p link) + (make-symbolic-link dir link 1)) + ;; (vm-pipe-message-to-command (concat "munpack -C " dir)) + (vm-pipe-message-to-command (concat "munpack -t -C " dir)) (message "Wrote files to %s" dir) ) - ) ) @@ -823,7 +840,9 @@ created." (ff/configure-faces '( - (vm-highlight-url :background "white" :foreground "#0000f0" :box nil) + ;; (vm-highlight-url :weight 'bold :foreground "#0000f0" :box nil) + (vm-highlight-url :underline nil :foreground "#0000f0" :box nil) + ;; (vm-highlight-url :background "white" :foreground "#0000f0" :box nil) (vm-highlighted-header :box nil) ;; :weight 'bold :background "white") (vm-attachment-button :background "#f0d0d0" :box nil)