Presumably some email servers will transform newlines into carriage
return new lines to better support windows users. I can't prove this but
that's the best explanation I have for my hosted email provider
(fastmail).
Without this patch, I was seeing annoying `^M`s at the end of every
filtered line.
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
The code was trying to compile the `~` as well. In this case, it was
trying to match a literal `~` to the front of the supplied regex.
Fixes: 334ca89bea ("folder filter: only assume regex if filter is
~fmt")
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
It's nice to be able to filter the folders displayed in the side
bar. Basic string matching can get verbose with enough folders
whitelisted.
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Choose the readline defaults for the behavior of these two
functions/keybindings. Depending on the program, either of these can
delete the whole line.
Note that by default in [compose], <C-k> is bound to :prev-field<Enter>.
Leave it up to the user whether or not they want to rebind the key in
[compose].
Fixes ~sircmpwn/aerc2#205. Many functions do a nil check on the store,
so this changes Store() so it returns nil when msglist is nil.
It also places the Scroll() behind the nil check in the next-message command.
https://todo.sr.ht/~sircmpwn/aerc2/205
We need some way to signal the backends that we are about to shutdown,
allowing them to clean up (for example in notmuch committing the db changes).
This commit implements a hook which gets called upon shutdown, providing
backends implement the io.Closer interface.
This fixes ~sircmpwn/aerc2#195. While `read -t` works fine.
The `unread` command is not wired. This patch fixes it.
https://todo.sr.ht/~sircmpwn/aerc2/195
This commit introduces the notmuch backend.
The backend is conditionally compiled in if the "notmuch" tag is provided.
Most of the message types are implemented, with the notable exceptions
of DeleteMessages as well as any copy / move / append type.
Reason being, that those aren't normally applicable in a notmuch based workflow.
Changes v2 --> v3, based on review comments
* Use account config for configuration
Things like FetchEntityPartReader etc can be reused by most workers
working with raw email files from disk (or any reader for that matter).
This patch extract that common functionality in a separate package.
This fixes ~sircmpwn/aerc2#245. This sets up the imap client to send
error messages to the logger of the worker. Errors now end up in the
bottom status line.
https://todo.sr.ht/~sircmpwn/aerc2/245
Before, lower_only was not being correctly set and was only considering
whether the string ended with a lowercase sequence. Refactored this with
some more explicit functions as the logic is a little confusing.
Before, the text/plain part of the multipart MIME message was not being
correctly terminated with its boundary. The multipart writer writes the
terminator when its Close is called, but since the call to Close() was
deferred, it was not being called until after the attachments were being
written resulting in the boundary not being included at all.
Make the msglist aware of whether we are still initializing or not.
We never stopped spinning the msglist if we didn't get any Directories back
from types.ListDirectories.
With this change, we can set the init state from the account and display
the spinner only if we don't know whether we have directories or not and else
the "no messages" string from the config.
Add a "new-message-bell" option to the UI section of aerc.conf. A new
hook into the message store allows the msglist widget to detect new
messages being added to the displayed list. When new messages are
delivered, and the new-message-bell option is enabled (as it is by
default), the terminal will beep.