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.
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.
Until now, the bookmark queries were sent to mu in their original form. Thus,
if you have `mu4e-query-rewrite-function` set, the numbers shown next to the
bookmarks didn't reflect the actual number of query results you'd get when
opening a bookmark view.
With this commit, the `mu4e-query-rewrite-function` is applied and the result
is sent to mu for evaluation (in `mu4e~start`) and the likewise the rewritten
queries are used to find the matching one in the last query results (in
`mu4e~main-bookmarks`).
* mu4e/mu4e-utils.el (mu4e~start): Send the rewritten queries for evaluation to
mu.
* mu4e/mu4e-main.el (mu4e~main-bookmarks): Compare last mu query results with
rewritten queries.
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.
If the user is scrolling and searching through the log buffer to see
what went wrong it gets very annoying having an update change things.
To avoid this wrap all buffer updating code in a save-excursion so
point is preserved.
- introduce private function mu4e~image-width-scale:
determine the width to use for proportional scaling based on the image width, height and the max
restrictions.
- use it in mu4e-display-image
Ideally we should separate the log buffer creation code so this van be
done a bit more cleanly. For now however only set so-long-mode once
otherwise you end up spamming the messages with constant:
Changed to so-long-mode (from fundamental-mode) on account of line length. C-c C-c to revert. [36 times]
As the messages keep rolling in.
Some completion engines (like "flx") decorate the strings that they
return. If MU4E passes such a string down to MU, the "format" call
preserves the text properties in the generated S-expression, producing
an invalid query. MU4E itself has no interest in those decorations,
so strip them out as early as possible from all prompts that use
mu4e-completing-read-function.
Using mu4e-index-updated-hook in mu4e~start with a lambda is just like
adding the call to mu4e-info-handler so do it explicitely which is
much cleaner.
* mu4e/mu4e-utils.el (mu4e-info-handler): Always refresh main buffer.
(mu4e~start): Remove insertion of mu4e-index-updated-hook.
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.
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.