1
0
mirror of https://github.com/djcb/mu.git synced 2024-06-21 06:56:48 +02:00
Commit Graph

3843 Commits

Author SHA1 Message Date
djcb
144e2a8f1b mu4e: Contact completion - better sorting / display
Improve the contact-sorting algorithm, and make it better cooperate with
completion-at-point functions.

Also deal better with broken rewritten contacts, and document how
rewriting should done (docstrings and reference doc).
2016-01-09 21:27:52 +02:00
djcb
25da1fdc7b mu4e: remove misleading mail-reply-to from doc
You can't change mail-reply-to by setting the var.
2016-01-05 20:33:39 +02:00
djcb
785d888b42 mu4e: don't change context when already running
This is for the case where mu4e-compose trigger mu4e~start, as found by
thierryvolpiatto.
2016-01-03 15:53:58 +02:00
djcb
5e13d31450 mu4e: tweak the contact sorting
Fall back to freq / tstamp when both contacts are personal.
2016-01-03 15:53:07 +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
8e43e8cac3 mu4e: use substring when completing contacts
Make substring the first completion strategy.
2015-12-30 17:42:08 +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
9da7fbb3de mu4e: cosmetics 2015-12-30 15:35:26 +02:00
djcb
02620af4c2 mu/mu4e: improve in contacts completion
mu: cleanup server side; make sure not to loose 'personal' flag when
    seeing same contact in non-personal context
mu4e: tweak the sorting algorithm a bit to take the personal flag into
    account
2015-12-30 15:33:27 +02:00
djcb
74aa4679d3 mu4e: improve mu4e-message-contact-field-matches
Improve mu4e-message-contact-field-matches so you can pass it a list of
header fields to match instead of having to check each of them
separately.
2015-12-29 18:55:58 +02:00
djcb
f645a12075 mu4e: improve sorting of contacts for completion
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.
2015-12-29 18:53:57 +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
825881feb3 mu4e: add variable mu4e-view-auto-mark-as-read
When set to nil, do not attempt to mark messages as read when you open
them; this can be useful on read-only file systems.

Fixes issue #515.
2015-12-27 14:30:02 +02:00
djcb
29a44e4371 mu4e: add mu4e-view-toggle-html
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 '#'.
2015-12-27 10:28:11 +02:00
djcb
48388c9d1b mu4e: tweak mu4e-view-html-plaintext-ratio-heuristic to 5
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.
2015-12-27 09:45:54 +02:00
djcb
6fa9556aa8 mu4e: improve mu4e-contact-rewrite-function
Allow mu4e-contact-rewrite-function to return nil to remove a
contact. Improve documentation.
2015-12-26 13:26:26 +02:00
djcb
08540628e0 mu4e: small documentation updates 2015-12-25 09:41:35 +02:00
djcb
de22f2643f Update NEWS.org 2015-12-24 16:09:12 +02:00
djcb
b21eabf954 mu: overwrite duplicate target files
over write target files when moving (when they seem to be the
same). Should make the case where you have copies a bit smoother.
2015-12-24 16:06:51 +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
20c849390d mu4e: minor doc fixes
Update bookmarks example
2015-12-24 16:03:21 +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
4bca0d0739 mu4e: improve documentation for mailing-lists
And fix a typo.
2015-12-23 21:26:21 +02:00
djcb
27e9251d24 mu4e: add mu4e-bookmark-define
mu4e-bookmark-define allows for defining a bookmark; it will be added to
mu4e-bookmarks, replacing any bookmarks with the same key.
2015-12-22 18:03:53 +02:00
djcb
d6f8dd19df mu4e: document org-mu4e-store-and-capture in manual
Document org-mu4e-store-and-capture in the manual. Some cosmetics.
2015-12-22 18:02:50 +02:00
djcb
972678b6be mu4e: when delete the currently view msg, kill the view
When we delete the message that is currently being viewed, destroy the
view as well.
2015-12-21 22:24:16 +02:00
djcb
fc30bc1a24 mu4e: add org-mu4e-store-and-capture
Make it easy to store and capture the current message, using
M-x org-mu4e-store-and-capture. This is a first step.
2015-12-21 22:24:16 +02:00
djcb
41677dfa0b mu4e: cosmetic 2015-12-21 22:24:16 +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
djcb
6bafb39960 update documentation / NEWS.org
Update the docs for the latest changes.
2015-12-19 14:01:06 +02:00
djcb
1a0ad61e4d mu4e: by default, don't cache maildirs
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).
2015-12-19 13:59:18 +02:00
djcb
eaf56fd533 org-mu4e: default org-mu4e-link-query-in-headers-mode to nil
It's usually more useful to link to a specific message than to a query,
so make that the default.
2015-12-19 13:58:21 +02:00
djcb
d3dbed6c1f mu4e: make global-mode-string buffer-local
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.
2015-12-19 10:14:49 +02:00
djcb
c328d679de Merge branch 'master' of github.com:djcb/mu 2015-12-16 21:39:47 +02:00
djcb
a14b3f0e62 Replace some 'fancy' characters
They showed up as hexboxes when using the Liberation font.
2015-12-16 21:31:17 +02:00
Dirk-Jan C. Binnema
8293dac5b4 Merge pull request #738 from zakkak/prompt_for_context
mu4e: When mu4e-context-determine fails, prompt user
2015-12-16 20:27:51 +02:00
Dirk-Jan C. Binnema
a6099e70de Merge pull request #737 from zakkak/fix_mu4e_context_determine
mu4e: Fix mu4e-context-determine to match documentation
2015-12-16 20:26:19 +02:00
Foivos S. Zakkak
0032ccf73c When mu4e-context-determine fails, prompt user 2015-12-16 16:51:54 +02:00
Foivos S. Zakkak
cf3c52d588 Fix mu4e-context-determine to match documentation 2015-12-16 16:51:54 +02:00
Dirk-Jan C. Binnema
e932399642 Merge pull request #735 from cpitclaudel/customizable-headers
mu4e: Initial implementation of customizable headers
2015-12-15 19:02:01 +02:00
Dirk-Jan C. Binnema
e2a43e9c1f Merge pull request #732 from avar/avar/rfc-2606-compliance
Don't use real (or potentially real) domains in examples
2015-12-15 18:59:09 +02:00
Dirk-Jan C. Binnema
7054a62c47 Merge pull request #734 from avar/avar/clang-warning
mu-store: Silence confusing code that's throwing a clang warning
2015-12-15 18:57:24 +02:00
djcb
4d1a9347b5 mu4e: small doc fix
This broke Travis.
2015-12-15 18:52:38 +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
Clément Pit--Claudel
e19658c9aa Initial implementation of customizable headers 2015-12-15 07:57:51 -05:00
Ævar Arnfjörð Bjarmason
f7245d2372 mu-store: Silence confusing code that's throwing a clang warning
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 !=.
2015-12-15 12:40:40 +01:00
Ævar Arnfjörð Bjarmason
51ad75d943 Don't use real (or potentially real) domains in examples
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
2015-12-15 11:57:25 +01:00
Dirk-Jan C. Binnema
d17c2a7012 Merge pull request #731 from zakkak/contexts-doc
mu4e: Extend contexts example
2015-12-15 11:41:50 +02:00
djcb
90d2b8a1fa mu4e: some less fancy fancy chars
Try to find some fancy chars that are more universally available.
2015-12-15 10:42:24 +02:00
Dirk-Jan C. Binnema
5f73b48609 Merge pull request #730 from cpitclaudel/fix-spurious-space
mu4e: Refactor mu4e~headers-header-handler
2015-12-15 09:43:42 +02:00