Make the structures use for mu4e-bookmarks a defstruct, and update its
usage throughout the codebase. This makes it a bit easier to read and
extend.
Ensure that the old-style bookmarks are automatically converted.
(mu:for-each-message ...) allows an optional expression to be passed
so that only messages matching that expression are searched when
looking for duplicates.
This patch adds a --expr flag so that e.g.
find-dups.scm --expr d:6m..3m
will reduce the range of messages to those between 3 and 6 months ago
to search for duplicates. I found this useful when using expressions
to find messages in a particular year, rather than searching the whole
database. This is often quicker and less worrying than searching the
whole database.
If --expr is not provided, expr should default to #t so that the whole
database is searched as before.
Can't say I fully understand what's going on, but it seems gpg-before-2
has some trouble with its agent, at least when using
gnome-session (which stopped using gnome-keyring as a gpg-agent since
Fedora 23 at least).
Sanity seems to be restored when preferring gpg2 instead. "gpg" is used
when gpg2 isn't there; and there's the MU_GPG_PATH env variable to
override all of that.
Add two variables mu4e-index-cleanup and mu4e-index-lazy-check, which
correspond to mu index option --lazy-check and --nocleanup.
Extend the mu server protocol a bit to handle this.
The defaults keep things behaving as they done before.
Add an option --lazy-check to ignore any directories that don't have
their ctime changed since the last indexing operation.
There are a few corner-cases (such as editing a message outside mu's
control) where this might miss a change, but apart from that, makes
indexing in for a maildir (and its sub-maildirs) almost a no-op if there
were no changes.
mu4e was making a vain attempt to fontify the compose buffer; this
doesn't work because message (from which mu4e-compose-mode derives) uses
font-locking for that.
So, instead, remap the message-mode faces to the ones used for mu4e.
Improve the function ``cleanup_filename()`` of ``lib/mu-msg-part.c`` to
use Unicode characters when replacing the control characters, slashes
and colons with ``-``.
Originally, this function just use plain C characters (i.e., assuming
ASCII string) when checking each character is or not a control character,
slash or colon. However, when the attachment filename contains non-ASCII
(e.g., Chinese characters), all the non-ASCII characters are replaced
with ``-``.
For example:
* Before:
```
> mu view test_chinese_attachment_filename.eml
From: Tester <tester@example.com>
To: Example <example@example.com>
Subject: Test email with attachment of Chinese filename
Date: Mon 23 May 2016 05:22:09 PM CST
Attachments: 'attachment-test.txt', '------------.txt', '-------test.txt'
Hello,
This is a simple test email with three attachments:
1. `attachment:test.txt`: filename is all English;
2. `测试附件.txt`: filename is all Chinese (exclude the extension);
3. `附件-test.txt`: filename mixes Chinese and English.
```
* After:
```
> ./build/mu/mu/mu view test_chinese_attachment_filename.eml
From: Tester <tester@example.com>
To: Example <example@example.com>
Subject: Test email with attachment of Chinese filename
Date: Mon 23 May 2016 05:22:09 PM CST
Attachments: 'attachment-test.txt', '测试附件.txt', '附件-test.txt'
Hello,
This is a simple test email with three attachments:
1. `attachment:test.txt`: filename is all English;
2. `测试附件.txt`: filename is all Chinese (exclude the extension);
3. `附件-test.txt`: filename mixes Chinese and English.
```
This patch improves the behavior of mu4e-action-show-thread. This
action now leaves the point on the message where the action was invoked,
which helps prevent losing ones' place in a long thread. When invoked
in view mode, it continues to display the message that was being viewed,
instead of returning to a header-only view.