From: Francois Fleuret Date: Sun, 2 Oct 2011 09:12:27 +0000 (+0200) Subject: Various changes. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=db114167e8e2c85fe63ab00fb9472df35666b10b;p=elisp.git Various changes. --- diff --git a/emacs.el b/emacs.el index 31b9abf..64500c7 100644 --- a/emacs.el +++ b/emacs.el @@ -660,7 +660,7 @@ occurrences " ;; Printing ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(require 'ps-print) +(load "ps-print") (setq ps-print-color-p nil ;; ps-paper-type 'letter @@ -785,6 +785,7 @@ printer." (concat ;; The temperature + (let ((temp (/ (string-to-number (ff/file-first-line ff/temperature-file)) 1000))) (if (> temp 50) (concat @@ -802,9 +803,18 @@ printer." (cond ((string= battery-status "Full") "L") - ((string= battery-status "Charging") (format "L%d%%" (ff/battery-percent "energy"))) - ((string= battery-status "Discharging") (format "B%d%%" (ff/battery-percent "charge"))) - (t battery-status))) + + ((string= battery-status "Charging") + (format "L%d%%" (max (ff/battery-percent "charge") + (ff/battery-percent "energy")))) + + ((string= battery-status "Discharging") + (format "B%d%%" (max (ff/battery-percent "charge") + (ff/battery-percent "energy")))) + + (t battery-status) + + )) ) @@ -1029,7 +1039,7 @@ of commands in `ff/default-bash-commands' is used for auto-completion" vc-follow-symlinks t ) -(when (require 'vc-git nil t) +(when (load "vc-git" nil t) (add-to-list 'vc-handled-backends 'GIT)) ;; alarm-vc.el is one of my own scripts, check my web page @@ -1064,7 +1074,7 @@ of commands in `ff/default-bash-commands' is used for auto-completion" ;; Cool stuff to navigate in emacs-lisp sources ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(require 'find-func) +(load "find-func") (defun ff/goto-function-definition (&optional goback) "Go directly to the definition of the function at point. With @@ -2010,7 +2020,7 @@ This may be a useful alternative binding for \\[delete-other-windows] ;; Keymaping ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(require 'info nil t) +(load "info" nil t) (define-key global-map [(shift iso-lefttab)] 'ispell-complete-word) ;; shift-tab going backward is kind of standard @@ -2206,7 +2216,7 @@ next one. With universal argument, kill all killable buffers." ;; exclusively with my selector.el ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(require 'recentf) +(load "recentf") (setq recentf-exclude (append recentf-exclude @@ -2282,7 +2292,7 @@ next one. With universal argument, kill all killable buffers." ;; selector.el is one of my own scripts, check my web page (when (ff/load-or-alert "selector" t) - (define-key global-map [(shift return)] 'selector/quick-move-in-buffer) + ;; (define-key global-map [(shift return)] 'selector/quick-move-in-buffer) (define-key global-map [(control x) (control b)] 'selector/switch-buffer) (defun ff/visit-debpkg-file (&optional regexp) diff --git a/media.el b/media.el index 79313f2..2a32156 100644 --- a/media.el +++ b/media.el @@ -1,4 +1,4 @@ -;; -*-Emacs-Lisp-*- +;; -*- mode: emacs-lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This program is free software; you can redistribute it and/or ;; diff --git a/vm b/vm index 1b34b49..f700c99 100644 --- a/vm +++ b/vm @@ -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 @@ -34,11 +49,14 @@ vm-mutable-windows t vm-mutable-frames nil 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-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 @@ -78,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) @@ -94,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") @@ -137,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))) @@ -177,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