~cnx

Hà Nội, Việt Nam

https://cnx.srht.site

Vietnamese free software enthusiast

Join the FSF

~cnx/ipwhl-announce

Last active 7 hours ago

~cnx/ipwhl-devel

Last active 10 days ago

~cnx/site

Last active 11 days ago

~cnx/ipwhl-discuss

Last active a month ago

~cnx/tzigame

Last active 3 months ago

~cnx/palace

Last active 4 months ago

~cnx/blackshades

Last active 7 months ago

~cnx/misc

Last active 7 months ago

~cnx/nwsim

Last active 9 months ago

~cnx/pyndie

Last active 9 months ago
View more

Recent activity

IPWHL 2022W03 published! 7 hours ago

From Nguyễn Gia Phong to ~cnx/ipwhl-announce

Hello everyone,

A new weekly snapshot of the floating cheeses has been published
at ipfs://bafybeifkcyvnmdwgt3smi7vs4dyqbtlzirkbu5cygdd2dioangywq2enki

The main highlight is that the utilities have been packaged
under the name ipwhl, providing the following entry points:
ipwhl-prefix ipwhl-declgen ipwhl-publish
ipwhl-nameck ipwhl-declck ipwhl-depsck

This means it is no longer required to vendor these scripts
into a development environment, and they can be packaged
for your favorite operating system (I'm submitting it to NixOS).

Re: [PATCH aerc v3] Close maildir and notmuch files 2 days ago

From Nguyễn Gia Phong to ~rjarry/aerc-devel

On Thu Jan 20, 2022 at 2:47 PM +0100, Robin Jarry wrote:
> It looks like there is another side effect from this patch. I did not
> manage to reproduce systematically but when opening some messages, I get
> this error:
>
> read ~/mail/INBOX/cur/1641803700.528665_29.diabtop,U=640:2,S: file already closed
>
> It may be solved by your patch that reads the whole message into memory
> though.

At first glance it's not immediately obvious which part of this patch
causes this regression (TBF I'm not exactly familiar with the internal
structure of aerc though) but I don't think the patch for :pipe
is related.  I'll keep an eye on this.

[PATCH aerc v3] maildir,notmuch: pass in-memory message to callback 2 days ago

From Nguyễn Gia Phong to ~rjarry/aerc-devel

This fixes piped full message (:pipe -m) being empty.

Fixes: 904ffacb0e52 ("maildir,notmuch: avoid leaking open files")
Signed-off-by: Nguyễn Gia Phong <mcsinyx@disroot.org>
---
 worker/maildir/worker.go | 8 +++++++-
 worker/notmuch/worker.go | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index a671d730fc25..2f75f12ae5e0 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -1,9 +1,11 @@
[message trimmed]

[PATCH aerc v2] maildir: pass in-memory message to callback 2 days ago

From Nguyễn Gia Phong to ~rjarry/aerc-devel

This fixes piped full message (:pipe -m) being empty.

Fixes: 904ffacb0e52 ("maildir,notmuch: avoid leaking open files")
Signed-off-by: Nguyễn Gia Phong <mcsinyx@disroot.org>
---
BTW thank you Robin Jarry for the pointer to the recommendation
for Linux change log, TIL.
 worker/maildir/worker.go | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index a671d730fc25..2f75f12ae5e0 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
[message trimmed]

[PATCH aerc] maildir: pass in-memory message to callback 2 days ago

From Nguyễn Gia Phong to ~rjarry/aerc-devel

This fixes empty :pipe -m (regression by 904ffac).
---
 worker/maildir/worker.go | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index a671d73..2f75f12 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -1,9 +1,11 @@
package maildir

import (
	"bytes"
[message trimmed]

Re: Discord webhook integration 2 days ago

From Nguyễn Gia Phong to ~sircmpwn/sr.ht-discuss

IIUC by policy SourceHut would not spend further resources to integrate
with proprietary software; however for most activities you can track
an RSS feed.

[PATCH aerc v3] Close maildir and notmuch files 2 days ago

From Nguyễn Gia Phong to ~rjarry/aerc-devel

Previously, Message.NewReader returned the wrapped buffered reader
without a reference to the opened file, so the files descriptors
were left unclosed after reading.  Now, the file reader is returned
directly and closed on the call site.  Buffering is not needed here
because it is an implementation detail of go-message.

Fixes: https://todo.sr.ht/~rjarry/aerc/9
---
While drafting the commit message I also found other spots
where files are not closed.
 worker/lib/parse.go       |  3 ++-
 worker/lib/parse_test.go  | 18 ++++++------------
 worker/maildir/message.go |  9 ++-------
 worker/maildir/search.go  |  1 +
[message trimmed]

[PATCH aerc v2] Close maildir and notmuch files 3 days ago

From Nguyễn Gia Phong to ~rjarry/aerc-devel

Fixes: https://todo.sr.ht/~rjarry/aerc/9
---
I wasn't aware of the tests.  They should pass now.
 worker/lib/parse.go       |  3 ++-
 worker/lib/parse_test.go  | 18 ++++++------------
 worker/maildir/message.go |  9 ++-------
 worker/notmuch/message.go |  9 ++-------
 4 files changed, 12 insertions(+), 27 deletions(-)

diff --git a/worker/lib/parse.go b/worker/lib/parse.go
index 87f94bd..6d73a1f 100644
--- a/worker/lib/parse.go
+++ b/worker/lib/parse.go
@@ -211,7 +211,7 @@ func parseAddressList(h *mail.Header, key string) ([]*mail.Address, error) {
[message trimmed]

[PATCH aerc] Close maildir and notmuch files 3 days ago

From Nguyễn Gia Phong to ~rjarry/aerc-devel

Fixes: https://todo.sr.ht/~rjarry/aerc/9
---
As suggested by Drew DeVault in the ticket
 worker/lib/parse.go       | 3 ++-
 worker/maildir/message.go | 9 ++-------
 worker/notmuch/message.go | 9 ++-------
 3 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/worker/lib/parse.go b/worker/lib/parse.go
index 87f94bd..6d73a1f 100644
--- a/worker/lib/parse.go
+++ b/worker/lib/parse.go
@@ -211,7 +211,7 @@ func parseAddressList(h *mail.Header, key string) ([]*mail.Address, error) {

[message trimmed]

Re: Move unsent messages to draft 4 days ago

From Nguyễn Gia Phong to ~rjarry/aerc-devel

Thanks, although I was asking for the first prompt, since [p]ostpone
is set by default but missing.  I grep the source and it seems that
it is hardcoded in widgets/compose.go