* mu4e-utils: some fixes: the update-mail sentinel, don't use 'floor' with
encode time (the latter broke address autocompletion on 32-bit platforms, it seems)
This commit is contained in:
@ -513,9 +513,11 @@ process."
|
|||||||
(t (mu4e-message "Error %d: %s" errcode errmsg))))
|
(t (mu4e-message "Error %d: %s" errcode errmsg))))
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
|
||||||
(defconst mu4e-update-buffer-name "*mu4e-update*"
|
(defconst mu4e~update-buffer-name "*mu4e-update*"
|
||||||
"*internal* Name of the buffer for message retrieval / database
|
"Name of the buffer for message retrieval/database updating.")
|
||||||
|
|
||||||
|
(defconst mu4e~update-buffer-height 8
|
||||||
"Height of the mu4e message retrieval/update buffer.")
|
"Height of the mu4e message retrieval/update buffer.")
|
||||||
|
|
||||||
(defun mu4e-update-mail-show-window ()
|
(defun mu4e-update-mail-show-window ()
|
||||||
@ -524,9 +526,13 @@ split-window."
|
|||||||
split-window."
|
split-window."
|
||||||
(interactive)
|
(interactive)
|
||||||
(unless mu4e-get-mail-command
|
(unless mu4e-get-mail-command
|
||||||
(error "`mu4e-get-mail-command' is not defined"))
|
(error "`mu4e-get-mail-command' is not defined"))
|
||||||
(let ((buf (get-buffer-create mu4e-update-buffer-name))
|
;; delete any old update buffer
|
||||||
(win
|
(when (buffer-live-p mu4e~update-buffer-name)
|
||||||
|
(with-current-buffer mu4e~update-buffer-name
|
||||||
|
(kill-buffer-and-window)))
|
||||||
|
;; create a new one
|
||||||
|
(let ((buf (get-buffer-create mu4e~update-buffer-name))
|
||||||
(win (split-window (selected-window)
|
(win (split-window (selected-window)
|
||||||
(- (window-height (selected-window)) 8))))
|
(- (window-height (selected-window)) 8))))
|
||||||
(with-selected-window win
|
(with-selected-window win
|
||||||
@ -536,8 +542,6 @@ split-window."
|
|||||||
(insert "\n") ;; FIXME -- needed so output starts
|
(insert "\n") ;; FIXME -- needed so output starts
|
||||||
(mu4e-update-mail buf))))
|
(mu4e-update-mail buf))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
@ -630,9 +634,9 @@ FUNC (if non-nil) afterwards."
|
|||||||
(setq mu4e-contacts-func 'mu4e~fill-contacts)
|
(setq mu4e-contacts-func 'mu4e~fill-contacts)
|
||||||
(mu4e~proc-contacts
|
(mu4e~proc-contacts
|
||||||
mu4e-compose-complete-only-personal
|
mu4e-compose-complete-only-personal
|
||||||
(when mu4e-compose-complete-only-after
|
(when mu4e-compose-complete-only-after
|
||||||
(floor (float-time
|
(float-time
|
||||||
(apply 'encode-time
|
(apply 'encode-time
|
||||||
(org-parse-time-string mu4e-compose-complete-only-after))))))))
|
(org-parse-time-string mu4e-compose-complete-only-after))))))))
|
||||||
|
|
||||||
(defun mu4e~stop ()
|
(defun mu4e~stop ()
|
||||||
@ -676,7 +680,8 @@ processing takes part in the background, unless buf is non-nil."
|
|||||||
(code (process-exit-status proc))
|
(code (process-exit-status proc))
|
||||||
;; sadly, fetchmail returns '1' when there is no mail; this is
|
;; sadly, fetchmail returns '1' when there is no mail; this is
|
||||||
;; not really an error of course, but it's hard to distinguish
|
;; not really an error of course, but it's hard to distinguish
|
||||||
;; from a genuine error
|
;; from a genuine error
|
||||||
|
(maybe-error (or (not (eq status 'exit)) (/= code 0)))
|
||||||
(buf (process-buffer proc)))
|
(buf (process-buffer proc)))
|
||||||
(message nil)
|
(message nil)
|
||||||
;; there may be an error, give the user up to 5 seconds to check
|
;; there may be an error, give the user up to 5 seconds to check
|
||||||
|
|||||||
Reference in New Issue
Block a user