* mu4e: add support for custom matcher functions (WIP)

This commit is contained in:
djcb
2012-06-14 21:54:24 +03:00
parent 0d913c1a1f
commit 2367ab2d67
5 changed files with 107 additions and 17 deletions

View File

@ -31,6 +31,7 @@
(require 'html2text)
(require 'mu4e-vars)
(require 'doc-view)
(require 'org) ;; for org-parse-time-string
(defcustom mu4e-html2text-command nil
"Shell command that converts HTML from stdin into plain text on
@ -104,7 +105,8 @@ User now will be presented with a list:
(optionsstr
(mapconcat
(lambda (option)
(when (consp (cdr option))
;; try to detect old-style options...
(when (or (characterp (cdr option)) (null (cdr option)))
(error (concat "Please use the new format for options/actions; "
"see the manual")))
(let* ((kar (substring (car option) 0 1))
@ -325,8 +327,6 @@ http://cr.yp.to/proto/maildir.html "
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun mu4e-display-size (size)
"Get a string representation of SIZE (in bytes)."
(cond
@ -807,5 +807,12 @@ displaying it). Do _not_ bury the current buffer, though."
(unless (one-window-p t)
(delete-window win)))))) nil t)))
(defun mu4e-get-time-date (prompt)
"Determine the emacs time value for the time/date entered by user
after PROMPT. Formats are all that are accepted by
`parse-time-string'."
(let ((timestr (read-string (mu4e-format "%s" prompt))))
(apply 'encode-time (org-parse-time-string timestr))))
(provide 'mu4e-utils)