~keur

Berkeley

https://keur.rocks

Recent activity

[PATCH] widgets/terminal: Reap more zombies a day ago

From Kevin Kuehler to ~sircmpwn/aerc

The editor and pager were not properly being reaped, causing resource
leakage whenever a user replies to a message.

Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
---
 widgets/terminal.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/widgets/terminal.go b/widgets/terminal.go
index 6ad6904..bbe7f82 100644
--- a/widgets/terminal.go
+++ b/widgets/terminal.go
@@ -180,6 +180,7 @@ func (term *Terminal) Close(err error) {
 	}
[message trimmed]

[PATCH] commands/account: Disable :view for deleted msgs 11 days ago

From Kevin Kuehler to ~sircmpwn/aerc

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
attemptCopy.

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(...)
/usr/lib/go/src/io/io.go:364
git.sr.ht/~sircmpwn/aerc/widgets.(*PartViewer).attemptCopy.func4(0xc00017efd0,
0xc0004da7c0) /home/keur/repos/aerc/widgets/msgviewer.go:576 +0x611
created by git.sr.ht/~sircmpwn/aerc/widgets.(*PartViewer).attemptCopy
[message trimmed]

[PATCH] worker/imap: Fix seqMap race condition 12 days ago

From Kevin Kuehler to ~sircmpwn/aerc

When deleting a message, sometimes FetchDirectoryContents will fire.
FetchDirectoryContents will return a smaller set of UIDs since messages
have been deleted. This operation races with fetching from the seqMap in
client.ExpungeUpdate. Only recreate the seqMap if it can grow so that
messages will continue to be expunged.

Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
---
 worker/imap/open.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/worker/imap/open.go b/worker/imap/open.go
index 452c309..0602a7f 100644
--- a/worker/imap/open.go
[message trimmed]

[PATCH] widgets/msgviewer: Don't crash if pager is nil 20 days ago

From Kevin Kuehler to ~sircmpwn/aerc

Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
---
 widgets/msgviewer.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index 05da2a0..7cd5553 100644
--- a/widgets/msgviewer.go
+++ b/widgets/msgviewer.go
@@ -506,7 +506,7 @@ func (pv *PartViewer) SetSource(reader io.Reader) {
 }

 func (pv *PartViewer) attemptCopy() {
-	if pv.source != nil && pv.pager.Process != nil {
[message trimmed]

[PATCH v2 9/9] [WIP] Add SupportThread to notmuch and maildir 25 days ago

From Kevin Kuehler to ~sircmpwn/aerc

* notmuch: add placeholder since it has native thread support
* maildir: Return false since it does not have native thread support

Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
---
 worker/maildir/worker.go | 11 +++++++++++
 worker/notmuch/worker.go | 12 ++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index 1df4e09..3ce396a 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -170,6 +170,8 @@ func (w *Worker) handleMessage(msg types.WorkerMessage) error {
[message trimmed]

[PATCH v2 8/9] [WIP] Add manual threading to the pipeline 25 days ago

From Kevin Kuehler to ~sircmpwn/aerc

Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
---
 lib/msgstore.go          | 13 +++++++++++--
 widgets/account.go       |  4 ++++
 worker/imap/open.go      | 17 +++++++++++++++++
 worker/imap/worker.go    |  2 ++
 worker/types/messages.go |  9 +++++++++
 5 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/lib/msgstore.go b/lib/msgstore.go
index ccde2c2..bc55255 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -171,6 +171,15 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
[message trimmed]

[PATCH v2 7/9] [WIP] Rework threading and add REFERENCES 25 days ago

From Kevin Kuehler to ~sircmpwn/aerc

* Implement a simplified version of the REFERENCES algorithm
* Remove FormatThreads function
* Instead of acting on all threads, handle each thread independently

Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
---
 lib/msgstore.go          | 196 +++++++++++++++++++++++++++++++++------
 widgets/msglist.go       |  20 ++--
 worker/imap/open.go      |  21 +++--
 worker/types/messages.go |   2 +-
 worker/types/thread.go   | 116 ++++++++++++++++-------
 5 files changed, 278 insertions(+), 77 deletions(-)

diff --git a/lib/msgstore.go b/lib/msgstore.go
[message trimmed]

[PATCH v2 6/9] [WIP] Add threading control path to msglist.Draw() 25 days ago

From Kevin Kuehler to ~sircmpwn/aerc

Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
---
 config/triggers.go   |  2 +-
 lib/format/format.go |  6 +++---
 lib/msgstore.go      |  2 +-
 widgets/msglist.go   | 29 ++++++++++++++++++++++-------
 4 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/config/triggers.go b/config/triggers.go
index d31f267..0e1f030 100644
--- a/config/triggers.go
+++ b/config/triggers.go
@@ -37,7 +37,7 @@ func (trig *TriggersConfig) ExecNewEmail(account *AccountConfig,
 	err := trig.ExecTrigger(trig.NewEmail,
[message trimmed]

[PATCH v2 5/9] [WIP] lib/msgstore: Handle DirectoryThreaded msg 25 days ago

From Kevin Kuehler to ~sircmpwn/aerc

This method is called after a worker fetches a threaded directory
contents from the backend. We iterate over the threads in the same order
that they will be printed in the msglist.

Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
---
 lib/msgstore.go | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/lib/msgstore.go b/lib/msgstore.go
index c0e4136..c2361dc 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -15,7 +15,8 @@ type MessageStore struct {
[message trimmed]

[PATCH v2 4/9] [WIP] Add FormatThread function 25 days ago

From Kevin Kuehler to ~sircmpwn/aerc

FormatThread performs dfs on a thread tree. For every node in the tree,
a callback function is called with a thread and a format string for
that thread. The format string is to be used when displaying the full
thread tree.

Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
---
 worker/types/thread.go | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/worker/types/thread.go b/worker/types/thread.go
index 265438f..a51a5c4 100644
--- a/worker/types/thread.go
+++ b/worker/types/thread.go
[message trimmed]