~benburwell

https://www.benburwell.com

~benburwell/patchall

Last active 19 days ago

~benburwell/test

Last active a month ago

~benburwell/howtochooseapassword

Last active 2 months ago
View more

Recent activity

Re: [PATCH] add close-tab command 16 days ago

From Ben Burwell to ~sircmpwn/aerc

We already have :close and :abort, could we simply make the existing

Perhaps somewhat selfishly, I don't really want to remember that :close
works for the message viewer and the terminal, abort for the composer,
and if I want to close one by name I should use :close-tab.

I think it would be possible to just have a single :close command which
uses a type switch to do the additional cleanup required by the term and
the composer, and it could also be extended to take an optional tab
name, acting on the focused tab if none is provided.

Thoughts?

[PATCH] maildir: Preserve flags when copying messages 17 days ago

From Ben Burwell to ~sircmpwn/aerc

---
 worker/maildir/container.go | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/worker/maildir/container.go b/worker/maildir/container.go
index f015181..85e892a 100644
--- a/worker/maildir/container.go
+++ b/worker/maildir/container.go
@@ -2,7 +2,6 @@ package maildir
 
 import (
 	"fmt"
-	"io"
 	"io/ioutil"
[message trimmed]

[PATCH go-message] Commit go.sum 22 days ago

From Ben Burwell to ~emersion/public-inbox

This file is meant to be tracked in VCS.
---
 go.mod |  1 +
 go.sum | 14 ++++++++++++++
 2 files changed, 15 insertions(+)
 create mode 100644 go.sum

diff --git a/go.mod b/go.mod
index d077adc..c97527c 100644
--- a/go.mod
+++ b/go.mod
@@ -5,5 +5,6 @@ go 1.12
 require (
 	github.com/emersion/go-textwrapper v0.0.0-20160606182133-d0e65e56babe
[message trimmed]

Re: [PATCH go-message] Understand non-compliant Date headers 22 days ago

From Ben Burwell to ~emersion/public-inbox

Alright, I think I will take a stab at a patch for that, then. Disregard
this one :)

[PATCH] Fix directory completion case sensitivity 22 days ago

From Ben Burwell to ~sircmpwn/aerc

Before, lower_only was not being correctly set and was only considering
whether the string ended with a lowercase sequence. Refactored this with
some more explicit functions as the logic is a little confusing.
---
This fixes #255. I wasn't able to repro the panic, I think that may be a
separate issue, but it does fix the case sensitivity issue during
completion.

 commands/commands.go | 30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/commands/commands.go b/commands/commands.go
index 3f7fbcd..1e86118 100644
--- a/commands/commands.go
[message trimmed]

Re: [PATCH go-message] Understand non-compliant Date headers 22 days ago

From Ben Burwell to ~emersion/public-inbox

Ah, good catch about the header comment!

If this is being fixed upstream, I suppose it does not make sense to
patch it in go-message. Though, it doesn't look like that CL has been
applied yet and since go 1.13 is frozen we won't see it until at least
February 2020 with 1.14. In the meantime, I have a few broken messages
in aerc, so I'm not quite sure what to do about that. Doesn't seem like
this is affecting too many people based on the activity on that github
issue, so maybe I'll just keep it patched locally until go is fixed.

[PATCH] Fix sending attachments with less than 512 bytes 24 days ago

From Ben Burwell to ~sircmpwn/aerc

---
 widgets/compose.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/widgets/compose.go b/widgets/compose.go
index 9373e0b..c94ac8a 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -418,7 +418,7 @@ func writeAttachment(path string, writer *mail.Writer) error {
 	// determine the MIME type
 	// http.DetectContentType only cares about the first 512 bytes
 	head, err := reader.Peek(512)
-	if err != nil {
+	if err != nil && err != io.EOF {
[message trimmed]

[PATCH] Include body MIME terminator in multipart messages 24 days ago

From Ben Burwell to ~sircmpwn/aerc

Before, the text/plain part of the multipart MIME message was not being
correctly terminated with its boundary. The multipart writer writes the
terminator when its Close is called, but since the call to Close() was
deferred, it was not being called until after the attachments were being
written resulting in the boundary not being included at all.
---
 widgets/compose.go | 53 ++++++++++++++++++++++++++--------------------
 1 file changed, 30 insertions(+), 23 deletions(-)

diff --git a/widgets/compose.go b/widgets/compose.go
index aa370ae..9373e0b 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -344,14 +344,7 @@ func (c *Composer) WriteMessage(header *mail.Header, writer io.Writer) error {
[message trimmed]

[PATCH] Implement address completion in composer 25 days ago

From Ben Burwell to ~sircmpwn/aerc

Add a new address-book-cmd to the composer section of aerc.conf. This
specifies a command to use for getting address completions. The output
format expected for this command mirrors that of mutt's query_command
for easy interoperability.
---
To actually be able to use this, users need to unbind tab from its
default :next-field in [composer]. Should we handle this differently?

 config/aerc.conf.in                    |  12 +++
 config/config.go                       |   5 +-
 doc/aerc-config.5.scd                  |  16 +++
 lib/headercompleter/headercompleter.go | 130 +++++++++++++++++++++++++
 widgets/compose.go                     |  22 +++--
 5 files changed, 177 insertions(+), 8 deletions(-)
[message trimmed]

[PATCH] Clean maildirs when opened 25 days ago

From Ben Burwell to ~sircmpwn/aerc

This removes old aborted deliveries from the tmp directory.
---
 worker/maildir/worker.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index aa54af5..533bb7c 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -202,6 +202,10 @@ func (w *Worker) handleOpenDirectory(msg *types.OpenDirectory) error {
 		return fmt.Errorf("could not add watch to directory: %v", err)
 	}
 
+	if err := dir.Clean(); err != nil {
[message trimmed]