mu4e: implement mu4e-compose-complete-only-after
We weren't supporting that yet after moving to the new command-parser; let's do so now. We now pass the time_t as a string, since the parser does not support floats (and emacs doesn't generally support big ints).
This commit is contained in:
@ -483,7 +483,7 @@ AFTER is non-nil, get only contacts seen AFTER (the time_t
|
|||||||
value)."
|
value)."
|
||||||
(mu4e~call-mu `(contacts
|
(mu4e~call-mu `(contacts
|
||||||
:personal ,personal
|
:personal ,personal
|
||||||
;; :after ,(or after nil)
|
:after ,(or after nil)
|
||||||
:tstamp ,(or tstamp nil))))
|
:tstamp ,(or tstamp nil))))
|
||||||
|
|
||||||
(defun mu4e~proc-view (docid-or-msgid &optional images decrypt)
|
(defun mu4e~proc-view (docid-or-msgid &optional images decrypt)
|
||||||
|
|||||||
@ -780,11 +780,8 @@ nothing."
|
|||||||
(setq mu4e-contacts-func 'mu4e~update-contacts)
|
(setq mu4e-contacts-func 'mu4e~update-contacts)
|
||||||
(mu4e~proc-contacts
|
(mu4e~proc-contacts
|
||||||
mu4e-compose-complete-only-personal
|
mu4e-compose-complete-only-personal
|
||||||
(when mu4e-compose-complete-only-after
|
mu4e-compose-complete-only-after
|
||||||
(float-time
|
mu4e~contacts-tstamp)))
|
||||||
(apply 'encode-time
|
|
||||||
(mu4e-parse-time-string mu4e-compose-complete-only-after))))
|
|
||||||
mu4e~contacts-tstamp)))
|
|
||||||
|
|
||||||
(defun mu4e~pong-handler (props func)
|
(defun mu4e~pong-handler (props func)
|
||||||
"Handle 'pong' responses from the mu server."
|
"Handle 'pong' responses from the mu server."
|
||||||
|
|||||||
@ -370,9 +370,13 @@ addresses)."
|
|||||||
|
|
||||||
(defcustom mu4e-compose-complete-only-after "2014-01-01"
|
(defcustom mu4e-compose-complete-only-after "2014-01-01"
|
||||||
"Consider only contacts last seen after this date.
|
"Consider only contacts last seen after this date.
|
||||||
Date must be a string, in a format parseable by
|
|
||||||
`org-parse-time-string'. This excludes really old contacts.
|
Date must be a string of the form YYY-MM-DD.
|
||||||
Set to nil to not have any time-based restriction."
|
|
||||||
|
This is useful for limiting a potentially enormous set of
|
||||||
|
contacts for auto-completion to just those that are present in
|
||||||
|
the e-mail corpus in recent timses. Set to nil to not have any
|
||||||
|
time-based restriction."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'mu4e-compose)
|
:group 'mu4e-compose)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user