Commit Graph

18 Commits

Author SHA1 Message Date
djcb d98e78548c mu4e: re-draw speedbar when context changes
Folders may have changed.
2018-06-13 14:48:22 +03:00
djcb ceb7f0a8b4 mu4e: fix some typos
Hat-tip: Kelly Dean.
2017-08-13 10:09:03 +03:00
Vladimir Sedach 9420d088eb mu4e: Added new mu4e-split-view mode: single-window
Single-window mode is meant to minimize mu4e window operations (opening,
killing, resizing, etc) and buffer changes, while still retaining the
view and headers buffers. In addition, it replaces mu4e main view with a
minibuffer prompt containing the same information.
2017-05-31 20:52:59 -07:00
djcb 6bde2618ab mu4e: make mu4e-context-current interactive
So it will output the name of the current context when used in an
interactive context.
2017-05-06 13:12:38 +03:00
Stig Brautaset 764b205fe9 mu4e: redraw menu after context switch
This is useful if you change e.g. bookmarks in the context vars and want your
menu to reflect that.
2016-12-03 12:18:07 +00:00
Christophe Troestler cec66211f5 Add a face for displaying the context in the mode-line 2016-08-12 00:11:12 +02:00
Yuri D'Elia 6337151918 mu4e: also quote the context label in the modeline 2016-02-16 08:28:59 +02:00
djcb 967b3cb727 mu4e: update copyright years 2016-01-09 21:28:03 +02:00
djcb b373f8e5f0 mu4e: context policy tweaking
As discussed in issue #751, mu4e should tried to accommodate some
different ways of choosing the context.

We add a new policy `ask-if-none', that will only query the user if
there is no context yet; this is the new default for
mu4e-context-policy, i.e. what happens when entering the main view.

The default policy for mu4e-compose-context-policy is now `ask',
i.e. ask if none of the contexts match.

The idea is for the defaults to ask when we don't know a context, and we
can't determine one using the match functions; this is probably the
least confusing. When user gets annoyed by too many question, they can
tweak the behavior to their liking. I.e. 'ask questions first, shoot
later'

Document all of this.
2016-01-03 13:29:19 +02:00
djcb a085c881ef mu4e: don't change context at startup when there is one
Since people often go start/stop mu4e, we shouldn't try to pick a
default context if one is already set.
2015-12-30 17:39:59 +02:00
djcb 7dff782c58 mu4e: let-bind context vars in mu4e-get-*-folder
When we determine the drafts/refile/trash/sent folder, see if we can
find a context matching the particular message. If we find one, let-bind
the vars for that context before determining the folder.

This allows e.g for moving message to context-specific folder, rather
than the one for the current context - useful when dealing with headers
buffers with message belonging to different contexts.
2015-12-29 18:47:12 +02:00
djcb ed1c7edba3 mu4e: some more context tweaking
Fix some typo, change default for startup to pick-first.
2015-12-24 16:03:55 +02:00
djcb 113c024632 mu4e: implement context-policies
Allow setting a policy about what context to choose when starting mu4e
and composing a message. Basically:

When you have defined contexts and you start mu4e it decides which
context to use based on the variable `mu4e-context-policy';
similarly, when you compose a new message, the context is determined
using `mu4e-compose-context-policy'.

These policies can be one of the following:
- a symbol always-ask: unconditionally ask the user what context to pick

The other choices only apply if none of the context matches (i.e., if
none of the contexts' match-functions returns t:

- symbol ask: ask the user
- a symbol pick-first: pick the first context
- nil: don't change the context
2015-12-23 22:01:51 +02:00
djcb 60192a60d2 mu4e: by default, make changing to current context a no-op
Update mu4e-context-switch to not call the enter/leave functions when
'changing' to the current context. However, calling those functions (if
defined) can be force through a prefix arg. Document this.

Make mu4e-context-determine recognize 'policies', i.e. what to do when
no context matches. This part is WIP.
2015-12-21 22:24:16 +02:00
Foivos S. Zakkak cf3c52d588 Fix mu4e-context-determine to match documentation 2015-12-16 16:51:54 +02:00
djcb a1d0071dd0 mu4e: contexts: auto select one at startup, document
When contexts have been defined, automatically select one at startup --
either the first whose match-function returns non-nil, or simply the
first one.

Document this, too.
2015-12-15 18:20:31 +02:00
djcb c2ddfeacfc mu4e: context: tweaks
Don't clear the caches when switch accounts. Fix some typos.
2015-12-13 18:14:24 +02:00
djcb 47f7f1b85a mu4e: define mu4e-context
Define mu4e-context - a structure with settings and enter/leave
functions for contexts, and some functions for switching between
contexts and auto-detecting them.
2015-12-13 17:45:52 +02:00