Commit Graph

56 Commits

Author SHA1 Message Date
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
djcb 4de859668c * cosmetics 2013-05-13 00:05:14 +03:00
Wataru MIYAGUNI 522f4104f9 Change refile target in region email.
Now, mark commands with region on headers view,
target of the first email is reflected in the rest of email.

```
              Date         From     Subject
--------------------------------------------
              2012-12-05   Github   ...
              2012-12-05   Yahoo!   ...
              2012-12-05   Work     ...

  refiling to

              Date         From     Subject
--------------------------------------------
r -> /github  2012-12-05   Github   ...
r -> /github  2012-12-05   Yahoo!   ...
r -> /github  2012-12-05   Work     ...
```

In this patch, change target in region email.

```
              Date         From     Subject
--------------------------------------------
r -> /github  2012-12-05   Github   ...
r -> /yahoo   2012-12-05   Yahoo!   ...
r -> /work    2012-12-05   Work     ...
```
2012-12-05 16:46:12 +09:00
Jonas Bernoulli 8a3d4c27de improve doc-strings
The first sentence should summarize the variable's or function's
purpose and it should fit on the first line.  Change existing
doc-string by:

* Move first sentence onto first line even if that makes it _a bit_
  long.
* Move additional notes out of first sentence and add them later,
  possibly as complete sentences.
* If I am uncertain whether doing the above would alter the meaning,
  _don't_ do it.
* If fitting the initial sentence on the first line would require a
  complete rewrite of the doc-string _don't_ do so unless it is very
  easy to do.
* Remove indentation from second and later lines if it is there to
  align them with the first in the source code, instead of in
  `describe-*' output.
* Make "pullet point" lists a bit more consistent.

Obviously this does not fix all problems but it's a start.
2012-11-10 14:01:17 +01:00
Jonas Bernoulli ec106e38bf fix defcustom types and improve their doc-strings 2012-11-09 13:45:19 +01:00
djcb feba2bb377 * mu4e: fix target == nil case in mu4e-mark-set (thanks to Jonas Bernoulli)
Previously when TARGET was nil, point was moved which changed the
region that is later used to determine the messages to be marked.
2012-10-29 12:25:07 +02:00
djcb dc5f27c899 * mu4e: check for marks when auto-updating (don't do it if there are any) 2012-10-24 23:49:26 +03:00
djcb f0caaa6e7c * mu4e-mark: fix thread-based marking for marks with targets 2012-10-13 22:13:17 +03:00
djcb fff5113f98 * mu4e: fix mu4e marking / regions 2012-10-09 18:30:56 +03:00
djcb f334e7ae71 * mu4e: fixup directory creation 2012-10-09 00:15:02 +03:00
djcb 23fc0b4a63 * mu4e: offer to create target dirs when they do not exist yet 2012-10-09 00:03:24 +03:00
djcb 0eada7c9ba * mu4e-mark: fix ambiguous shortcuts in `mu4e~mark-get-markpair' 2012-10-06 22:21:16 +03:00
djcb a9f555fc90 * mu4e: use <insert> as binding for deferred ('something') marking, just like
midnight commander
2012-10-06 20:47:59 +03:00
djcb 679a214ba0 * mu4e: mu4e-mark: mark all messages in region, even if point does not point
at msg
2012-10-01 21:37:26 +03:00
djcb 5779820ba0 * mu4e: dynamic folder updates 2012-09-27 21:53:21 +03:00