ref: 0.3.0 aerc/commands/account d---------
commands/account: Disable :view for deleted msgs

Allowing the user to view deleted messages creates all sorts of race
conditions. The most devious race condition is pv.source can be set to a
nil while another PartViewer is still running a goroutine in

Here is a trace when this happens.

goroutine 76 [running]: io.copyBuffer(0x7f8ad02641d0, 0xc00040f590, 0x0,
0x0, 0xc0007cc000, 0x8000, 0x8000, 0x0, 0x0, 0x8b3d60)
/usr/lib/go/src/io/io.go:402 +0x101 io.Copy(...)
0xc0004da7c0) /home/keur/repos/aerc/widgets/msgviewer.go:576 +0x611
created by git.sr.ht/~sircmpwn/aerc/widgets.(*PartViewer).attemptCopy
/home/keur/repos/aerc/widgets/msgviewer.go:544 +0x144

We could add a guard in store.FetchBodyPart to only call the callback
when msg.Part.Reader != nil, but we still get a hanging pager. Therefore
it seems more reasonable to disable this completely.

Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
Add Templates with Parsing

+ Changes NewComposer to return error.
+ Add lib to handle templates using "text/template".
+ Add -T option to following commands
    - compose.
    - reply
    - forward
+ Quoted replies using templates.
+ Forwards as body using templates
+ Default templates are installed similar to filters.
+ Templates Config in aerc.conf.
    - Required templates are parsed while loading config.
+ Add aerc-templates.7 manual for using template data.
Make commands join args with spaces

This patch ensures the following commands join their arguments with
spaces to make it easier to interact with:

- cf
- mkdir
- cd
- attach
- detach
- ct
- copy
- move
- save
Add sorting functionality

There is a command and config option. The criteria are a list of the
sort criterion and each can be individually reversed.

This only includes support for sorting in the maildir backend currently.
The other backends are not supported in this patch.
Add signatures

This adds the ability for per-account signatures in the accounts.conf
config file. The signature is added to emails in the editor at the
bottom of the email. This includes when forwarding, replying to, and
composing emails.

There are two config options: signature-file and signature-cmd. The
former allows a signature to be read from a file and the latter allows
an arbitrary command to be executed to return the signature.

The config options have been documented in aerc-config
bdb5e3e6 — Wagner Riffel 1 year, 10 months ago
commands: move ParseNextPrevMessage error value to its last return value

Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
baa70469 — Wagner Riffel 1 year, 10 months ago
all: rewrite references to strings.Index to strings.Contains

Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
feacca3c — Wagner Riffel 1 year, 10 months ago
all: use fmt.Errorf for fomartting errors

Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
6838c234 — Wagner Riffel 1 year, 10 months ago
all: purge redundant underscores

Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
extract search criteria parsing into the backends
Add optional body argument to compose command
Joining the args in cf for folders with spaces
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
Implement next-message in msgview using account

This makes sure that the next-message command accepts the same arguments
in the account view and the msgview
Implement next-folder using NextPrev with amount

This fixes ~sircmpwn/aerc2#182

ChangeFolder: do not depend on the msgstore

We need to clear the filtering etc upon folder switch.
Not having a valid msgstore is however no reason not to switch directories.
Support configurable header layout in compose widget
f81e4bd4 — Kevin Kuehler 2 years ago
Implement :filter, :clear

Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
8bb115db — Kevin Kuehler 2 years ago
commands: Don't crash when store is nil

On a slow network connection, running these commands without this guard
will cause aerc to panic.

Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>