Commit Graph

29 Commits

Author SHA1 Message Date
Jonas Bernoulli 83f0c9cea9 mu4e: Remove excess semicolons from library headers
Placing two semicolons on an otherwise empty line helps to logically
"connect" the surrounding "paragraphs", which in (only) some cases
makes sense.

Previously the three paragraphs of the permission statement were not
connected to each other like this, which is perfectly fine.  However
the preceding "This file is not part of GNU Emacs." line was connected
to the first paragraph, which does not make sense considering that the
latter is not connected two the second paragraph, which it relates to
more.

Once those two semicolons are gone, it also makes sense to remove
those from the second line.
2020-02-18 23:49:50 +02:00
Dirk-Jan C. Binnema c09a9c4372 mu4e: update context handling
Make mu4e-context-autoswitch works a before we updated the pong-handler

Avoid unnecessary mu4e~start int he composer.
2020-02-18 22:38:40 +02:00
Jonas Bernoulli 6790c0d015 mu4e: Fix indentation 2020-02-17 14:28:00 +01:00
Dirk-Jan C. Binnema 0b1e6b623e mu4e-context: fix some compiler warnings 2020-02-09 18:07:09 +02:00
Dirk-Jan C. Binnema e1e26d1da2 mu4e: update to use server maildir/database/addresses
Mkae mu4e-maildir and mu4e-personal-addresses obsolete, we get those
from the server.
2020-02-09 00:15:49 +02:00
Thierry Volpiatto 846428cfd4
Unquote lambda's
* mu4e/mu4e-context.el (mu4e-context-switch):         Do it.
* mu4e/mu4e-contrib.el (mu4e-view-mode-hook):         Do it.
(mu4e-headers-mode-hook):                             Do it.
* mu4e/mu4e-icalendar.el (mu4e-icalendar-reply-ical): Do it.
* mu4e/mu4e-utils.el (mu4e~start):                    Do it.
(mu4e-split-ranges-to-numbers):                       Do it.
2020-01-27 08:41:24 +01:00
Vonfry 40d4abc8fb
mu4e: switch mu4e-contexts from defvar to defcustom 2019-12-22 14:54:08 +08:00
Thierry Volpiatto e4f5576cfc
Add lexical-binding to all files and fix warnings
about free variables (declare) and unused lexical vars (prefix with "_").
2019-09-16 19:54:59 +02:00
Nathanael Gentry b710e47d58
mu4e: fix `make-mu4e-context-account` to see `name` keyword arg 2019-07-30 16:47:09 -04:00
Pierre Neidhardt 67a110d2fb mu4e: Add `make-mu4e-context-account' for easy setup with sane defaults 2019-03-04 16:26:55 +01:00
Alex Branham 2674ca5583
mu4e: Replace cl with cl-lib 2019-01-04 16:03:58 -06:00
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