Commit Graph

70 Commits

Author SHA1 Message Date
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
Thierry Volpiatto 2f251209e3
Rename mmark overlay to mu4e-mark 2021-06-17 21:11:38 +02:00
Thierry Volpiatto 89538ef4fc
Only remove mark overlays in `mu4e-mark-at-point`
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.
2021-06-10 14:19:22 +02: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
Christophe Troestler 561079d868 mu4e-mark: Allow executing marks without passing a prefix argument 2021-04-12 21:59:52 +02:00
Dirk-Jan C. Binnema b68a12692f mu4e-mark: don't be too eager to avoid confirmation
Fixes: #1974.
2021-04-12 18:01:38 +03:00
Philip "Galli" Rentschler b8fe2ba682
skip confirmation when executing marks
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.
2021-04-09 16:53:48 +02:00
Dirk-Jan C. Binnema e10fc21a9b mu4e: Rename 'Unnamed' sections 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 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 c2ef02f57c mu4e: Begin each elisp summary line with three semicolons 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
Jonas Bernoulli f31d1b065d Fix typos 2019-11-06 16:13:39 +01:00
Thierry Volpiatto e4f5576cfc
Add lexical-binding to all files and fix warnings
about free variables (declare) and unused lexical vars (prefix with "_").
2019-09-16 19:54:59 +02:00
djcb f9b615c3bb mu4e: use a simple x as the 'fancy' delete mark
The 'fancy' version had some interesting interactions (see #1245), so
this is the easiest way to avoid those.

Also some flycheck fixes.
2019-03-02 11:46:34 +02:00
Alex Branham 2674ca5583
mu4e: Replace cl with cl-lib 2019-01-04 16:03:58 -06:00
Bryan Gilbert c71bc710fb Fix region bounds checking when marking headers 2017-11-08 08:34:34 -05:00
djcb 77b8f034e9 cosmetic 2017-09-17 14:02:14 +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 c115d75a50 mu4e: handle marks outside headers-view
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.
2017-03-18 10:09:10 +02:00
djcb 87ab21702e mu4e-mark: remove debug message 2016-10-25 20:19:19 +03:00
Magnus Therning fe1104a94f mu4e: Add mu4e-mark-execute-pre-hook
Add a hook that runs just before executing a mark.

Signed-off-by: Magnus Therning <magnus@therning.org>
2016-02-02 20:28:49 +02:00
Magnus Therning 974d728bd4 mu4e: re-indent function prior to mark-hook change
Signed-off-by: Magnus Therning <magnus@therning.org>
2016-02-02 20:21:38 +02:00
djcb 967b3cb727 mu4e: update copyright years 2016-01-09 21:28:03 +02:00
djcb a14b3f0e62 Replace some 'fancy' characters
They showed up as hexboxes when using the Liberation font.
2015-12-16 21:31:17 +02:00
djcb 90d2b8a1fa mu4e: some less fancy fancy chars
Try to find some fancy chars that are more universally available.
2015-12-15 10:42:24 +02:00
djcb ddcd2f39b5 mu4e: more support for fancy-chars
Re-simplify `mu4e-use-fancy-chars` to a boolean again; add some extra
mark-chars (big character, so they are easily visible). Document it.
2015-12-15 09:07:17 +02:00
Dirk-Jan C. Binnema d8ecc98349 Merge pull request #714 from avar/avar/mu4e-mark-support-mu4e-use-fancy-chars
mu4e: Add support for mu4e-use-fancy-chars to the marking in the headers view
2015-12-13 18:20:30 +02:00
Ævar Arnfjörð Bjarmason 049e182e0c Correctly spell the word "quitting" in the protocol & documentation 2015-12-09 22:40:52 +01:00
Ævar Arnfjörð Bjarmason b88cc400e7 mu4e-mark: Add fancy characters for trash / delete
As threatened in my last commit. I found this via
https://en.wikipedia.org/wiki/Miscellaneous_Symbols_and_Pictographs &
http://www.unicode.org/charts/PDF/U1F300.pdf

I could never remember which thing d and D were, this makes it easier to
remember that. I split off this patch because maybe this doesn't belong
in mu4e since some might not like the characters, but I just wanted to
be able to have this customizable.
2015-12-08 20:42:00 +01:00
Ævar Arnfjörð Bjarmason df77f7cb20 mu4e-mark: Add ability to use mu4e-use-fancy-chars for marking
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.
2015-12-08 20:38:25 +01:00
Ævar Arnfjörð Bjarmason 89eb9ee2d0 mu4e-mark: Make indentation in mu4e-mark-at-point consistent
I don't care for this mixing of tabs and spaces, but this at least makes
it consistent with the rest of the function.
2015-12-08 20:20:37 +01:00
djcb 976711c16c mu4e: support message-action when marking 'deferred'
When marking headers as 'deferred' (with '*'), and executing them ('x'),
you can now also apply arbitrary header actions to them.
2015-04-26 17:09:06 +03:00
Jean-Philippe Bernardy 73b87c16f7 mu4e: Make :show-target be the identity by default
- This is certainly a better default than crashing
- The user is likely to omit this function in a majority of cases.
2014-11-30 23:13:00 +01:00
Jean-Philippe Bernardy 28baa5a778 Fixed typo 2014-11-30 13:33:30 +01:00
Jean-Philippe Bernardy f6e5f3df7f pass the message structure to the mark actions
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))))
2014-11-30 13:33:29 +01:00
Jean-Philippe Bernardy a6c4785577 fix the target display
show the target when the shown-target is non-nil (not the target).
2014-11-30 13:33:29 +01:00
Jean-Philippe Bernardy 818eedf59f mu4e: marks: clarify the way targets are obtained.
: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.
2014-11-27 19:16:05 +01:00
Jean-Philippe Bernardy 3981f5412f documentation fix 2014-11-27 19:16:05 +01:00
Jean-Philippe Bernardy ad8488368b always recompute the dynamic target for a mark
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.
2014-11-27 19:16:05 +01:00
Jean-Philippe Bernardy a1181aa096 Put the definitions of marks in a single structure
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.
2014-11-26 21:39:17 +01:00
mjn c99ccf9a19 Lightly copyedit the documentation and docstrings 2014-08-08 13:18:29 +02:00
djcb bfda09028b * mu4e: fix byte-compiler warning 2013-12-16 21:59:47 -08:00
djcb 06b3142e60 * mu4e: check marks also when coming from mu4e-main; fixes issue #244 2013-06-29 13:06:51 +03:00
James Felix Black 7e78b6eb65 added a "untrash" function, perfectly analogous to "unflag", that simply removes the T flag from a message 2013-06-28 12:36:54 -07:00
djcb fa514435ea * merge branch 'master' of github.com:djcb/mu 2013-06-13 23:56:35 +03:00
djcb c581468ac3 * mu4e: some minor changes 2013-06-13 23:53:11 +03:00
djcb 74feeded3b * mu4e: check marks in headers context (fixes issue #200) 2013-06-08 17:32:10 +03:00