X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=vm;h=f700c990792644f75b2799a7b5655705e19a8822;hb=db114167e8e2c85fe63ab00fb9472df35666b10b;hp=318213b6e4d30ac5cd582c61801818472c84decb;hpb=c828c0dd2ab8098b8a95ccb1c767e652e99ceca7;p=elisp.git diff --git a/vm b/vm index 318213b..f700c99 100644 --- a/vm +++ b/vm @@ -1,4 +1,4 @@ -;; -*-Emacs-Lisp-*- +;; -*- mode: Emacs-Lisp; mode: rainbow; -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This program is free software: you can redistribute it and/or modify ;; @@ -19,6 +19,21 @@ (setq-default vm-summary-show-threads t) +;; (setq vm-preview-lines nil) + +;; (setq vm-auto-displayed-mime-content-types '("text"));; "multipart"));; "image/xpm" + +(setq vm-mime-thumbnail-max-geometry nil) + +(setq vm-auto-displayed-mime-content-types '( + "text" + "image/jpeg" + "image/png" + "multipart" + "message/rfc822" + )) + + (setq vm-startup-message-displayed t ;; Yes, we already saw it, no need to insist vm-use-menus nil vm-skip-deleted-messages nil @@ -33,11 +48,15 @@ vm-confirm-new-folders t vm-mutable-windows t vm-mutable-frames nil - vm-summary-uninteresting-senders-arrow "->" + vm-summary-thread-indent-level 1 + ;; vm-summary-uninteresting-senders-arrow "->" + vm-summary-uninteresting-senders-arrow "►" + ;; vm-summary-uninteresting-senders-arrow "➔" + ;; vm-summary-uninteresting-senders-arrow "➤" vm-summary-arrow "> " vm-included-text-prefix " > " vm-forwarding-digest-type "mime" - vm-mime-attachment-save-directory "~/" + vm-mime-attachment-save-directory "~/misc/attachments" vm-use-toolbar nil vm-frame-per-folder nil vm-frame-per-summary nil @@ -77,6 +96,7 @@ ) +;; (add-to-list 'vm-visible-headers "From " t) ;; (add-to-list 'vm-visible-headers "Reply-To:" t) ;; (add-to-list 'vm-visible-headers "X-Mailer:" t) ;; (add-to-list 'vm-visible-headers "X-from-in-bbdb:" t) @@ -93,17 +113,17 @@ vm-infer-mime-types t vm-mime-use-image-strips nil - vm-mime-base64-decoder-program "mimencode" - vm-mime-base64-decoder-switches '("-u") - vm-mime-base64-encoder-program "mimencode" + vm-mime-base64-decoder-program "base64" + vm-mime-base64-decoder-switches '("-d") + vm-mime-base64-encoder-program "base64" vm-mime-base64-encoder-switches '() - vm-auto-displayed-mime-content-types '( - ;; "plain text" - "text" - "multipart" - "image/xpm" - ) + ;; vm-auto-displayed-mime-content-types '( + ;; ;; "plain text" + ;; "text" + ;; "multipart" + ;; "image/xpm" + ;; ) ;; vm-auto-displayed-mime-content-type-exceptions '("text/html") @@ -136,6 +156,7 @@ ;; (add-to-list 'vm-mime-default-face-charsets "utf-8") (add-to-list 'vm-mime-default-face-charsets "iso-8859-1") +;; (add-hook 'vm-mail-send-hook 'ff/vm-remove-non-7bits-in-headers) (add-hook 'vm-mail-send-hook 'vm-mime-encode-headers) (add-hook 'vm-mail-send-hook 'vm-mail-check-recipients) (add-hook 'vm-reply-hook (lambda () (set-buffer-modified-p nil))) @@ -150,9 +171,14 @@ ;; "w3m -cols 75 -graph -dump -T text/html" ;; )) +;; (add-to-list 'vm-mime-type-converter-alist + ;; '("text/html" "text/plain" + ;; "html2text -style pretty -nobs" + ;; )) + (add-to-list 'vm-mime-type-converter-alist '("text/html" "text/plain" - "html2text -nobs" + "html2text.sh" )) (add-to-list 'vm-mime-type-converter-alist @@ -171,15 +197,15 @@ ;; (add-hook 'vm-mail-send-hook 'ff/vm-remove-properties) -(defun ff/vm-mime-save-all-files (&optional delete) - "Save all the mail attachments. With delete argument, remove -the attachement from mail." - (interactive "P") - (let ((vm-mime-delete-after-saving delete)) - (while (and (vm-mime-reader-map-save-file) - (condition-case nil (vm-move-to-next-button 1) - (error nil))))) - ) +;; (defun ff/vm-mime-save-all-files (&optional delete) + ;; "Save all the mail attachments. With delete argument, remove +;; the attachement from mail." + ;; (interactive "P") + ;; (let ((vm-mime-delete-after-saving delete)) + ;; (while (and (vm-mime-reader-map-save-file) + ;; (condition-case nil (vm-move-to-next-button 1) + ;; (error nil))))) + ;; ) (defun ff/vm-mime-save-file (&optional delete) "Save the current attachement. With delete argument, remove the @@ -299,7 +325,7 @@ attachement from mail." ;; To have a slightly darker background for headers (ff/configure-faces - '((ff/mail-header-face :background "#d0d0e8")) + '((ff/mail-header-face :background "#c8c8ff")) ) (defun ff/colorize-headers () (interactive) @@ -313,8 +339,6 @@ attachement from mail." ;; (vm-matched-header-contents-end) (point-min) (point-at-bol) - ;; '(face (:background "gray85")) - ;; '(face (:background "gray50" :foreground "gray95")) '(face ff/mail-header-face) ) ))) @@ -348,7 +372,9 @@ attachement from mail." (set-visited-file-name (format "%s/mail-%s" ff/vm-mail-draft-directory - (format-time-string "%04Y%02m%02d-%02H%02M%02S" (current-time)))) + (format-time-string + "%04Y%02m%02d-%02H%02M%02S" + (current-time)))) (set-buffer-modified-p nil))) (add-hook 'mail-setup-hook 'ff/associate-file-to-vm-mail-buffer) @@ -372,13 +398,14 @@ attachement from mail." "Save the file under a new name and set the associated file to nil." (let ((bn (buffer-file-name))) (when bn - (set-visited-file-name (concat (file-name-directory bn) - "sent-" - (file-name-nondirectory bn) - "-" - (replace-regexp-in-string "[^a-zA-Z0-9]+" "_" - (ff/mail-header-field "Subject")) - )) + (set-visited-file-name + (concat (file-name-directory bn) + "sent-" + (file-name-nondirectory bn) + "-" + (replace-regexp-in-string "[^a-zA-Z0-9]+" "_" + (ff/mail-header-field "Subject")) + )) (save-buffer) (set-visited-file-name nil)) ) @@ -578,9 +605,9 @@ an attachment") (ff/first-buffer-in-mode (cdr l) m)))) (defun ff/compose-mail (&optional force-new) - "Switch to an existing buffer with major mode `mail-mode', + "Cycles through an existing buffers with major mode `mail-mode', or invoke `vm-compose-mail' if none can be found or if FORCE-NEW -is t. If already in a mail buffer, burry it and go to the next." +is t." (interactive "P") (when (eq major-mode 'mail-mode) (bury-buffer)) (let ((buf (and (not force-new)