~konimarti

~konimarti/public-inbox

Last active 5 months ago
View more

Recent activity

[PATCH aerc v2] ui: add select-last-message option 12 days ago

From Koni Marti to ~rjarry/aerc-devel

Add a [ui].select-last-message option to position the cursor at the
bottom of the message list view.

Fixes: https://todo.sr.ht/~rjarry/aerc/254
Changelog-added: Add `[ui].select-last-message` option to position
 cursor at the bottom of the view.
Suggested-by: Bence Ferdinandy <bence@ferdinandy.com>
Requested-by: Tomasz Kramkowski <tomasz@kramkow.ski>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
---
v1->v2:

 * cleaned up a variable name (no functionality change)
[message trimmed]

Re: [PATCH aerc] ui: add select-last-message option 12 days ago

From Koni Marti to ~rjarry/aerc-devel

On Tue May 14, 2024 at 11:01 PM CEST, Koni Marti wrote:
> diff --git a/lib/msgstore.go b/lib/msgstore.go
> index 8f626eb8..09ceb3c3 100644
> --- a/lib/msgstore.go
> +++ b/lib/msgstore.go
> @@ -48,6 +48,7 @@ type MessageStore struct {
>  	sortDefault  []*types.SortCriterion
>  
>  	threadedView       bool
> +	selectLast         bool
>  	reverseThreadOrder bool
>  	threadContext      bool
>  	sortThreadSiblings bool
> @@ -89,6 +90,7 @@ const MagicUid = 0xFFFFFFFF

[PATCH aerc] ui: add select-last-message option 12 days ago

From Koni Marti to ~rjarry/aerc-devel

Add a [ui].select-last-message option to position the cursor at the
bottom of the message list view.

Fixes: https://todo.sr.ht/~rjarry/aerc/254
Changelog-added: Add `[ui].select-last-message` option to position
 cursor at the bottom of the view.
Suggested-by: Bence Ferdinandy <bence@ferdinandy.com>
Requested-by: tk
Signed-off-by: Koni Marti <koni.marti@gmail.com>
---
 app/account.go        | 1 +
 config/aerc.conf      | 6 ++++++
 config/ui.go          | 1 +
 doc/aerc-config.5.scd | 6 ++++++
[message trimmed]

Re: [PATCH aerc] imap: fix panic in connect 22 days ago

From Koni Marti to ~rjarry/aerc-devel

On Sat May 4, 2024 at 11:41 PM CEST, Tim Culverhouse wrote:
> On Sat, 04 May 2024 15:05:50 CDT, Koni Marti wrote:
> > Fix a nil pointer dereference panic in connect when trying to obtain the
> > folder delimiter. There is a List call to the imap server that in some
> > instances can return a nil *imap.MailboxInfo that is not checked before
> > it is dereferenced.
>
> Hey Koni -
>
> Looks good. Just curious, which conditions cause the server to return a nil
> here?

That imap server sends a valid OK response without any data back:

[PATCH aerc] imap: fix panic in connect 22 days ago

From Koni Marti to ~rjarry/aerc-devel

Fix a nil pointer dereference panic in connect when trying to obtain the
folder delimiter. There is a List call to the imap server that in some
instances can return a nil *imap.MailboxInfo that is not checked before
it is dereferenced.

Link: https://lists.sr.ht/~rjarry/aerc-devel/%3CEDE672E5-3F6F-402D-B1A4-5477183FC13C@ukr.net%3E
Reported-by: Misha <ulianich_mihail@ukr.net>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
---
 worker/imap/connect.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/worker/imap/connect.go b/worker/imap/connect.go
index 01ba7801..c109d3b7 100644
[message trimmed]

[PATCH aerc] imap: drain updates channel when moving messages 2 months ago

From Koni Marti to ~rjarry/aerc-devel

Drain the updates channel when moving messages to prevent a backend
freeze. This also fixes a possible freeze for large-scale archive
operations since the archive command uses the move operation.

Reported-by: Moritz Poldrack <moritz@poldrack.dev>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
---
 worker/imap/movecopy.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/worker/imap/movecopy.go b/worker/imap/movecopy.go
index d3df133a..58357a45 100644
--- a/worker/imap/movecopy.go
+++ b/worker/imap/movecopy.go
[message trimmed]

[PATCH aerc] imap: drain updates channel when deleting messages 3 months ago

From Koni Marti to ~rjarry/aerc-devel

Drain the buffered updates channel when deleting messages to prevent a
backend freeze. Unilateral update messages from the IMAP server can fill
up the buffered channel if not handled during a large operation (more
than ~50 messages).

Link: https://lists.sr.ht/~rjarry/aerc-discuss/%3CCZCPBTWI3PIW.T8MWNCBG7FGL%40disroot.org%3E
Changelog-fixed: Prevent a freeze for large-scale deletions with IMAP.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
---
 worker/imap/flags.go | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/worker/imap/flags.go b/worker/imap/flags.go
index 06680818..60137bd3 100644
[message trimmed]

[PATCH go-opt v2] spec: ignore flags after the special argument -- 3 months ago

From Koni Marti to ~rjarry/public-inbox

Ignore flags after the special option delimiter argument ('--') and
interprete them as non-flag, positional arguments as getopt(3) does.

Example:

	type Foo struct {
		Force bool          `opt:"-f"`
		Name  string        `opt:"name"`
	}

Current behavior:

	$ foo -- -f
	main.Foo{Force:true, Name:"--"}
[message trimmed]

Re: [PATCH aerc] imap: fix connection when host only has ipv6 address 3 months ago

From Koni Marti to ~rjarry/aerc-devel

On Sun Feb 4, 2024 at 12:11 AM CET, Robin Jarry wrote:
> Some IMAP servers report both IPv4 and IPv6 addresses from their DNS
> name:
>
>  $ host imap.gmail.com
>  imap.gmail.com has address 108.177.15.109
>  imap.gmail.com has address 108.177.15.108
>  imap.gmail.com has IPv6 address 2a00:1450:400c:c0a::6c
>  imap.gmail.com has IPv6 address 2a00:1450:400c:c0a::6d
>
> ResolveTCPAddr actually returns the first *IPv4* address by default,
> unless the address string is an explicit IPv6 address.
>
> Directly use net.Dial which has a fast fallback mechanism. It first

Re: [PATCH go-opt] spec: parse remainder operands after -- 3 months ago

From Koni Marti to ~rjarry/public-inbox

On Sat Feb 3, 2024 at 6:56 PM CET, Robin Jarry wrote:
> The main use case for -- is precisely for this: allowing to take --flag 
> or -f as **positional arguments** even if they are valid optional 
> arguments for that program.
>
> At the moment, go-opt does not deal with this and it would be great if 
> it did.
>
> If I understand correctly, you are using -- for a slightly different use 
> case. This would be very confusing to users who are used to getopt 
> default behaviour. It seems like it would be best to follow that 
> standard.

No, same use case. The example in the commit message was not the best