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.
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.
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.
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.
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.
Ensure we the marks get counted correctly outside the headers view. This
avoids mu4e trying to refresh the headers buffer when we're reading a
message.
Right now we have this for showing the status of messages, e.g. whether
it has an attachment etc. But not for the "d", "D" etc. in the leftmost
column of the headers view.
This adds support for that, while bending over backwards to ensure that
anyone who's customized this in the past won't have their customizations
broken, i.e. like `mu4e-headers-trashed-mark` we can set this to a cons
cell of basic/fancy characters, but we also continue to support this
just being a string for existing users.
The next patch in this series adds a couple of non-ASCII characters to
be used for the trash / delete mark.
This allows to re-tag a message in a mark action.
Two examples of what one can do with this stuff:
1. G-mail archiving:
(archive
:char "a"
:prompt "archive"
:show-target (lambda (target) "archive")
:action (lambda (docid msg target)
(mu4e~proc-move docid nil "-N")
(mu4e-action-retag-message msg "-\\Inbox")))
2. Tagging:
(tag
:char "g"
:prompt "gtag"
:ask-target (lambda () (read-string "What tag do you want to add?"))
:show-target (lambda (target) target)
:action (lambda (docid msg target)
(mu4e~proc-move docid nil "-N")
(mu4e-action-retag-message msg (concat "+" target))))
:get-target is split into:
- :ask-target (run once per bulk operation)
- :dyn-target (run once per message)
A side benefit is that the existence of the target of a move is not
checked for every message when doing bulk moves.
This is a bug fix. Previously, recomputing was done only for refile,
which is wrong: trash target can also be dynamic, and we want to allow
the user to configure more dynamic targets.
This commit puts all what defines a mark (how to display, how to handle
targets, what action to apply, ...) in a single entry of a list. The list
is stored in a variable.
This should allow for customization of marks.