Go pre 1.15 parsed an empty string as an error, 1.15 did not but this was
unintentional as per https://github.com/golang/go/issues/40803
Fix the comment accordingly
There is a window where a new dir entry isn't yet in the dirlist.dir.
dirlist.ensureScroll however expected to always find a valid index.
Add a check so that we don't try to scroll to a -1 index.
This change handles message parse errors by printing the error when the
user tries to view the message. Specifically only handling unknown
charset errors in this patch, but there are many types of invalid
messages that can be handled in this way.
aerc currently leaves certain messages in the msglist in the pending
(spinner) state, and I'm unable to view or modify the message. aerc also
only prints parse errors with message when they are initially loaded.
This UX is a little better, because you can still see the header info
about the message, and if you try to view it, you will see the specific
error.
The color scheme for deleted emails should now match the old design,
making it easier to see when a message is deleted.
Signed-off-by: James Pond <james@cipher.host>
Go 1.15 handles "" in the address parser as a non error case, returning
an empty list.
Prior versions returned an error, which is not what we want.
Reported-by: anianz <a.ziegler@cioplenu.de>
Tested-by: anianz <a.ziegler@cioplenu.de>
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.
The `:rmdir` command removes the current directory (`-f` is required if
the directory is not empty).
This is not supported on the notmuch backend.
An issue with the maildir backend is that some sync programs (e.g.
offlineimap) may recover the directory after it is deleted. They need
to specifically be configured to accept deletions, or special commands
need to be executed (e.g. `offlineimap --delete-folder`) to properly
delete folders.
A danger of using this on the IMAP backend is that it is possible for a
new message to be added to the directory and for aerc to not show it
immediately (due to a slow connection) - using `:rmdir` at this moment
(with `-f` if the directory already contains messages) would delete the
directory and the new message that just arrived (and all other
contents). This is documented in aerc(1) so that users are aware of
possible risks.
This piggybacks on the existing IMAP support, and uses the same
configuration format (my local testing example has the IMAP and SMTP
lines almost copy-pasted from one another).
It's a little clumsy in that a new token is negotiated for every
`Send()` command, but it's a start...
If a message date would fail to parse, the worker would never receive
the MessageInfo it asked for, and so it wouldn't display the message.
The problem is the spec for date formats is too lax, so trying to ensure
we can parse every weird date format out there is not a strategy we want
to pursue. On the other hand, preventing the user from reading and
working with a message due to the error format is also not a solution.
The maildir and notmuch workers will now fallback to the internal date, which
is based on the received header if we can't parse the format of the Date header.
The UI will also fallback to the received header whenever the date header can't
be parsed.
This patch is based on the work done by Lyudmil Angelov <lyudmilangelov@gmail.com>
But tries to handle a parsing error a bit more gracefully instead of just returning
the zero date.
This can happen for example if aerc is compiled without notmuch support but the
notmuch worker is requested.
Pushing a status message isn't good enough, as this gets overridden pretty
quickly if one has multiple accounts configured.
So we show a fullscreen error instead.
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.
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.
some people send around huge html without any newline in between.
This did overflow the default 64KB buffer of bufio.Scanner.
If something can't fit in a GB there's no hope left
Also, ignoring errors is bad mkey
If accounts.conf contains an invalid maildir url, return a nice
error instead of panicking.
Log a couple of different error cases to provide extra
information about the error to the user.
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.
Provide search and filter with the option to specify more flag based
conditions.
Use '-x <flag>' to search for messages with a flag (seen, answered,
flagged) and '-X <flag>' to search for messages without a flag.
When message dates failed to parse, the error displayed would try to
include the time object it failed to obtain, which would display as
something like 0001-01-01 00:00:00 UTC, which isn't of much help.
Instead, display the text we were trying to parse into a date, which
makes the problem easier to debug.
Changelog:
d262af7 (tag: v0.12.0) textproto: check header characters
5b97b1b Remove hz-gb-2312 encoding as it can crash
0e60ea0 writer: add Mime-Version header when missing
c512562 textproto: add Header.Raw and HeaderFields.Raw
4af4c77 textproto: Add HeaderFields.Len
f828d02 Add test converting an Entity to quoted-printable
8c6ac6b Add CreateInlineWriter to get a writer that allows alternatives, but no attachments.
fee642d (tag: v0.11.2) Fix incorrect line folding of RFC2047-encoded strings
9c4415e textproto: add limits for header field length and total amount of fields
46fe03d mail: add Message-Id test with IPv6 address
6c32091 textproto: add MultipartReader tests
9ce1b6f textproto: remove unused skipSpace function
a41879c mail: add tests for Header.{MessageID,MsgIDList}
82eb31c mail: add Header.MessageID and Header.MsgIDList
7e482a2 mail: add headerParser
40e7be6 textproto: minor doc improvements
f119d5f readme: remove stability badge
e48b6c5 mail: minor comments and docs improvements
8ade7dd textproto: add error on invalid header key
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.
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.