Commit graph

97 commits

Author SHA1 Message Date
Reto Brunner 186d61f21c msg/reply: don't cc the sending address on reply all 2020-08-20 21:54:33 +02:00
y0ast 6a1c0f60af Add account alias configuration and correctly set From field
We infer the correct From using the To: and Cc: field of the email that
we reply to.
2020-08-20 21:54:31 +02:00
Reto Brunner 2a186cfd71 msg/reply: handle addresses as addresses
This simplifies the code considerably and makes it easier to follow
2020-08-20 21:53:45 +02:00
Reto Brunner c846307144 base models.Address on the mail.Address type
This allows us to hook into the std libs implementation of parsing related stuff.
For this, we need to get rid of the distinction between a mailbox and a host
to just a single "address" field.

However this is already the common case. All but one users immediately
concatenated the mbox/domain to a single address.

So this in effects makes it simpler for most cases and we simply do the
transformation in the special case.
2020-08-20 19:18:57 +02:00
Kalyan Sriram 905cb9dfd3 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-08-06 21:42:06 +02:00
Reto Brunner 3d784c5d8c Revert "Implement style configuration."
This reverts commit 1ff687ca2b.
2020-07-30 23:22:32 +02:00
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