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

4019 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema
80ecf80a12 Merge pull request #875 from stsquad/some-fixes
mu4e-actions: improve mbox handling for multiple marks
2016-08-02 08:08:34 +03:00
Dirk-Jan C. Binnema
501306cde8 Merge pull request #896 from avar/fix-tempfile-bug-in-831
Actually make the "write attachments" feature in d16957d work
2016-08-02 08:05:43 +03:00
Ævar Arnfjörð Bjarmason
e2ce627197 Actually make the "write attachments" feature in d16957d work
This is a follow-up to my pull request #895 which fixes another bug in
pull request #831 (d16957d).

The code to write out the attachments would never work, for what it's
worth it's clear from the issue I fixed in #895 that the codepath had
never been executed as-is.

It would find the attachments and try to write them out to /tmp/, just
that, no /tmp/NAME, just the directory itself. That would yield an
error of trying to write to a directory.

Fix that, now we create a temporary name as a function of the
attachment and both save it and extract it.

This makes the mu4e-action-view-in-browser function finally work for
me. It'll now write out the attachments to /tmp, and rewrite the HTML
so that I'll see the attachments in my browser.
2016-08-01 21:11:05 +02:00
Dirk-Jan C. Binnema
5189e6bac7 Merge pull request #895 from avar/pull-request-831-regression
mu4e: use correct args for mu4e-message-field

Fix a regression in pull request #831
2016-08-01 08:22:28 +03:00
Ævar Arnfjörð Bjarmason
dc65f0c5ec Fix a regression in pull request #831
The mu4e-message-field function was called in a way that would never
work, fix that by calling it correctly.

There's the additional follow-up TODO here that the mu4e-message-field
function itself should probably die on this sort of invocation, but I
don't know enough about elisp idioms to know how that should look.

This fixes my issue #894.
2016-07-31 23:28:35 +02:00
djcb
49bc9605d8 mu4e: add mu4e-headers-hide-predicate
Add `mu4e-headers-hide-predicate', a function that allows for hiding
messages from the display. This can be used e.g. to hide trashed
messages.
2016-07-31 13:07:27 +03:00
djcb
b5345851ee mu4e: documentation 2016-07-31 11:23:38 +03:00
djcb
f7be5ef2ff mu4e: make bookmarks a defstruct
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.
2016-07-31 11:20:59 +03:00
djcb
0d9cac49d3 mu4e: mu4e-draft: fix "typo" in face name 2016-07-27 13:08:35 +03:00
Dirk-Jan C. Binnema
94ae591cd8 Merge pull request #889 from sje30/master
Add --expr flag to constrain search when looking for duplicates
2016-07-26 09:59:50 +03:00
Stephen J. Eglen
e559b6e732 Add --expr flag to constrain search when looking for duplicates
(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.
2016-07-25 20:52:27 +01:00
djcb
c9f8ac5beb crypto: prefer gpg2
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.
2016-07-24 16:00:04 +03:00
djcb
538b7e5292 mu4e: allow for show :user-agent in message-view
Define a field :user-agent and make it showable in the view.
2016-07-24 14:30:37 +03:00
djcb
a079216f11 update NEWS.org
Add recent additions / updates.
2016-07-24 13:02:55 +03:00
djcb
a4df4927a6 mu4e: document mu4e-index-(cleanup|lazy-check)
Document the two new configuration variables, mu-index-cleanup and
mu-index-lazy-check.
2016-07-24 12:49:49 +03:00
djcb
3eda6961af mu: update mu-index manpage for --lazy-check
Describe the new --lazy-check option, and add some updated benchmarks.
2016-07-24 12:31:22 +03:00
djcb
eb7888cdb1 mu4e: support mu indexing performance options
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.
2016-07-23 21:33:10 +03:00
djcb
9477071e63 mu: add '--lazy-check' option for indexing
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.
2016-07-23 21:33:10 +03:00
djcb
2a83b02ce2 mu: cosmetic 2016-07-23 19:14:13 +03:00
djcb
c27471f4fa mu4e: compose: auto-crypt/sign crypto replies
When replying to an encrypted message, sign/encrypt by default; see
  mu4e-compose-crypto-reply-policy.

(Issue #865)
2016-07-12 00:25:05 +03:00
djcb
a24058040f mu4e: fix typo in face description 2016-07-12 00:15:29 +03:00
djcb
1945ab3bce mu4e: handle foo> citation style
Handle the citation style where the cited part is prefixed with
eg. "foo> " instead of the normal ">".

Also improve the default color scheme a bit.
2016-07-10 21:45:52 +03:00
Dirk-Jan C. Binnema
fc3b9c19da Merge pull request #877 from remvee/feature/handle-mbsync-output
mu4e: Handle mbsync output in mu4e-update buffer
2016-07-10 00:04:25 +03:00
djcb
1e963c1779 mu4e: update font-locking for mu4e-compose-mode
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.
2016-07-09 23:42:58 +03:00
Remco van 't Veer
b203226a06 Handle mbsync output in mu4e-update buffer
The mbsync command uses carriage return characters to go to the
beginning of the line.
2016-07-08 14:12:30 +02:00
djcb
b31ba3dd81 mu4e: seems the keymaps might not be defined (workaround)
Users were seeing:
,----
| Debugger entered--Lisp error: (wrong-type-argument keymapp nil)
|   signal(wrong-type-argument (keymapp nil))
|   define-key-after(nil [mu4e-hard-newlines] (menu-item "Format=flowed"
| mu4e-toggle-use-hard-newlines :button (:toggle . use-hard-newlines) :help
| "Toggle format=flowed" :visible (eq major-mode (quote mu4e-compose-mode))
| :enable mu4e-compose-format-flowed) sep)
|   mu4e-compose-mode()
|   byte-code("..." [original-msg mu4e-compose-parent-message
| mu4e-compose-context-policy winconf includes att make-local-variable put
| permanent-local t mu4e~context-autoswitch run-hooks mu4e-compose-pre-hook
| current-window-configuration nil (mu4e-draft-open compose-type
| original-msg) ((quit (byte-code "..." [winconf set-window-configuration
| mu4e-message "Operation aborted" throw --cl-block-mu4e~compose-handler--
| nil] 3))) mu4e~draft-insert-mail-header-separator mml-attach-file plist-get
| :file-name :mime-type mu4e~compose-set-friendly-buffer-name
| set-buffer-modified-p (new forward) message-goto-to message-goto-body
| mu4e~compose-type mu4e~compose-hide-headers mu4e-compose-mode delete-frame
| --dolist-tail-- compose-type mu4e-compose-in-new-frame message-exit-actions
| message-postpone-actions] 6)
|   mu4e~compose-handler(new)
|   mu4e-compose(new)
|   mu4e-compose-new()
`----
2016-07-03 23:29:05 +03:00
Alex Bennée
fdb476e225 mu4e-actions: improve mbox handling for multiple marks
This avoids prompting the user over and over if the directory hasn't
changed. I've also ensured the paths are escaped with
shell-quote-argument.
2016-07-03 08:38:26 +01:00
Dirk-Jan C. Binnema
6a42000997 Merge pull request #871 from arthurl/arthur/PR/refences-header-bug
mu4e: [FIX] references header dropped bug
2016-07-03 10:17:04 +03:00
djcb
3895052bfd Merge branch 'master' of github.com:djcb/mu 2016-07-03 10:02:23 +03:00
djcb
ddf4adc30f mu4e: try a bit harder to find the draft folder
If we can't guess the draft folder when re-editing a message, fallback
to the default.
2016-07-03 10:00:27 +03:00
Arthur Lee
8a62bc172d mu4e: [FIX] references header dropped bug 2016-06-22 01:43:59 +08:00
Dirk-Jan C. Binnema
52b7aae439 Merge pull request #852 from jschwab/improve-action-show-thread
mu4e: Improve behavior of mu4e-action-show-thread
2016-06-11 09:54:08 +03:00
Dirk-Jan C. Binnema
5228e24fbd mu4e: Merge pull request #867 from thierryvolpiatto/Fix_window_restore
Fix window restoration when C-g'ing on reply.
2016-06-09 09:23:55 +03:00
Thierry Volpiatto
fa2427e6f9 Fix window restoration when C-g'ing on reply.
* mu4e/mu4e-compose.el (mu4e~compose-handler):
Save and restore window config.
2016-06-09 07:22:56 +02:00
djcb
d3b20704dc mu4e: exclude compose buffer from desktop-saving
You can't really use drafts restored from desktop-save-mode; so exclude
them.

