~labrat

Recent activity

[PATCH] lib/msgstore: fix invalid callback invocation 11 days ago

From Reto Brunner to ~sircmpwn/aerc

creating a directory must not invoke the callback, as this is meant for the
completion of the move

---
 lib/msgstore.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/msgstore.go b/lib/msgstore.go
index b0392ba..2d9d5b9 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -293,7 +293,7 @@ func (store *MessageStore) Move(uids []uint32, dest string, createDest bool,
 		store.worker.PostAction(&types.CreateDirectory{
 			Directory: dest,
[message trimmed]

[PATCH] Open mailto links in a new aerc instance if needed. 21 days ago

From Reto Brunner to ~sircmpwn/aerc

Aerc tries to open mailto:// links via the socket of the already running aerc
instance.

If no socket exists this silently errored out.
This commit starts up a new aerc instance if it can't connect to the socket
(which I think is the most common error) and if not sets up a new aerc instance
and retries to open the compositor.

This fixes https://todo.sr.ht/~sircmpwn/aerc2/295 by implementing the desired
behaviour.
---
This commit assumes that sockets are available... if not this leaves a tangling
aerc instance running, which could be annoying.
[message trimmed]

Re: [PATCH v2 1/4] Add postpone command 30 days ago

From Reto to ~sircmpwn/aerc

On 20 September 2019 21:10:55 CEST, Drew DeVault <sir@cmpwn.com> wrote:
>I would rather not support writing to a file here, yet. 

How do you want to handle it for notmuch then?
Notmuch doesn't have a concept of a directory and can't copy / append like imap et al

[PATCH] notmuch: add sort functionality 30 days ago

From Reto Brunner to ~sircmpwn/aerc

---

This implements the sort interface of Jeffas for the notmuch backend as well.
Incredibly easy thank to his rework of the patch!

Must be applied after his patches of course.

 worker/notmuch/worker.go | 47 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 41 insertions(+), 6 deletions(-)

diff --git a/worker/notmuch/worker.go b/worker/notmuch/worker.go
index 3d48d8c..96adc29 100644
--- a/worker/notmuch/worker.go
+++ b/worker/notmuch/worker.go
[message trimmed]

Re: [PATCH v4 1/2] Add sorting functionality 30 days ago

From Reto to ~sircmpwn/aerc

Thanks a lot for the work!

Minor nit, can you return early here?

On Thu, Sep 19, 2019 at 11:37:44PM +0100, Jeffas wrote:
> +func (w *Worker) sort(uids []uint32, criteria []*types.SortCriterion) ([]uint32, error) {
> +	if len(criteria) > 0 {
> +		var msgInfos []*models.MessageInfo
> +		for _, uid := range uids {
> +			m, err := w.c.Message(*w.selected, uid)
> +			if err != nil {
> +				w.worker.Logger.Printf("could not get message: %v", err)
> +				continue
> +			}

Re: [PATCH v3 1/2] Add sorting functionality a month ago

From Reto to ~sircmpwn/aerc

Hi Jeffas, greetings to all,

A few questions / comments regarding this patch:

## Why do you make this a separate event?

I think we can get away with doing this in the FetchDirectoryContents
event, else you make 2 round trips instead of a single one if you can do it
server side (only IMAP can do that). Or do I misunderstand?
For the on the fly config change, we could simply emit the same event again.

Other opinions?

## Can we extract the implementation of the sorting from the maildir worker?

[PATCH v3 3/3] notmuch: implement ModifyLabels a month ago

From Reto Brunner to ~sircmpwn/aerc

---
 worker/notmuch/worker.go | 87 ++++++++++++++++++++++++++++------------
 1 file changed, 61 insertions(+), 26 deletions(-)

diff --git a/worker/notmuch/worker.go b/worker/notmuch/worker.go
index 59624b3..3d48d8c 100644
--- a/worker/notmuch/worker.go
+++ b/worker/notmuch/worker.go
@@ -90,6 +90,8 @@ func (w *worker) handleMessage(msg types.WorkerMessage) error {
 		return w.handleReadMessages(msg)
 	case *types.SearchDirectory:
 		return w.handleSearchDirectory(msg)
+	case *types.ModifyLabels:
+		return w.handleModifyLabels(msg)
[message trimmed]

[PATCH v3 2/3] notmuch: sync maildir flags a month ago

From Reto Brunner to ~sircmpwn/aerc

Syncs back special notmuch tag like unread to the underlying maildir store

---
 go.mod                         | 2 +-
 go.sum                         | 2 ++
 worker/notmuch/lib/database.go | 5 ++++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/go.mod b/go.mod
index 1e30e3d..aeb7f8c 100644
--- a/go.mod
+++ b/go.mod
@@ -29,7 +29,7 @@ require (
 	github.com/smartystreets/assertions v1.0.1 // indirect
[message trimmed]

[PATCH v3 1/3] notmuch: extract all notmuch db operations. a month ago

From Reto Brunner to ~sircmpwn/aerc

For some reason the current code frequently segfaults due to an
invalid C memory address. This commit mediates that by never keeping an object
alive longer than absolutely necessary.
---
I can at least read my emails without aerc crashing now.

 worker/notmuch/lib/database.go | 179 +++++++++++++++++++++++++++++++++
 worker/notmuch/message.go      | 134 +++++++++---------------
 worker/notmuch/worker.go       | 112 ++++-----------------
 3 files changed, 250 insertions(+), 175 deletions(-)
 create mode 100644 worker/notmuch/lib/database.go

diff --git a/worker/notmuch/lib/database.go b/worker/notmuch/lib/database.go
new file mode 100644
[message trimmed]

[PATCH v3 0/3] notmuch updates a month ago

From Reto Brunner to ~sircmpwn/aerc

This patch set refactors the notmuch backend in the hopes that the segfaults
due to the notmuch C library disappear.

It also adds the implementation of the modify-labels command.

*Note* I've also had to include the commit that implements the modify-labels
command, else it would not compile.

It is however only added as a reference, the actual PR was sent separately.
Once (and if) merged the modify-labels command commit can be dropped from this
patchset

v2 --> v3:
* Remove commented dead code (oversight, sorry)