Commit graph

91 commits

Author SHA1 Message Date
Kalyan Sriram
1ff687ca2b Implement style configuration.
Introduce the ability to configure stylesets, allowing customization of
aerc's look (color scheme, font weight, etc). Default styleset is
installed to /path/to/aerc/stylesets/default.
2020-07-30 19:35:59 +02:00
Reto Brunner
c574a838fa Remove hard coded bodystruct path everywhere
Aerc usually used the path []int{1} if it didn't know what the proper path is.
However this only works for multipart messages and breaks if it isn't one.

This patch removes all the hard coding and extracts the necessary helpers to lib.
2020-07-27 09:19:27 +02:00
Reto Brunner
8446d48664 run go fmt 2020-07-17 17:50:24 +02:00
ARaspiK
0535f6333f Add additional flagging functionality
More mail flags can now be set, unset, and toggled, not just the
read/seen flag.

This functionality is implemented with a new `:flag` and `:unflag`
command, which are extensions to the matching `:read` and `:unread`
commands, adding support for different flags.  In fact, the
`read`/`unread` commands are now recognized aliases to `flag`/`unflag`.
The new commands are also well documented in aerc(1).

The change mostly extends the previous read/unread setting functionality
by adding a selection for the flag to change.
2020-07-08 09:13:03 +02:00
Andrew Jeffery
fda3f43e7c Allow open to be asynchronous
This stops the ui being blocked while the resource is opened. The wait
ensures that resources are reclaimed when the process finishes while
aerc is still running.
2020-07-08 09:07:43 +02:00
Reto Brunner
60c36ca1f1 pipe: don't crash if part is nil 2020-07-05 14:27:21 +02:00
Reto Brunner
fc2c6fff0d delete: push unsupported error up to the user 2020-07-05 12:22:45 +02:00
Reto Brunner
8f1c6c46ff Fix dates in reply/forward commands.
The data was passed around as a string for some reason, which led to time
precision loss and wrong dates being displayed.
Simply pass the time as is to fix that.
2020-06-26 09:25:53 +02:00
Jeffas
15b72df1da Rework msglist scrolling
This changes the scrolling to be done on the draw, when the height is
updated, ensuring that the selected item is kept on screen during
resizing.

Also, this ensures that messages will fill the screen when resizing the
window, for instance, shrinking and then growing drags down more
messages if possible.

This is a transplant of the dirlist scrolling logic.
2020-06-09 21:52:10 +02:00
Drew DeVault
caad1b2c06 Revert "Add Style configuration"
This reverts commit 0f78f06610.
2020-05-28 10:32:42 -04:00
Drew DeVault
76a91813d8 Revert "Remove duration from the status methods"
This reverts commit f06d683688.
2020-05-28 10:32:32 -04:00
Reto Brunner
f06d683688 Remove duration from the status methods
We always set 10 seconds anyhow, might as well do that without repeating ourselfs.
2020-05-27 08:11:40 +02:00
Reto Brunner
0f78f06610 Add Style configuration
The following functionalities are added to configure aerc ui styles.
- Read stylesets from file with very basic fnmatch wildcard matching
- Add default styleset
- Support different stylesets as part of UiConfig allowing contextual
  styles.
- Move widgets/ui elements to use the stylesets.
- Add configuration manual for the styleset
2020-05-27 07:57:10 +02:00
Srivathsan Murali
b1eb7ad18d Set AnsweredFlag on successful reply 2020-05-25 11:29:53 -04:00
Ray Ganardi
58db517c8d pgp: fail gracefully from email decryption
Aerc panics when there's an error on email decryption.
Instead, an error message should be shown.
2020-05-25 09:30:20 -04:00
Srivathsan Murali
83e7c7661d msg/reply: scoping error of part slice for quoting
part was left unassigned in the outer scope. Leading to errors while
quoting.
2020-05-22 15:01:36 +02:00
Martin Michlmayr
a7986f5706 Fix typos 2020-05-21 18:11:47 +02:00
Reto Brunner
61e9940849 msg/forward: fix body part selection 2020-05-17 13:02:24 +02:00
Reto Brunner
d48ea6231c Move findPlaintext / findFirstNonMultipart to utils
They are used by more than one command and as such need to be in a common file.
2020-05-17 12:15:50 +02:00
Reto Brunner
cff4476f3b msg/reply: fix encoding issues for quoted reply. 2020-05-17 12:08:17 +02:00
Reto Brunner
13a6a3fa71 FetchBodyPart doesn't need the parent body structure 2020-05-17 11:44:38 +02:00
Reto Brunner
ea2646fc03 Change MarkedMessages to return uids
Especially if one tries to interact with all marked messages there could be
the case that not all headers are fetched yet, hence the messageInfo is still nil.

