summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2020-04-27 21:51:23 +0300
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2020-04-27 21:51:23 +0300
commit0f5f6c4e13aa6fc607de5bcb30bf5f62db9e9188 (patch)
tree585f291b45a093842abb60d2904f9dbceea3152e
parenta5dccffcdfa3aeb1908832bf467f90db82b7f82c (diff)
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.)
-rw-r--r--mu4e/mu4e-context.el1
-rw-r--r--mu4e/mu4e-utils.el4
2 files changed, 2 insertions, 3 deletions
diff --git a/mu4e/mu4e-context.el b/mu4e/mu4e-context.el
index 6900753..1c33dac 100644
--- a/mu4e/mu4e-context.el
+++ b/mu4e/mu4e-context.el
@@ -109,7 +109,6 @@ none."
Also:
- Add the context to the `mu4e-contexts'.
- 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':
- `user-mail-address': Defaults to the global value when the context is created.
diff --git a/mu4e/mu4e-utils.el b/mu4e/mu4e-utils.el
index a285ab7..79ae8dd 100644
--- a/mu4e/mu4e-utils.el
+++ b/mu4e/mu4e-utils.el
@@ -780,8 +780,6 @@ nothing."
"Handle 'pong' responses from the mu server."
(setq mu4e~server-props (plist-get data :props)) ;; save info from the server
(let ((doccount (plist-get mu4e~server-props :doccount)))
- (unless (mu4e-context-current)
- (mu4e~context-autoswitch nil mu4e-context-policy))
(mu4e~check-requirements)
(when func (funcall func))
(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
non-nil). Otherwise, check various requireme`'nts, then start mu4e.
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)))
(mu4e~proc-ping
(mapcar