X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=elisp.git;a=blobdiff_plain;f=vm;h=a4f2b8026dece06e1c45360e67a9b9e4c1f4d7b7;hp=57aea1fc6e3e148440182648fbd8397291c5485c;hb=1248af28f215e77a7b7ffdec23bd01f73b336edf;hpb=18d001ce49a30194017396018d50a341286ea180 diff --git a/vm b/vm index 57aea1f..a4f2b80 100644 --- a/vm +++ b/vm @@ -327,36 +327,32 @@ attachement from mail." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Activate the required modes and authorize the commenting +(defun ff/does-not-fill (&optional a b) (interactive) (message "Nope")) + (defun ff/prepare-mail-mode () (bbdb-define-all-aliases) (flyspell-mode) - (auto-fill-mode) (mail-abbrevs-setup) (yas/minor-mode) - ;; (setq fill-paragraph-function 'mail-mode-fill-paragraph) + ;; Let's try the visual-line mode for mails - ;; Since I set the comment prefix, I have to tell the filling - ;; functions not to use it + (auto-fill-mode) + ;; (setq fill-paragraph-function 'ff/does-not-fill) + ;; (visual-line-mode) - ;; ******************* removed Aug 23 - ;; (setq fill-paragraph-handle-comment nil) - ;; ;; (when message-yank-prefix (set (make-local-variable 'comment-start) vm-included-text-prefix) - ;; (set (make-local-variable 'comment-start-skip) - ;; (concat "^\\(" (regexp-quote vm-included-text-prefix) "\\)")) - ;; ;; ) ) (add-hook 'mail-mode-hook 'ff/prepare-mail-mode) -;; (add-hook 'mail-mode-hook 'orgtbl-mode) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; To have a slightly darker background for headers (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")) ) @@ -593,6 +589,9 @@ an attachment") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; If we can, encrypt! +(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) @@ -718,9 +717,24 @@ 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)) - (vm-pipe-message-to-command (concat "munpack -C " dir)) + + (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) ) @@ -821,3 +835,21 @@ created." (message "No attachments to be saved!")))) (define-key vm-summary-mode-map [(control c) (control s)] 'ff/vm-mime-save-all-attachments) + +;; I do not like relief + +(ff/configure-faces + '( + + ;; (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) + (vm-attachment-button-mouse :background "#f0d0d0" :box nil) + (vm-attachment-button-pressed-face :background "#f0d0d0" :box nil) + (vm-mime-button :background "#f0d0d0" :box nil) + (vm-mime-button-mouse :background "#f0d0d0" :box nil) + (vm-mime-button-pressed-face :background "#f0d0d0" :box nil) + ))