Fork of the aerc email client (https://sr.ht/~rjarry/aerc)
Go to file
Simon Ser 5685a17674 lib/ui: introduce Invalidatable
Many Drawable implementations have their own Invalidate and OnInvalidate
functions, with an unexported onInvalidate field. However OnInvalidate and
Invalidate are usually not called in the same goroutine. This results in a race
on this field, e.g.:

    Read at 0x00c000094748 by goroutine 7:
      git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList.func1()
          /home/simon/src/aerc2/widgets/dirlist.go:85 +0x56
      git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start.func1()
          /home/simon/src/aerc2/widgets/spinner.go:93 +0x1bb

    Previous write at 0x00c000094748 by main goroutine:
      [failed to restore the stack]

    Goroutine 7 (running) created at:
      git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start()
          /home/simon/src/aerc2/widgets/spinner.go:46 +0x8f
      git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList()
          /home/simon/src/aerc2/widgets/dirlist.go:37 +0x286
      git.sr.ht/~sircmpwn/aerc2/widgets.NewAccountView()
          /home/simon/src/aerc2/widgets/account.go:50 +0x5ca
      git.sr.ht/~sircmpwn/aerc2/widgets.NewAerc()
          /home/simon/src/aerc2/widgets/aerc.go:60 +0x800
      main.main()
          /home/simon/src/aerc2/aerc.go:65 +0x33e

To fix this, introduce a new type, Invalidatable, which protects the field.
Unfortunately the Drawable must be passed to the callback function in
Invalidate, so we still need to re-implement this in each Invalidatable user.
2019-04-27 14:30:28 -04:00
commands Fix segfault on :select-message for unloaded messages 2019-04-17 20:02:12 -04:00
config Use better regex for identifying patches 2019-03-31 16:48:05 -04:00
contrib Add script for sandboxing w3m 2019-03-31 15:33:07 -04:00
lib lib/ui: introduce Invalidatable 2019-04-27 14:30:28 -04:00
widgets lib/ui: introduce Invalidatable 2019-04-27 14:30:28 -04:00
worker worker/types: fix Worker.Callbacks race condition 2019-04-27 14:28:26 -04:00
.gitignore Initialize worker in account widget 2019-01-13 13:03:28 -05:00
aerc.go Add message view commands, :close 2019-03-30 21:45:41 -04:00
go.mod go get git.sr.ht/~sircmpwn/go-libvterm 2019-04-21 16:17:40 -04:00
go.sum go get git.sr.ht/~sircmpwn/go-libvterm 2019-04-21 16:17:40 -04:00
LICENSE Add README.md, update license (MIT -2019) 2019-01-13 20:09:07 -05:00
README.md Update README.md 2019-03-21 22:07:03 -04:00

aerc

aerc is a work in progress email client for your terminal.

It is not yet suitable for daily use.

Building

go build

Usage

$ mkdir ~/.config/aerc
$ cp config/*.conf ~/.config/aerc/
$ vim ~/.config/aerc/accounts.conf

Fill in your account details and configure the rest to taste, then run aerc2.

Contributing

Send patches to ~sircmpwn/public-inbox@lists.sr.ht.

Bugs & todo here: ~sircmpwn/aerc2