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.
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.
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.
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
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.
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.
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).
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.
* 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.
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.
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.
* 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.
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.
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.
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.
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.
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 '#'.
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.
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.
* mu4e/mu4e-view.el (mu4e-view-message-text):
When using `propertize' all properties added by `mu4e-html2text-command'
in html message are overwrited by `mu4e-view-body-face', so use here
`add-face-text-property' if available, otherwise behave as before and return
body unchanged.
This allows setting a custom face for the message body, e.g., if you
prefer a proportional font for the body:
(set-face-attribute 'mu4e-view-body-face nil :font "Liberation Serif-10")
Don't use our own URL-matching regexp, use the one that emacs provides
(in thing-at-point), which is a bit more general, and seems to better
handle some URLs.
Previously, the behavior of mu4e-view-headers-next-unread was that the cursor moved in the headers view but did not change the highlight nor the message in the view buffer. This patch updates the function to also select the message in the view buffer which appears to also highlight the message correctly in the header view.
In the case of encrypted and signed messages the signature field's
details box did not work due to missing flags to the mu verify command.
This commit fixes this issue.
Add a decryption field of the form
Decryption: 2 part(s) decrypted 1 part(s) failed
Meaning that 2 encrypted mime parts where successfully decrypted and 1
part failed. Note that the number 2 refers to the number of
successfully decrypted mime parts and not the number of successfully
decrypted encryptes multiparts, i.e., if an encrypted multipart
contains 4 parts and decryption is successful the field will be
Decryption: 4 part(s) decrypted
TODO: Add details button listing the names and indexes of the
decrypted (or not) mime-parts
This patch fixes the attachment extraction (open, save, temp) when using
`mu4e`. `mu4e` used to not notify the mu-server about the
mu4e-decryption-policy. As a result mu-server did not decrypt the
attachments for extract, open, or temp.
This commit replaces the call to `read-directory-name' by a call to
`read-file-name' when asking the user about the target location for
saving an attachment. This new dialog is better suited because:
1/ the user is currently saving a file, not a directory: he might want
to complete over existing files (e.g., to replace an existing file
with a new one just received).
2/ the current dialog was asking for a directory but then, if the user
enters a directory, mu4e proposes him to "override" the directory
with a file. This is not going to work obviously. In the new dialog,
it is also possible to enter a directory name instead of a file name.
In this case, a new file is created under the chosen directory name.
* mu4e/mu4e-view.el (mu4e-view-go-to-url): Add the ability to visit
multiple URLs by specifying a numeric range.
* mu4e/mu4e.texi (The message view: Keybindings): Document ability to
visit multiple URLs.
`mu4e-view-go-to-url' now behaves like `mu4e-view-save-attachment'. You
can specify multiple URLs to visit at once by prefixing the visit
command by <C-u>; so C-u g asks you for a range of URLs to visit (for
example, 1 3-6 8). The range "‘a’" is a shortcut for all URLs.