Fixes #860.
2016-06-08 22:29:28 +03:00
djcb
ed16684f45 mu4e: cosmetics 2016-06-08 19:25:52 +03:00
djcb
e977309de5 mu4e: don't try to open non-existent messages
When processing header updates, don't try to open a message that doesn't
exist. Fixes issue #825.
2016-06-08 19:22:41 +03:00
djcb
3e6267fd05 mu-maildir: ignore backup/temporary files
Ignore backup/temporary files, i.e., files ending in ~ or #.

Fixes #855.
2016-06-05 19:29:53 +03:00
Dirk-Jan C. Binnema
04d973a9df Merge pull request #861 from remvee/feature/hide-index-messages-customizable
mu4e: Make `mu4e-hide-index-messages' customizable
2016-06-05 18:55:49 +03:00
djcb
5656d3ee18 Merge branch 'master' of github.com:djcb/mu 2016-06-05 18:53:31 +03:00
djcb
ac1bfae196 mu4e: limit # of references to 21
Following the example of `message-shorten-references', only allow up to
21 references, since some mail servers limit them.

Fixes #859.
2016-06-05 18:49:04 +03:00
Dirk-Jan C. Binnema
db3a8c712d Merge pull request #853 from liweitianux/master
Use Unicode characters when cleaning up attachment filename
2016-06-05 17:41:07 +03:00
Remco van 't Veer
4814548318 Make `mu4e-hide-index-messages' customizable 2016-06-03 09:50:52 +02:00
Dirk-Jan C. Binnema
36571518b0 Merge pull request #858 from j-hao/master
mu4e: Make dvipng optional when convert from org to html
2016-06-01 09:07:31 +03:00
Jun Hao
fe52c0e932 mu4e: Make dvipng optional when convert from org to html 2016-05-31 20:28:57 +08:00
Aaron LI
297df938d6 Use Unicode characters when cleaning up attachment filename
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.
```
2016-05-23 19:26:04 +08:00
Josiah Schwab
fb45d70d54 Improve behavior of mu4e-action-show-thread
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.
2016-05-19 10:05:29 -07:00
djcb
54b6230adf tests: fix unit tests
Some tests weren't yet update for the new test message.
2016-05-16 13:38:10 +03:00
djcb
bd0fd4b8d8 mu4e: ensure filename is valid for removing it later
lexical-let the filename to be removed later, so it's still valid.
2016-05-16 09:22:11 +03:00
djcb
a81270583f Add unit-test for multi-to/cc recipients
To check for the report in Issue #826.
2016-05-15 16:21:20 +03:00