mirror of https://github.com/djcb/mu.git
Merge remote-tracking branch 'refs/remotes/upstream/master'
Conflicts: mu4e/mu4e-headers.el
This commit is contained in:
commit
0e1efc8f5d
|
@ -876,8 +876,7 @@ exec guile -s $0 $@
|
|||
(tm:hour (localtime (mu:date msg)))))
|
||||
(lambda (x y) (< (car x) (car y)))))
|
||||
|
||||
(mu:plot-histogram (mail-per-hour-table) "Mail per hour" "Hour" "Frequency"
|
||||
#t)
|
||||
(mu:plot-histogram (mail-per-hour-table) "Mail per hour" "Hour" "Frequency")
|
||||
@end lisp
|
||||
|
||||
@cartouche
|
||||
|
|
|
@ -46,16 +46,20 @@ not found."
|
|||
progpath
|
||||
#f))))
|
||||
|
||||
(define* (mu:plot-histogram data title x-label y-label output
|
||||
#:optional (extra-gnuplot-opts '()))
|
||||
(define* (mu:plot-histogram data title x-label y-label
|
||||
#:optional (output "dumb") (extra-gnuplot-opts '()))
|
||||
"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
|
||||
the system. Which options are available depends on the particulars for
|
||||
the gnuplot installation, but typical examples would be \"dumb\" for
|
||||
text-only display, \"wxterm\" to write to a graphical window, or
|
||||
\"png\" to write a PNG-image to stdout. EXTRA-GNUPLOT-OPTS are any
|
||||
additional options for gnuplot."
|
||||
\"png\" to write a PNG-image to stdout.
|
||||
|
||||
EXTRA-GNUPLOT-OPTS is a list
|
||||
of any additional options for gnuplot."
|
||||
(if (not (find-program-in-path "gnuplot"))
|
||||
(error "cannot find 'gnuplot' in path"))
|
||||
(let ((datafile (export-pairs data))
|
||||
|
|
|
@ -731,7 +731,7 @@ after the end of the search results."
|
|||
|
||||
(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
|
||||
some changes, `mu4e-headers-auto-update' is non-nil and there is no
|
||||
user-interaction ongoing."
|
||||
|
@ -753,7 +753,7 @@ user-interaction ongoing."
|
|||
(set (make-local-variable 'hl-line-face) 'mu4e-header-highlight-face)
|
||||
|
||||
;; 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
|
||||
truncate-lines t
|
||||
buffer-undo-list t ;; don't record undo information
|
||||
|
|
|
@ -134,7 +134,7 @@ clicked."
|
|||
(propertize " Misc\n\n" 'face 'mu4e-title-face)
|
||||
|
||||
(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
|
||||
(if (file-directory-p smtpmail-queue-dir)
|
||||
|
|
|
@ -37,9 +37,12 @@
|
|||
(defcustom mu4e-html2text-command nil
|
||||
"Shell command that converts from html to plain text.
|
||||
The command has to read html from stdin and output plain text on
|
||||
stdout. If this is not defined, the emacs `html2text' tool will
|
||||
be used when faced with html-only message. If you use htmltext,
|
||||
it's recommended you use \"html2text -utf8 -width 72\"."
|
||||
stdout. If this is not defined, the emacs `html2text' tool will be
|
||||
used when faced with html-only messages. If you use htmltext, it's
|
||||
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
|
||||
:group 'mu4e-view
|
||||
:safe 'stringp)
|
||||
|
@ -53,8 +56,8 @@ is always used."
|
|||
|
||||
(defcustom mu4e-view-html-plaintext-ratio-heuristic 10
|
||||
"Ratio between the length of the html and the plain text part
|
||||
under which mu4e will consider the plain text part to be
|
||||
'This messages requires html' text bodies."
|
||||
below which mu4e will consider the plain text part to be 'This
|
||||
messages requires html' text bodies."
|
||||
:type 'integer
|
||||
:group 'mu4e-view)
|
||||
|
||||
|
@ -120,7 +123,7 @@ Thus, function will return nil for empty lists, non-existing body-txt or body-ht
|
|||
val)
|
||||
((member field '(:docid :size))
|
||||
0) ;; numeric type: nil -> 0
|
||||
(t
|
||||
(t
|
||||
val)))) ;; otherwise, just return nil
|
||||
|
||||
(defsubst mu4e-message-has-field (msg field)
|
||||
|
@ -132,7 +135,7 @@ Thus, function will return nil for empty lists, non-existing body-txt or body-ht
|
|||
the headers buffer or the view buffer, or nil if there is no such
|
||||
message. If optional NOERROR is non-nil, do not raise an error when
|
||||
there is no message at point."
|
||||
(let ((msg (or (get-text-property (point) 'msg) mu4e~view-msg)))
|
||||
(let ((msg (or (get-text-property (point) 'msg) mu4e~view-msg)))
|
||||
(if msg
|
||||
msg
|
||||
(unless noerror (mu4e-warn "No message at point")))))
|
||||
|
@ -213,7 +216,7 @@ match."
|
|||
(or
|
||||
(and name (string-match rx name))
|
||||
(and email (string-match rx email)))))
|
||||
(mu4e-message-field msg cfield))))
|
||||
(mu4e-message-field msg cfield))))
|
||||
|
||||
(defun mu4e-message-contact-field-matches-me (msg cfield)
|
||||
"Checks whether any of the of the contacts in field
|
||||
|
|
|
@ -1016,18 +1016,24 @@ displaying it). Do _not_ bury the current buffer, though."
|
|||
|
||||
(define-derived-mode mu4e-about-mode org-mode "mu4e:about"
|
||||
"Major mode for the mu4e About page, derived from `org-mode'.")
|
||||
(define-key mu4e-about-mode-map (kbd "q") 'bury-buffer)
|
||||
|
||||
(defun mu4e-about ()
|
||||
"Show a buffer with the mu4e-about text."
|
||||
(interactive)
|
||||
(with-current-buffer
|
||||
(get-buffer-create mu4e~main-about-buffer-name)
|
||||
(let ((inhibit-read-only t))
|
||||
(erase-buffer)
|
||||
(insert mu4e-about)
|
||||
(mu4e-about-mode)
|
||||
(show-all)))
|
||||
(lexical-let ((oldbuf (current-buffer)))
|
||||
(with-current-buffer
|
||||
(get-buffer-create mu4e~main-about-buffer-name)
|
||||
(define-key mu4e-about-mode-map (kbd "q")
|
||||
(lambda () ;; XXX it seems unnecessarily hard to do this...
|
||||
(interactive)
|
||||
(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)
|
||||
(setq buffer-read-only t)
|
||||
(goto-char (point-min)))
|
||||
|
|
|
@ -427,12 +427,17 @@ at POINT, or if nil, at (point)."
|
|||
(lambda (part)
|
||||
(let* ((mtype (mu4e-message-part-field part :mime-type))
|
||||
(attachtype (mu4e-message-part-field part :type))
|
||||
(isattach (or ;; we lost parts marked either
|
||||
;; "attachment" or "inline" as attachment.
|
||||
(member 'attachment attachtype)
|
||||
(member 'inline attachtype))))
|
||||
(isattach
|
||||
(or ;; we consider parts marked either
|
||||
;; "attachment" or "inline" as attachment.
|
||||
(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
|
||||
;; image/audio/application type (but not a signature)
|
||||
;; image/audio/application type (but not a signature)
|
||||
isattach
|
||||
(string-match "^\\(image\\|audio\\)" mtype)
|
||||
(string= "message/rfc822" mtype)
|
||||
|
|
|
@ -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
|
||||
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
|
||||
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
|
||||
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")
|
||||
@end lisp
|
||||
|
||||
|
||||
@node MSGV Crypto
|
||||
@section Crypto
|
||||
|
||||
|
|
Loading…
Reference in New Issue