set up the extra machinery for making sure emacs does not try to re-sort
our already-sorted contacts.... Also try to improve the sorting strategy
itself.
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.
Add `mu4e-view-toggle-html' for toggling between html and text display
of messages (when available); keybinding 'h'. Document this.
The new default keybinging for mu4e-view-toggle-hide-cited becomes '#'.
Some mails were not showing; this was because they had a short (useless)
text part and an html-part with the content. However, the short part was
still too big to fail our heuristic in
mu4e-view-html-plaintext-ratio-heuristic
Set it to 5 instead. This fixed#743, though not the more general case.
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
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.
Since the environment (and settings) can change, default to
re-calculating the maildirs when we need them. When you have so many
maildirs that this is slow, you can set mu4e-cache-maildir-list to
t (but be sure to read the docstring).
Make `global-mode-string' local in all buffers where we use it, so we
don't leak the "context" string outside mu4e.
Also add the context string to the compose buffer's modeline.
This fixes#740.
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.
Doing:
!access(...) == 0
Is equivalent to:
(!access(...)) == 0
Not:
!(access(...) == 0)
And throws this warning under clang:
mu-store.cc:77:6: warning: logical not is only applied to the left hand
side of this comparison [-Wlogical-not-parentheses]
if (!access(xpath, F_OK) == 0) {
^ ~~
mu-store.cc:77:6: note: add parentheses after the '!' to evaluate the
comparison first
if (!access(xpath, F_OK) == 0) {
^
( )
mu-store.cc:77:6: note: add parentheses around left hand side expression
to silence this warning
if (!access(xpath, F_OK) == 0) {
^
( )
It ends up doing what the author intended anyway since access() returns
-1 on error, and !-1 == 0, but just do the more obvious check and check
that we don't get 0 here with !=.
Let's not spam the poor sods who own foo.com and bar.com, or home.com
etc. Went through the various examples and changed them to use
example.com or subdomains of example.com where appropriate, even when
the domain or TLD didn't exist (yet!) for completeness.
See-Also: https://tools.ietf.org/html/rfc2606