mu4e: ask for context in mu4e~start

This is a little risky, but it avoids the case where the
context-question is hidden by the response from the server ("blabla
contacts" etc.)
This commit is contained in:
Dirk-Jan C. Binnema
2020-04-27 21:51:23 +03:00
parent a5dccffcdf
commit 0f5f6c4e13
2 changed files with 2 additions and 3 deletions

View File

@ -109,7 +109,6 @@ none."
Also: Also:
- Add the context to the `mu4e-contexts'. - Add the context to the `mu4e-contexts'.
- Update the bookmarks to ignore the trash folder if NO-TRASH-FLAG is non-nil. - Update the bookmarks to ignore the trash folder if NO-TRASH-FLAG is non-nil.
- Update the `mu4e-user-mail-address-list'.
Options beyond those of `make-mu4e-context': Options beyond those of `make-mu4e-context':
- `user-mail-address': Defaults to the global value when the context is created. - `user-mail-address': Defaults to the global value when the context is created.

View File

@ -780,8 +780,6 @@ nothing."
"Handle 'pong' responses from the mu server." "Handle 'pong' responses from the mu server."
(setq mu4e~server-props (plist-get data :props)) ;; save info from the server (setq mu4e~server-props (plist-get data :props)) ;; save info from the server
(let ((doccount (plist-get mu4e~server-props :doccount))) (let ((doccount (plist-get mu4e~server-props :doccount)))
(unless (mu4e-context-current)
(mu4e~context-autoswitch nil mu4e-context-policy))
(mu4e~check-requirements) (mu4e~check-requirements)
(when func (funcall func)) (when func (funcall func))
(when (zerop doccount) (when (zerop doccount)
@ -800,6 +798,8 @@ context yet, switch to the matching one, or none matches, the
first. If mu4e is already running, execute function FUNC (if first. If mu4e is already running, execute function FUNC (if
non-nil). Otherwise, check various requireme`'nts, then start mu4e. non-nil). Otherwise, check various requireme`'nts, then start mu4e.
When successful, call FUNC (if non-nil) afterwards." When successful, call FUNC (if non-nil) afterwards."
(unless (mu4e-context-current)
(mu4e~context-autoswitch nil mu4e-context-policy))
(setq mu4e-pong-func (lambda (info) (mu4e~pong-handler info func))) (setq mu4e-pong-func (lambda (info) (mu4e~pong-handler info func)))
(mu4e~proc-ping (mu4e~proc-ping
(mapcar (mapcar