Merge remote-tracking branch 'refs/remotes/upstream/master'

Conflicts:
	mu4e/mu4e-headers.el
This commit is contained in:
Thierry Volpiatto
2013-10-16 08:29:15 +02:00
8 changed files with 49 additions and 33 deletions

View File

@ -876,8 +876,7 @@ exec guile -s $0 $@
(tm:hour (localtime (mu:date msg))))) (tm:hour (localtime (mu:date msg)))))
(lambda (x y) (< (car x) (car y))))) (lambda (x y) (< (car x) (car y)))))
(mu:plot-histogram (mail-per-hour-table) "Mail per hour" "Hour" "Frequency" (mu:plot-histogram (mail-per-hour-table) "Mail per hour" "Hour" "Frequency")
#t)
@end lisp @end lisp
@cartouche @cartouche

View File

@ -46,16 +46,20 @@ not found."
progpath progpath
#f)))) #f))))
(define* (mu:plot-histogram data title x-label y-label output (define* (mu:plot-histogram data title x-label y-label
#:optional (extra-gnuplot-opts '())) #:optional (output "dumb") (extra-gnuplot-opts '()))
"Plot DATA with TITLE, X-LABEL and X-LABEL using the gnuplot "Plot DATA with TITLE, X-LABEL and X-LABEL using the gnuplot
program. DATA is a list of cons-pairs (X . Y). OUTPUT is a string program. DATA is a list of cons-pairs (X . Y).
OUTPUT is a string
that determines the type of output that gnuplot produces, depending on that determines the type of output that gnuplot produces, depending on
the system. Which options are available depends on the particulars for the system. Which options are available depends on the particulars for
the gnuplot installation, but typical examples would be \"dumb\" for the gnuplot installation, but typical examples would be \"dumb\" for
text-only display, \"wxterm\" to write to a graphical window, or text-only display, \"wxterm\" to write to a graphical window, or
\"png\" to write a PNG-image to stdout. EXTRA-GNUPLOT-OPTS are any \"png\" to write a PNG-image to stdout.
additional options for gnuplot."
EXTRA-GNUPLOT-OPTS is a list
of any additional options for gnuplot."
(if (not (find-program-in-path "gnuplot")) (if (not (find-program-in-path "gnuplot"))
(error "cannot find 'gnuplot' in path")) (error "cannot find 'gnuplot' in path"))
(let ((datafile (export-pairs data)) (let ((datafile (export-pairs data))

View File

@ -731,7 +731,7 @@ after the end of the search results."
(defvar mu4e-headers-mode-abbrev-table nil) (defvar mu4e-headers-mode-abbrev-table nil)
(defun mu4e~headers-auto-update () (defun mu4e~headers-do-auto-update ()
"Update the current headers buffer after indexing has brought "Update the current headers buffer after indexing has brought
some changes, `mu4e-headers-auto-update' is non-nil and there is no some changes, `mu4e-headers-auto-update' is non-nil and there is no
user-interaction ongoing." user-interaction ongoing."
@ -753,7 +753,7 @@ user-interaction ongoing."
(set (make-local-variable 'hl-line-face) 'mu4e-header-highlight-face) (set (make-local-variable 'hl-line-face) 'mu4e-header-highlight-face)
;; maybe update the current headers upon indexing changes ;; maybe update the current headers upon indexing changes
(add-hook 'mu4e-index-updated-hook 'mu4e~headers-auto-update nil t) (add-hook 'mu4e-index-updated-hook 'mu4e~headers-do-auto-update nil t)
(setq (setq
truncate-lines t truncate-lines t
buffer-undo-list t ;; don't record undo information buffer-undo-list t ;; don't record undo information

View File

@ -134,7 +134,7 @@ clicked."
(propertize " Misc\n\n" 'face 'mu4e-title-face) (propertize " Misc\n\n" 'face 'mu4e-title-face)
(mu4e~main-action-str "\t* [U]pdate email & database\n" (mu4e~main-action-str "\t* [U]pdate email & database\n"
'mu4e-update-mail-show-window) 'mu4e-update-mail-and-index)
;; show the queue functions if `smtpmail-queue-dir' is defined ;; show the queue functions if `smtpmail-queue-dir' is defined
(if (file-directory-p smtpmail-queue-dir) (if (file-directory-p smtpmail-queue-dir)

View File

@ -37,9 +37,12 @@
(defcustom mu4e-html2text-command nil (defcustom mu4e-html2text-command nil
"Shell command that converts from html to plain text. "Shell command that converts from html to plain text.
The command has to read html from stdin and output plain text on The command has to read html from stdin and output plain text on
stdout. If this is not defined, the emacs `html2text' tool will stdout. If this is not defined, the emacs `html2text' tool will be
be used when faced with html-only message. If you use htmltext, used when faced with html-only messages. If you use htmltext, it's
it's recommended you use \"html2text -utf8 -width 72\"." recommended you use \"html2text -utf8 -width 72\".
Alternatives are the python-based html2markdown, w3m and on MacOS
you may want to use textutil."
:type 'string :type 'string
:group 'mu4e-view :group 'mu4e-view
:safe 'stringp) :safe 'stringp)
@ -53,8 +56,8 @@ is always used."
(defcustom mu4e-view-html-plaintext-ratio-heuristic 10 (defcustom mu4e-view-html-plaintext-ratio-heuristic 10
"Ratio between the length of the html and the plain text part "Ratio between the length of the html and the plain text part
under which mu4e will consider the plain text part to be below which mu4e will consider the plain text part to be 'This
'This messages requires html' text bodies." messages requires html' text bodies."
:type 'integer :type 'integer
:group 'mu4e-view) :group 'mu4e-view)

View File

@ -1016,18 +1016,24 @@ displaying it). Do _not_ bury the current buffer, though."
(define-derived-mode mu4e-about-mode org-mode "mu4e:about" (define-derived-mode mu4e-about-mode org-mode "mu4e:about"
"Major mode for the mu4e About page, derived from `org-mode'.") "Major mode for the mu4e About page, derived from `org-mode'.")
(define-key mu4e-about-mode-map (kbd "q") 'bury-buffer)
(defun mu4e-about () (defun mu4e-about ()
"Show a buffer with the mu4e-about text." "Show a buffer with the mu4e-about text."
(interactive) (interactive)
(with-current-buffer (lexical-let ((oldbuf (current-buffer)))
(get-buffer-create mu4e~main-about-buffer-name) (with-current-buffer
(let ((inhibit-read-only t)) (get-buffer-create mu4e~main-about-buffer-name)
(erase-buffer) (define-key mu4e-about-mode-map (kbd "q")
(insert mu4e-about) (lambda () ;; XXX it seems unnecessarily hard to do this...
(mu4e-about-mode) (interactive)
(show-all))) (bury-buffer)
(when (buffer-live-p oldbuf)
(switch-to-buffer oldbuf))))
(let ((inhibit-read-only t))
(erase-buffer)
(insert mu4e-about)
(mu4e-about-mode)
(show-all))))
(switch-to-buffer mu4e~main-about-buffer-name) (switch-to-buffer mu4e~main-about-buffer-name)
(setq buffer-read-only t) (setq buffer-read-only t)
(goto-char (point-min))) (goto-char (point-min)))

View File

@ -427,12 +427,17 @@ at POINT, or if nil, at (point)."
(lambda (part) (lambda (part)
(let* ((mtype (mu4e-message-part-field part :mime-type)) (let* ((mtype (mu4e-message-part-field part :mime-type))
(attachtype (mu4e-message-part-field part :type)) (attachtype (mu4e-message-part-field part :type))
(isattach (or ;; we lost parts marked either (isattach
;; "attachment" or "inline" as attachment. (or ;; we consider parts marked either
(member 'attachment attachtype) ;; "attachment" or "inline" as attachment.
(member 'inline attachtype)))) (member 'attachment attachtype)
;; list inline parts as attachment (so they can be
;; saved), unless they are text/plain, which are
;; usually just message footers in mailing lists
(and (member 'inline attachtype)
(not (string-match "^text/plain" mtype))))))
(or ;; remove if it's not an attach *or* if it's an (or ;; remove if it's not an attach *or* if it's an
;; image/audio/application type (but not a signature) ;; image/audio/application type (but not a signature)
isattach isattach
(string-match "^\\(image\\|audio\\)" mtype) (string-match "^\\(image\\|audio\\)" mtype)
(string= "message/rfc822" mtype) (string= "message/rfc822" mtype)

View File

@ -1197,7 +1197,7 @@ comparison with the html part@footnote{this is for the case where the
text-part only warns that you should use the html-version}, @t{mu4e} tries to text-part only warns that you should use the html-version}, @t{mu4e} tries to
convert the html into plain-text for display. The default way to do that is to convert the html into plain-text for display. The default way to do that is to
use the @command{emacs} built-in @code{html2text} function. However, you can use the @command{emacs} built-in @code{html2text} function. However, you can
set the variable @code{mu4e-html2text-command} to use some external program set the variable @code{mu4e-html2text-command} to some external program
instead. This program is expected to take html from standard input and write instead. This program is expected to take html from standard input and write
plain text in @t{UTF-8} encoding on standard output. plain text in @t{UTF-8} encoding on standard output.
@ -1224,7 +1224,6 @@ On MacOS, there is a program called @t{textutil} as yet another alternative:
"textutil -stdin -format html -convert txt -stdout") "textutil -stdin -format html -convert txt -stdout")
@end lisp @end lisp
@node MSGV Crypto @node MSGV Crypto
@section Crypto @section Crypto