mu4e: some more context tweaking

Fix some typo, change default for startup to pick-first.
This commit is contained in:
djcb 2015-12-24 16:03:55 +02:00
parent 20c849390d
commit ed1c7edba3
3 changed files with 4 additions and 4 deletions

View File

@ -106,7 +106,8 @@ to the first whose :match-func return non-nil. If none of them
match, return the first. For MSG and POLICY, see `mu4e-context-determine'." match, return the first. For MSG and POLICY, see `mu4e-context-determine'."
(when mu4e-contexts (when mu4e-contexts
(let ((context (mu4e-context-determine msg policy))) (let ((context (mu4e-context-determine msg policy)))
(when context (mu4e-context-switch (mu4e-context-name context)))))) (when context (mu4e-context-switch
nil (mu4e-context-name context))))))
(defun mu4e-context-determine (msg &optional policy) (defun mu4e-context-determine (msg &optional policy)
"Return the first context with a match-func that returns t. MSG "Return the first context with a match-func that returns t. MSG

View File

@ -738,8 +738,7 @@ If mu4e is already running, execute function FUNC (if non-nil).
Otherwise, check various requirements, then start mu4e. When Otherwise, check various requirements, then start mu4e. When
successful, call FUNC (if non-nil) afterwards." successful, call FUNC (if non-nil) afterwards."
;; maybe switch the context ;; maybe switch the context
(mu4e~context-autoswitch mu4e-compose-parent-message (mu4e~context-autoswitch nil mu4e-context-policy)
mu4e-compose-context-policy)
;; if we're already running, simply go to the main view ;; if we're already running, simply go to the main view
(if (mu4e-running-p) ;; already running? (if (mu4e-running-p) ;; already running?
(when func ;; yes! run func if defined (when func ;; yes! run func if defined

View File

@ -217,7 +217,7 @@ Suggested possible values are:
:options '(completing-read ido-completing-read) :options '(completing-read ido-completing-read)
:group 'mu4e) :group 'mu4e)
(defcustom mu4e-context-policy 'ask (defcustom mu4e-context-policy 'pick-first
"Determines how mu4e should determine the context when starting up. "Determines how mu4e should determine the context when starting up.
If POLICY is 'always-ask, we ask the user unconditionally. If POLICY is 'always-ask, we ask the user unconditionally.