Strip carriage returns (^M) when filtering emails

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

Without this patch, I was seeing annoying `^M`s at the end of every
filtered line.

Signed-off-by: Daniel Xu <>
Only compile regex portion of folder filter

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: 334ca89bea381 ("folder filter: only assume regex if filter is

Signed-off-by: Daniel Xu <>
folder filter: only assume regex if filter is ~fmt
Add forwarding as attachment feature

This allows a single message to be forward as attachment with the
:forward -a command
Add addresses argument to forward command
Move forward command to it's own file

The two commands did not have much code in common
upgrade go-message

Fixes date parsing bug in the maildir / notmuch workers.
Add support for <C-j> as '<Enter>' in ExLine
Support regex filters for folders

It's nice to be able to filter the folders displayed in the side
bar. Basic string matching can get verbose with enough folders

Signed-off-by: Daniel Xu <>
bump go-message, fixes address list parsing failure
Revert "add close command at global level"

This reverts commit f0a0c5aa733fa66958c113465bfc5fdd3d7cc9f0.
add close command at global level
Add optional body argument to compose command
Prevent drawing terminal with nil cmd
Add delete forward <C-k> and backward <C-u>

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
Joining the args in cf for folders with spaces
f6df46d3 — Jonas Mueller 17 days ago
Pass os stdin to credential command

This is neccessary for `gpg-agent` to display a prompt and get the key
to unlock a given password. See
Ignore scroll command when msgstore is nil

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.
Let user edit arbitrary headers in composer
maildir: Preserve flags when copying messages