This segfaults a lot of commands which in principle only need the uid to complete.

If we switch to uids, this issue can be alleviated for those commands.
2020-05-11 09:47:34 -04:00
Reto Brunner
381c1fc05f commands/helper: remove duplicated method 2020-05-11 09:47:33 -04:00
Reto Brunner
c5fdefe7af msg/read: don't copy waitgroup 2020-05-11 09:47:25 -04:00
Reto Brunner
8f2e5055ee msg/reply: Deduplicate TO: and CC:
If a recipient is already in TO:, there's no need to also put them in CC:
2020-05-06 10:00:36 -04:00
Ben Fiedler
05fa79eb8e store.FetchFull: Change callback type to expose entire message
This is a prerequisite for allowing the FetchFull message to return both
the message content and the message headers.
2020-05-01 11:10:08 -04:00
Drew DeVault
6f8ad91824 gofmt fixes 2020-04-24 12:59:40 -04:00
Jeffas
3102ac3680 Add recall command
This command allows recalling the selected postponed email to edit in
the composer. The command only allows recalling from the postpone
directory.
2020-04-24 12:59:21 -04:00
Jeffas
7f033278eb Add postpone command
This command uses the Postpone folder from the account config to save
messages to. Messages are saved as though they were sent so have a valid
'to' recipient address and should be able to be read back in for later
editing.
2020-04-24 12:59:21 -04:00
Ben Fiedler
7c89143c70 Use aerc.PushError where appropriate
Forgot an unused import, to save you the hassle here is v2.
2020-04-23 21:02:45 +02:00
Nicolai Dagestad
f35002ad0e Make the http handler of the unsubscribe command async 2020-04-16 19:16:11 +02:00
Reto Brunner
1fbce012ed msg/archive: complete the possible options 2020-04-11 10:46:46 -04:00
Drew DeVault
df20f1cd03 Refactoring: remove store from PartInfo 2020-03-09 09:12:32 -04:00
Drew DeVault
f3158b36f1 Initial support for PGP decryption & signatures 2020-03-03 16:49:52 -05:00
Reto Brunner
841655a98e msg/delete: remove redundant err check 2020-02-29 14:17:26 +01:00
Reto Brunner
bcab8de072 msg/reply: simplify string comparison 2020-02-19 08:34:43 +01:00
Reto Brunner
37fc4d9423 msg/reply: fix address comparison
Compare self address in lowercase, to avoid self-replying when people
put in uppercase versions of the mail.

Reported-By: helby on Freenode
2020-02-16 21:16:49 +01:00
Leszek Cimała
d238272bdb add .OriginalMIMEType variable to reply template 2020-01-09 14:31:19 -05:00
Leszek Cimała
bf28e23933 create OriginalMail struct 2020-01-09 14:31:19 -05:00
Reto Brunner
9096049f75 FetchBodyParts: decode source in the workers
Previously the workers returned a mixture of decoded / encoded parts.
This lead to a whole bunch of issues.
This commit changes the msgviewer and the commands to assume parts to already
be decoded
2020-01-05 16:02:45 -05:00
Reto Brunner
ce42429cbf read: adapt to ProvidesMessages 2019-12-22 16:21:38 -05:00
Reto Brunner
00263bf866 modify-labels: add completion 2019-12-21 11:20:12 -05:00
Reto Brunner
a744df724f modify-labels: adapt to ProvidesMessages 2019-12-21 09:27:53 -05:00
Reto Brunner
113de35961 move: adapt to ProvidesMessages 2019-12-21 09:27:52 -05:00
Reto Brunner
7b359be0cd delete: adapt to ProvidesMessages 2019-12-21 09:27:52 -05:00
Reto Brunner
c2b31ed7c9 copy: adapt to ProvidesMessages 2019-12-21 09:27:51 -05:00
Reto Brunner
884784ac32 archive: adapt to ProvidesMessages 2019-12-21 09:27:51 -05:00
Reto Brunner
5da58c669c add mark command 2019-12-21 09:27:50 -05:00
Reto Brunner
881a9081a8 add command helpers 2019-12-21 09:27:50 -05:00
Leszek Cimała
30aa77c1c9 use correct headers for message part
Hello guys,
on the hunt for bugs related to wrong encoding. This patch is fixing
reply to non-utf8 messages.

We were using global message headers instead of part specific. In
practice header were often something like:

multipart; boundry=...

where there should be:

text/plain; charset=...

Fixed also missing SubType.

Have great weekend!

Leszek
2019-12-07 14:30:20 -05:00