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.
Split off the search functionality from mu4e-headers.el into a new
mu4e-search.el.
Clean up things a bit and create a minor mode in which to add the keybindings.
Enable this in main/headers/view.
mu4e reuses the default gnus-blocked-images, but sadly in the mu4e
context, the default (a function called gnus-block-private-groups) does
_not_ work (i.e., it never blocks).
Advise this function so it'll block for mu4e as well, and update the
docs.
Fixes: #2072.
Skip invisible text at BOL possibly hidden by
the end of another invisible overlay covering
previous EOL.
This patch affects people using mu4e-thread-folding-mode but change nothing
when using mu4e as it is.
This fixes the issue introduced by 50f6f539 where header navigation
would break when `visual-line-mode' was enabled. Previously,
`forward-line' was used in `mu4e-view-headers-next', which disregarded
visual lines and moved by logical lines, but this was changed to
`line-move', which moves by visual lines when `line-move-visual' is
non-nil (the default when `visual-line-mode' is enabled). Thus, when
the current header line was wrapped and a message was open in the
split view, `mu4e-view-headers-next' would move to the next visual
line in the headers buffer (the same message), and then jump back to
the start of the previous line, preventing switching to the next
message.
This would also throw off navigation when `mu4e-view-headers-next' was
used with a prefix argument, since it would move by visual lines and
not headers.
`line-move-visual' is therefore set to nil before using `line-move' to
prevent these issues.
This change is needed because forward-line doesn't honor this variable, more
generally visual lines.
Using `next-line` instead of `forward-line` allows this but it is more focused
on interactive use, so use `line-move` which handles visual lines without
warnings and return 0 or 1 just like `forward-line`.
This prevent deleting overlays added by third party packages working as well
with overlays in mu4e-headers e.g. thread-folding , and probably in mu4e
itself as well with future features. Also having a named overlay allows in
future features to modify any other overlays but these one.
As it is this patch doesn't modify the actual behavior.
Previously helm-comp-read-use-marked was bound also when completing on
a directory for saving attachments (when using a prefix argument). This
returned a list with the selected directory, which caused an error.
The bug-reference mode in Emacs 28 has support for several kinds of auto-setup,
one of them being for mail customizable by the variable
`bug-reference-setup-from-mail-alist`. Add mu4e support for that so that users
can simply do
(add-hook 'mu4e-view-mode-hook #'bug-reference-mode)
and have it working.
Also squash one byte-compiler warning about the (at compile-time) undefined
variable `gnus-article-buffer`.
* mu4e/mu4e-utils.el (mu4e-view--try-setup-bug-reference-mode): New function.
Users usually have `<home>` and `<end>` bound in their configuration,
for Spacemacs the default is “move-beginning-of-line” and “move-end-of-line”.
The mu4e view mode should not rebind basic navigation keys like these.
Reimplement the browser view code for the gnus-based viewer; and let
gnus handle it too.
On change is that we currently only support showing html-messages.
I originally sent some code to the mailing list in 2012 to use dired
for marking attachments.
https://groups.google.com/g/mu-discuss/c/OPwdNZbB5GE/m/hnjNlNoLIu8J
As the function in gnus.el has since been fixed, the version of
gnus-dired-mail-buffers now works fine with mu4e (and has done for
many years). I suggest deleting the old code to make the
documentation simpler assuming that people are no longer on Emacs from
9 years ago.
When running `u4e-mark-execute-all` with any prefix-arg you can skip the confirmation-prompt. The potential for accidentally hitting this is quite low.
When an ics file is attached but not visualized by default, this is
necessary in order trigger the bug workaround in the advice attached
to `gnus-icalendar-event-from-handle'.
This composes the response before any hook is run which is important
so that, if those hooks modify the message, they are aware that some
MML is present. In particular, this is needed to have the
compatibility with the org-msg package; see
https://github.com/djcb/mu/issues/1956
Emacs has several standard keybindings
C-x m compose-mail
C-x 4 m compose-mail-other-window
C-x 5 m compose-mail-other-frame
This patch fixes the creation of new mail buffers to respect the
latter two keybindings, C-x 4 m and C-x 5 m.
Note that there is already the variable mu4e-compose-in-new-frame
which if true opens in a new frame. That will still work for C-x m
and C-x 5 m, but if the user runs C-x 4 m, it switches to other-window
as it assumes the keybinding takes precedence. This behaviour can be
changed within mu4e~draft-open-file.