Commit Graph

403 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema 42f2e73025 mu4e-view: remove overlays when erasing
erase-buffer is not enough (you'd see '[1][2]' etc. in the buffer beginning)
2021-08-29 21:40:42 +03:00
Dirk-Jan C. Binnema a6514fd683 mu4e-server: rename from mu4e-proc
Rename mu4e-proc.el into mu4e-server.el

Rename mu4e~proc... into mu4e--server...

Update users, too.
2021-08-29 21:40:42 +03:00
Dirk-Jan C. Binnema 9157d9102d mu4e-utils: refactor into mu4e-helpers, separate files
Usurp more of the utils code than can be re-used without further dependencies in
helpers.

Split off specific parts in their own file.

After the helper/utils changes, update the rest of mu4e to take the changes into
account.
2021-08-29 21:40:42 +03:00
Dirk-Jan C. Binnema e6be09e626 mu4e-view: remove old view
Remove the pre-Gnus view, and remove the infrastructure to handle both the new
and old views.
2021-08-29 20:30:29 +03:00
Salman Mohammadi 539a946aa4
mu4e/*: fix license notice at the start of source files
At the start of mu4e/* files, the license has been wrongly attributed
to GNU Emacs instead of mu4e.

Fixes https://github.com/djcb/mu/issues/2019
2021-05-29 23:45:10 +02:00
Dirk-Jan C. Binnema 2437dc27c9 mu4e: Replace mu4e-view-use-gnus with mu4e-view-use-old
Make mu4e-view-use-gnus obsolete (it's the default now), and add a
variable mu4e-view-use-old (which must be set before starting mu4e).

Update documentation / mentions.

Load the correct view when starting mu4e, so people can customize
e.g. the keymap.

Add some sanity checking.
2021-03-16 19:57:36 +02:00
Dirk-Jan C. Binnema e2655ba34b mu4e-view: re-enable the gnus/old split
re-enable the gnus/old split (the key was re-implementing
mu4e-view-message-text for gnus)

split helpers into mu4e-view-common

as a bonus 'go to url' now also works with gnus
2021-03-10 20:53:33 +02:00
Dirk-Jan C. Binnema 316633e1b2 mu4e: unsplit the gnus/old views
Was not quite working.
2021-03-07 23:27:45 +02:00
Dirk-Jan C. Binnema f002379a87 mu: move mu-view-fields to mu-view.el
We need it in both mu-view-old and mu-view-gnus.
2021-03-07 22:03:36 +02:00
Dirk-Jan C. Binnema ed2e0ed0c3 mu4e-view: make the gnus-based view the default one
Use
  (setq mu4e-view-use-gnus nil)
to use the old one.
2021-03-07 17:35:30 +02:00
Dirk-Jan C. Binnema c1f08e1683 mu4e-view: split in -gnus and -old
Split out the gnus-based and "old" view code into separate files, and
ensure only one of them is loaded.

Do some initial cleanups, more will follow.
2021-03-07 16:42:55 +02:00
Thierry Volpiatto 117f438e10
Fix error in mu4e-view-gnus-save-mime-parts
where `handle' may not be a list (here a marker when I had error).

So ensure it is a list.
2021-02-23 21:24:44 +01:00
Christophe Troestler a1664d2189 Fix the decoding of accents in Gnus view
Followup on https://github.com/djcb/mu/issues/1823
Fixes https://github.com/djcb/mu/issues/1886
2021-01-16 12:38:41 +01:00
Dirk-Jan C. Binnema 5ca25e9e89
Merge pull request #1898 from Chris00/describe-binding
Restore C-h b default behavior
2021-01-15 21:16:26 +02:00
Dirk-Jan C. Binnema bcd96d8a1e mu4e-view: use mm-insert-file-contents
Which should avoid some encoding troubles.
2021-01-15 21:07:38 +02:00
Christophe Troestler 4acfce6e2c Restore C-h b default behavior
Fixes https://github.com/djcb/mu/issues/1842
2021-01-13 11:49:32 +01:00
Dirk-Jan C. Binnema 5213adeb2c
Merge pull request #1875 from thierryvolpiatto/save_attachment
Fix #1790 by providing mu4e-view-gnus-save-mime-parts
2021-01-11 09:45:12 +02:00
Dirk-Jan C. Binnema 4dbc6ac399 mu4e-view: Use 'mu4e not "mu4e" when extracting
And param is a string.

Fixes: #1869.
Fixes: #1865.
2021-01-03 15:27:16 +02:00
Thierry Volpiatto 00651acaab
Fix #1790 by providing mu4e-view-gnus-save-mime-parts
in replacement of mu4e-view-save-attachment-multi for gnus viewers.

The alias mu4e-view-save-attachment have been replaced by a wrapper function
that calls either mu4e-view-save-attachment-multi or
mu4e-view-gnus-save-mime-parts depending of the context.
2020-12-27 09:46:18 +01:00
Thierry Volpiatto 4830e7de14
Remove null byte added probably by error 2020-12-26 08:49:19 +01:00
Thierry Volpiatto 0fbe6edc4e
No need to call `read-only-mode` when buffer is already read-only
In mu4e~view-gnus, mu4e-view-mode derive from gnus-article-mode which derive
from gnus-mode which derive from special-mode:
(get 'mu4e-view-mode 'mode-class) => special.
2020-11-16 07:48:33 +01:00
Dirk-Jan C. Binnema df0f78d891
Merge pull request #1836 from thierryvolpiatto/disable_mm-verify-option
Disable `mm-verify-option` let-bounded in `mu4e~view-gnus`
2020-11-15 17:20:23 +02:00
Thierry Volpiatto 41682af7b1
Disable `mm-verify-option` let-bounded in `mu4e~view-gnus`
When this option is set to 'known and the needed key is not yet in the user's
keyring, mu4e may hangs forever unable to verify email so lets user set this
variable globally to 'never to prevent this issue.
2020-11-15 08:19:15 +01:00
Thierry Volpiatto 0109172ad4
Use functions instead of lambdas in add-hook calls 2020-11-13 11:38:50 +01:00
Dirk-Jan C. Binnema 861194f9a1 mu4e-view: insert-file-contents (gnus mode)
It seems the earlier version (using insert-file-contents-literally, then
trying to fix it has some problems)

HT: thierryvolpiatto

Fixes: #1823.
2020-11-11 21:57:29 +02:00
Dirk-Jan C. Binnema 4985f5c959 mu4e: Improve personal-address handling
Make mu4e-personal-address-p safe for being called with nil.

Upgrade code that used mu4e-user-mail-address-p to
mu4e-personal-address-p.

Update docs.

Add some more helpers to mu4e-message, and avoid some byte-compiler
warnings.
2020-10-19 22:39:25 +03:00
Dirk-Jan C. Binnema 5e069d9a6f mu4e: support regexp patterns for personal addresses 2020-10-17 15:38:24 +03:00
Dirk-Jan C. Binnema f18044f5b7 mu4e: gnus-view: Make sure to clean up gnus mm buffers (typo)
Fix typo in previous.
2020-08-09 17:17:23 +03:00
Dirk-Jan C. Binnema 0d6bf906fe mu4e: gnus-view: Make sure to clean up gnus mm buffers
After leaving a gnus-view buffer, we should clean up the the mm-*
buffers it creates; we were leaking those.

Fixes issue #1781
2020-08-09 17:12:40 +03:00
Dirk-Jan C. Binnema 6d73ca8ec3 mu4e: fix mu4e~proc-view-path
Ensure parameters match.
2020-07-25 17:20:39 +03:00
Dirk-Jan C. Binnema 3dc4b93989 mu4e/server: implement mark-as-read for (view ...)
Instead of a multi-step process to display an unread message (ie. get
the original, notice it's unread, then update it, replace the message
with update one etc.), we now handle that in the (view /./..) command on
the server side.

Simplifies things, and is faster (which could be noticeable, esp. if
e.g. signature verification is part of the process)
2020-06-13 16:56:41 +03:00
Dirk-Jan C. Binnema 73be015cd0 fixup: mu4e: some cleanups / bytecomp warning fixes 2020-05-28 10:21:16 +03:00
Dirk-Jan C. Binnema 57d38aa707 mu4e: honor truncate-string-ellipsis
Use truncate-string-to-width and thus honor truncate-string-ellipsis; so
to get 'fancy' ellipsis, one can set:
   (setq truncate-string-ellipsis "…")
2020-05-25 18:34:42 +03:00
Marcel van der Boom fa5b181e25 Merge remote-tracking branch 'upstream/master' 2020-05-19 09:09:08 +02:00
Marcel van der Boom 01736c9a65 Add missing space between signature verification and signers 2020-05-19 09:08:30 +02:00
Dirk-Jan C. Binnema 1c88651f41 mu4e: remove easy-accounts / no-trash-providers for now
The code still has some problems, and the original author has moved
elsewhere (which is fine of course), but it's not ready enough for
1.4.... yet. So let's remove it for now and check again with 1.5+.
2020-05-18 18:56:15 +03:00
Dirk-Jan C. Binnema f016f257f9 mu4e: support 'no trash flag' for all mark-for-trash
Use a non-macro implementation for mu4e-(view|headers)-mark-for-trash,
and honor the no-trash flag.

Fixes #1687.
2020-05-16 12:43:23 +03:00
Jonas Bernoulli 564d892701 Fix typos 2020-05-12 23:56:55 +02:00
Derek Upham d17abfc324 Make mu4e~view-message available to mu4e-view-mode-hooks.
This requires setting the buffer-local variable before calling the
major mode function, and protecting the variable from the standard
mode-change cleanup.
2020-05-06 20:23:29 -07:00
Dirk-Jan C. Binnema 1919146b94 mu4e: centralize mode-line context setting code
Add mu4e-context-in-modeline to handle all setting of context in the
mode-line, to address some corner-cases with the current setup.
2020-05-01 22:44:45 +03:00
Dirk-Jan C. Binnema b37569964a mu4e-view: fix gnus-button click for emacs 26
There are some behavioral differences causing the RET binding in emacs
26.3 (an possibly others) to be active even in gnus mode; this breaks
clicking URLs.

Attempt to work around that.
2020-04-21 00:09:45 +03:00
Alex Murray 43dd60e523
Fix displaying ical attachments after PR #1633 2020-04-08 13:29:16 +09:30
Christophe Troestler ed123431db Fix displaying ical attachments with no charset
Fixes https://github.com/djcb/mu/issues/1625
2020-04-05 22:58:20 +02:00
Dirk-Jan C. Binnema f8774ff98c mu4e: support prefix arguments with mu4e~native-def
Fixes #1611.
2020-03-11 20:47:25 +02:00
Dirk-Jan C. Binnema 59fb743851
Merge pull request #1607 from yellowmoneybank/typo
Fix Gnus typos
2020-03-06 21:16:19 +02:00
Philip K d4b40ac202 Unquoted mu4e-view-use-gnus in unless form 2020-03-06 15:31:20 +01:00
Philip K 5b570cee20 Fix Gnus typos 2020-03-06 15:30:36 +01:00
Dirk-Jan C. Binnema c3771cba3e Merge branch 'gpg' 2020-03-05 22:40:16 +02:00
Moritz Müller 090ff42c50 mu4e: Add a mime-type-check when importing a pgp-key from an attachment 2020-03-05 22:39:45 +02:00
Moritz Müller 81e0c49084 mu4e: Add option to attachment-options to import gpg public key
This pull request adds an option to the attachment-options that allows
to import pgp-public-keys.
2020-03-05 22:39:33 +02:00
Dirk-Jan C. Binnema d31dc8e69c mu4e: update menus
Avoid some gnus things we do not support. Rename View/Headers menu into Mu4e.
2020-03-05 20:50:51 +02:00
Dirk-Jan C. Binnema 5ffe878d30
Merge pull request #1605 from yellowmoneybank/mm
mu4e: Fix of the attachment actions
2020-03-04 21:18:25 +02:00
Moritz Müller 4cc057ee0a Fix of the attachment actions
With the current version of the mu server, it is not possible open
attachments, because the server expects symbols as parameters, but
mu4e sends strings.
This change fixes this.
2020-03-04 10:55:35 +01:00
Dirk-Jan C. Binnema 58b462d4c3 mu4e-view: fix typo 2020-03-02 23:20:12 +02:00
Dirk-Jan C. Binnema 0465b273d3 mu4e: avoid mu-side crypto in gnus-mode
No need to decrypt/verify when we don't use the results.
2020-02-28 00:43:08 +02:00
Dirk-Jan C. Binnema 6b2bdf4f6d mu4e: avoid some errors when flipping through messages
Use special-mode for the loading buffer, and explicitly ignore n/p.

Fixes #1443.
Fixes #1217.
2020-02-27 23:15:04 +02:00
Dirk-Jan C. Binnema 81d47bf21f mu4e-view/gnus: do not load external images
Avoid tracking. Fixes #1434.
2020-02-27 00:44:49 +02:00
Hans-Peter Deifel 333067d47b mu4e: Fix quoting in M-q keybinding definition
In the keybinding defintions for mu4e-view-mode-map, the variable
mu4e-view-use-gnus was used quoted in an if condition, which means that the
condition always evaluated to true. Therefore, M-q would always be bound to
article-fill-long lines and never to mu4e-view-fill-long-lines.
2020-02-22 10:50:22 +01:00
Christophe Troestler e1db731f7d mu4e-view: (gnus) Remove duplicate bound variable
Fixes https://github.com/djcb/mu/issues/1269
2020-02-21 08:28:01 +01:00
Christophe Troestler a132f5c21f mu4e-view: (gnus) enable displaying custom headers
insert custom headers / mu4e specific headers when in gnus mode
2020-02-19 20:55:22 +02:00
Dirk-Jan C. Binnema e10fc21a9b mu4e: Rename 'Unnamed' sections 2020-02-18 23:49:50 +02:00
Jonas Bernoulli fe7a0e4da2 mu4e: Move various definitions into a better location 2020-02-18 23:49:50 +02:00
Jonas Bernoulli 74332947a0 mu4e: Split libraries into outline sections 2020-02-18 23:49:50 +02:00
Jonas Bernoulli 040c6578be mu4e: Place provide forms in their own sections
Use "_" as the title of that section so that it is less distracting
when sections are collapsed to get an overview of the library.

Using a separate section is useful because it reduces the risk of
accidentally into the middle of a library.
2020-02-18 23:49:50 +02:00
Jonas Bernoulli 6c58a311d1 mu4e: Add missing mandatory "FILE ends here" library footer 2020-02-18 23:49:50 +02:00
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
Jonas Bernoulli 6d581c4ca0 mu4e~view-define-mode: Place doc-string in correct position 2020-02-17 14:28:00 +01:00
Jonas Bernoulli 9f26819efb mu4e: Demote a few broken commands to functions
It would was not possible to interactively invoke these functions
because their `interactive' form does not provide all the mandatory
arguments.
2020-02-17 14:28:00 +01:00
Jonas Bernoulli 6790c0d015 mu4e: Fix indentation 2020-02-17 14:28:00 +01: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
Christophe Troestler 8e3f7ba64a Load gnus-art when compiling
Commit edce635416 only loads it
dynamically when executing the function mu4e~view-gnus but as a
consequence many variables are undefined at compile time and, more
importantly, it is no longer possible to override the variable
gnus-display-mime-function with a let binding before calling
gnus-article-prepare-display
2020-01-27 15:24:39 +01:00
Thierry Volpiatto edce635416
Avoid loading all gnus package
when not necessary.

* mu4e/mu4e-view.el (mu4e~view-gnus): Require gnus-art here instead on
top of file.
2020-01-21 09:49:40 +01:00
Pedro Ribeiro Mendes Júnior 7b5195da89 mu4e: define mu4e-view-actions with defcustom instead of defvar
It allows the customization directly from Emacs Custom mode.  It is
done in a similar way as for `mu4e-view-attachment-actions'.
2019-12-31 13:20:15 -03:00
Jonas Bernoulli f31d1b065d Fix typos 2019-11-06 16:13:39 +01:00
Dirk-Jan C. Binnema 3a8ceeea92 mu4e: disable K bindings in view
We don't support the K- bindings in the gnus-view, so let's avoid the
error.
2019-10-14 20:39:23 +03:00
Dirk-Jan C. Binnema 581785abe9 mu4e: view: disable some bindings for the gnus-based view
Disable some of the key-binding that don't quite work for the gnus-based
view. We'll probably want a gnus-view specific set of bindings, but at
least for now avoid the errors.
2019-09-16 22:02:16 +03:00
Thierry Volpiatto 9ddd035a1e
Completely use cl-lib and lexical-binding
Previously both cl-lib.el and cl.el were used, now use only cl-lib.el.
Use lexical-binding where needed instead of requiring cl just for
`lexical-let`.
Replace some add-to-list with cl-pushnew as add-to-list is not
recommended in lisp program and anyway doesn't work properly with
lexical binding.
2019-09-14 12:39:51 +02:00
Christophe Troestler 121bb00278 mu4e (ical): Make sure all user emails known to mu4e are used for ical events 2019-07-13 14:07:10 +02:00
Christophe Troestler 1078fee2c5 mu4e (ical): Allow to reply to icalendar invitations
Fixes https://github.com/djcb/mu/issues/994
2019-07-13 14:07:03 +02:00
djcb a2c27c0c5a mu4e: construct attach map even when not showing header
This is a bit of hack, but solves the problem; even when not _showing_
the attachments-header, construct the corresponding map, so the
keybindings work.
2019-04-27 08:38:53 +03:00
Dirk-Jan C. Binnema d979efb9c5
Merge pull request #1374 from Chris00/prepare-display
mu4e: Increase `max-specpdl-size' when decoding messages
2019-04-27 08:21:10 +03:00
Pierre Neidhardt bbc055d75a mu4e: Implement mu4e-*-mark-or-move-to-trash (e.g. for Gmail) 2019-03-04 15:46:54 +01:00
djcb 31f73b32a7 mu4e: make mu4e~view-message buffer-local
So we don't leak it outside mu4e. `mu4e-message-at-point` should do the
right thing.
2019-02-25 21:49:41 +02:00
Christophe Troestler 4e7c2cd24f mu4e: properly display messages in the draft folder (with gnus) 2019-02-10 13:43:55 +01:00
Christophe Troestler 4b868e742f mu4e: Remove article-de-*-unreadable which prevent decoding 2019-02-10 13:10:44 +01:00
Christophe Troestler d9066d869a Increase `max-specpdl-size' when decoding messages
Some messages (e.g. Outlook automatic replies) need a greater value
than the default one of `max-specpdl-size' to be displayed properly.
2019-02-02 15:47:22 +01:00
djcb 156c421113 mu4e: fix some gnus body decoding issues
Hat-tip: Chris00
2019-02-02 13:44:49 +02:00
Alex Branham 2674ca5583
mu4e: Replace cl with cl-lib 2019-01-04 16:03:58 -06:00
djcb ff4280d687 mu4e-view: some flycheck warning fixes 2018-12-01 12:55:44 +02:00
djcb fa73d6fd8e mu4e-view: use permanent-local, activate mu4e-view later
Mark some variables as use permanent-local so they'll survive a
major-mode change. Activate mu4e-view later, so hooks have some more
material to work with.
2018-12-01 12:55:44 +02:00
Oleh Krehel 6a8bbbd55f mu4e/mu4e-view.el (mu4e-view-open-attachment): Ensure attachments are set
Before this change, I would press "o" and `mu4e~view-attach-map' would
be nil. Now it works as expected.
2018-11-18 16:22:39 +01:00
djcb 700e5e76da mu4e-view: switch mode before filling message
That way, the attachment map etc. stay valid.
2018-11-07 21:24:02 +02:00
djcb 7dcb9087c2 mu4e: enable mu4e-view *before* internal processing
So, user gets a pristine message, and hashes etc. are still valid (since
they don't survive mu4e-view-mode)
2018-11-05 18:39:56 +02:00
djcb d5a4ba06ce mu4e: switch to mu4e-view later (internal)
When using 'internal' mode, activate mu4e-view-mode only after the
buffer has been set up, so hooks have some more interesting material to
work with.
2018-11-04 12:31:32 +02:00
djcb f8a5daa666 gnus: handle more non-ascii
Fix character decoding issues for some (but not all) messages. This to
Chris00 for this work on this!
2018-09-02 16:43:06 +03:00
djcb 1d0b24afcf mu4e: activate mode before getting attachments/links
So the relevant hash-maps are valid (they would be nillified by changing
the mode otherwise).
2018-08-16 22:48:20 +03:00
djcb abf02000ec mu4e: clean up mu4e~view-internal a bit 2018-08-14 22:20:32 +03:00
djcb 82e7d7c65d mu: better handle updating mail being viewed
instead of the the 'noupdate', add 'noview', so the headers still get
update but we don't render unread mail twice.
2018-08-14 21:59:41 +03:00
djcb a4398ac93d mu4e/mu: optimize mark-as-read
Since cd649efb6b, opening an unread message first does a proc-move,
then proc-view.

Reason is that while we get the (:update ... ) from the move, that only
contains a skeleton message; we need the full view get images etc. This
means that we render the message _twice_.

Here we change add a flag for move to _not_ send the (:update ..), so
only the (:view ...) will trigger rendering of the message.
2018-08-12 14:00:59 +03:00
djcb d106e0e03b mu4e-view: ensure buffer is named *Article* (gnus mode)
Some of the gnus internal code depends on that.
2018-06-13 22:24:47 +03:00
djcb acb68f5551 mu4e: disable some keybindings for the gnus backend 2018-06-13 16:58:41 +03:00
djcb 36ce14e705 mu4e: view/gnus: support verifying signed mails
Hook up with gnus' verification for signed mails.
2018-06-13 13:22:47 +03:00
Dirk-Jan C. Binnema 4fb5d11d9f
Merge pull request #1243 from avar/render-urls-with-space-before-number
mu4e: view: render URLs as "<url> [%d]" not "<url>[%d]"
2018-06-12 09:23:14 +03:00
Ævar Arnfjörð Bjarmason 6c8aec38be view: render URLs as "<url><zwp>[%d]" not "<url>[%d]"
When we render URLs like https://gnu.org/[1] right-clicking on them in
e.g. GNOME Terminal will also copy the "[1]" as well as the URL,
inserting zero-width-space[1] between the two avoids this.

I know about "g" (mu4e-view-go-to-url), but sometimes I want to open a
URL in a different browser, or copy it into a non-Emacs program. This
makes that easier. I think this improves the UI at a very trivial cost
to users that don't care about this use-case.

I could make this configurable, but unless someone vehemently objects
to this I don't see the point of not just making it the default.

In GNOME Terminal a ZWS is rendered simply as a space, and
copy/pasting works as expected, but in Emacs's GTK GUI there's no
space between the two.

This was initially a plain ASCII space character, but djcb preferred a
ZWP, and this works as well.

1. https://en.wikipedia.org/wiki/Zero-width_space
2018-06-11 22:10:56 +02:00
djcb 088064d5e1 mu4e: define the view-mode when needed
Define the view-mode (gnus or internal) just before it's needed. This
ensures that (when in gnus mode) it's really a gnus-article-mode
derivative, so more of the gnus specifics work.
2018-06-08 10:01:55 +03:00
djcb ee6e91da9b mu4e: auto decode quoted-printable, base64 (gnus)
Set things up so gnus article mode decodes base64 and quoted-printable
messages automatically.

Don't try to set up URL links.
2018-06-07 13:13:37 +03:00
djcb d01bdfa7b4 mu4e: add decoding support for gnus' article-mode
Decode Gnu's articles as expected; thanks to Lars Ingebrigtsen for his
advice.
2018-06-05 17:42:09 +03:00
djcb cd649efb6b mu4e: re-view after marked-as-read
When we mark a message as read, we get an (:update ... ) with the
marked-as-read message (ie., moved from new/ to cur/).

The (:update ...) however does _not_ include extracted images etc.; so
images in unread message would not be visible at that time. To fix this,
to another (:view ...) and extract the images etc.

Thanks to tangxinfa for pointing this out.
2018-04-25 11:35:52 +03:00
djcb 260a8bb629 mu4e-view: use Gnus' article mode (experimental)
Add a defcustom `mu4e-view-use-gnus`, which, when `t', use Gnus'
article-mode for displaying messages instead of mu4e's built-in mode.

This is experimental, and a view messages do not display
correctly yet (base64-encoded bodies).
2018-04-24 14:58:39 +03:00
Dirk-Jan C. Binnema 97ad4baea7
Merge pull request #1134 from jabranham/master
mu4e: simplify what "e" does in mu4e-view mode
2018-01-23 22:56:32 +02:00
Dirk-Jan C. Binnema 82743b3164
Merge pull request #1148 from thierryvolpiatto/mu4e-view
Fix again #1141 (mu4e-view-mode-hook should run after text insertion)
2018-01-06 15:01:32 +02:00
djcb 9ecc610e14 mu4e: some doc fixes 2017-11-04 15:06:45 +02:00
Thierry Volpiatto fc4e2c743b
Merge branch 'master' into mu4e-view 2017-11-04 13:03:40 +01:00
Dirk-Jan C. Binnema d87b97e0fb
Revert "Ensure mu4e-view-mode-hook run after text insertion" 2017-11-04 13:36:43 +02:00
Thierry Volpiatto 70d4d56db5
Run mu4e-view-mode without its hook (#1141)
before text insertion and run finally the hook at end.
This ensure local variables are not killed after being set.
* mu4e/mu4e-view.el (mu4e-view): Do it.
2017-11-04 05:50:03 +01:00
Thierry Volpiatto 2eccd7df90
Keep original indentation
Only whitespace changes.

* mu4e/mu4e-view.el (mu4e-view): Do it.
2017-10-29 11:51:28 +01:00
Thierry Volpiatto 8db567c980
Link urls after running `mu4e-view-mode`
* mu4e/mu4e-view.el (mu4e-view): `mu4e~view-make-urls-clickable`
should run after `mu4e-view-mode` otherwise an error popup telling the
hash-table storing links is nil.
2017-10-29 07:43:00 +01:00
Thierry Volpiatto 0a36c8431a
Ensure mu4e-view-mode-hook run after text insertion
* mu4e/mu4e-view.el (mu4e-view): Do it.
2017-10-29 06:54:13 +01:00
Alex Branham 7f16b7422d
mu4e: simplify what "e" does in mu4e-view mode
The default was to use e to save one attachment or C-u e to save multiple. This
simplifies it so that e simply offers to save one or many attachments.
2017-10-09 14:15:51 -05:00
djcb 2811370d7e mu4e: fix some compiler warnings in mu4e-view 2017-09-02 15:37:35 +03:00
djcb 3a8748c549 mu4e: display signers in signature header
Display the signers in the signature headers, so users can easily very
that a verified signed message was indeed signed by the expected sender.

We can't check using 'From:' automatically as that gives too many false
negatives.
2017-08-27 17:33:37 +03:00
djcb e735e70fa4 mu4e: add untrash to mu4e-view
The untrash function was not defined; let's add it.
2017-06-17 12:00:20 +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 98b998b86d mu4e: remove mu4e~compose-browse-url-mail
Instead, rely on the common browse-url-mail, which does the right thing
after
  (setq mail-user-agent 'mu4e-user-agent)
2017-04-08 15:25:38 +03:00
Titus von der Malsburg 79ad110737 mu4e: Added menu items for untrash 2017-02-14 12:02:56 +01:00
djcb 4c9a8ea112 mu4e: filter out body parts as attachments
Make the attachment heuristic yet a bit more complicated... filter out
most body parts.
2017-02-12 11:33:01 +02:00
djcb 1c4dbe580c mu4e: show inline text/plain as attachment
Show inline text parts as attachments too, so we can save them; however,
filter outer really small ones (ie. footers)
2017-02-12 11:11:16 +02:00
Thierry Volpiatto 3e865ca71f Add some improvements in attachment actions.
* mu4e/mu4e-view.el (mu4e-view-attachment-action):
Handle multi save in mu4e-view-attachment-action.

* mu4e/mu4e-view.el (mu4e-view-attachment-actions):
Make mu4e-view-attachment-actions a defcustom and add some options.

New user variable mu4e-view-attachment-assoc.

* mu4e/mu4e-view.el (mu4e-view-attachment-assoc): New.
(mu4e-view-open-attachment-with): Use it.
2016-12-19 09:32:17 +01:00
djcb 68fd3b71d3 mu4e: fix toggling between html/text 2016-11-27 14:34:50 +02:00
djcb b2cfc02010 mu4e: mark attachment-actions non-interactive
mu4e-view-pipe-attachment, mu4e-view-open-attachment-with and
mu4e-view-open-attachment-emacs are not interactive, so don't mark them
as such.
2016-11-12 14:00:11 +02:00
Antoine Levitt bc13cfda35 dont erase global-mode-string with context label, but add to it 2016-10-26 08:20:25 +02:00
Jun Hao 0926ac6867 mu4e: show '...' when header field folded and keep text-properties 2016-08-28 10:39:37 +08:00
Dirk-Jan C. Binnema 2507933176 Merge pull request #893 from j-hao/master
mu4e: Allow header fields with more than one lines to fold to one
2016-08-13 23:01:50 +03:00
djcb 49ea3bec58 mu4e: update html/URL handling
Make mu4e-view-toggle-html _not_ toggle the global value of of
mu4e-view-prefer-html, but only the current one.

Make the link map 'permanent', so it survives the buffer changes when
refreshing. This fixes issue #904.
2016-08-13 10:57:49 +03:00
Jun Hao 2d5475e7ed mu4e: Allow header fields with more than one lines to fold to one
Fix #803
2016-07-30 01:10:26 +08: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 7ac4921902 mu4e: improve mu4e-view-message-with-message-id
Now, when going to a message with certain message-id, do open a headers
buffer as well. This way, message opened this behave just like an other
message, and can be delete, flagged etc.

As a bonus, you get the whole message thread for a given
message (depending on settings)

mu4e-view-message-with-message-id now does a search and
mu4e-headers-search allow for some extra actions to open a specific
message in a hook function.
2016-02-23 23:19:54 +02:00
djcb faf453d538 mu4e: resend: add to view/headers menu
Add `mu4e-compose-resend` to the menus in the headers and view
modes. Don't add a shortcut, as it's a fairly rarely needed feature, and
might be confusing if invoked accidentally.
2016-02-16 08:29:06 +02:00
djcb d9fcfc6ddc mu4e: cosmetics 2016-01-10 13:08:18 +02:00
djcb 82e7ba051f mu4e: add mu4e-view-fetch-url for downloading URLs
Add mu4e-view-fetch-url for fetching (downloading) URIs linked to in
e-mails. Add the 'f' keybinding for this, and document it.

Based on code by inigoserna.
2016-01-10 13:06:10 +02:00
djcb 967b3cb727 mu4e: update copyright years 2016-01-09 21:28:03 +02:00
djcb 9da7fbb3de mu4e: cosmetics 2015-12-30 15:35:26 +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 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 f621003658 mu4e: context: integrate with the views
Show the current context in headers, view and main mode; add
keybindings.
2015-12-13 17:46:02 +02:00
Ævar Arnfjörð Bjarmason 049e182e0c Correctly spell the word "quitting" in the protocol & documentation 2015-12-09 22:40:52 +01:00
djcb 706c9e0ea9 mu4e: fix compiler warning 2015-12-04 23:19:32 +02:00
Martin Yrjölä d37385030f mu4e: Fetch markpair in interactive declaration
This makes it possible to bind mark shortcuts in view-mode for certain
markpairs.
2015-11-29 16:42:30 +02:00
Ævar Arnfjörð Bjarmason 4cffcfa440 mu4e-{view,headers}: Refactor a (lamba) kbd-bound function into a named function
Because this was a lambda C-h m would just show "??" instead of the
function name, and the documentation would be really confusing since it
showed the deparsed lambda function instead of the function name being
called.

Fix this by refactoring both the view & headers [ and ] functions into
named functions, and make their shared logic new internal
mu4u~{headers,view}-* functions.
2015-11-22 22:32:05 +01:00