~rjarry

Paris, France

~rjarry/aerc-devel

Last active 3 hours ago

~rjarry/aerc-discuss

Last active 4 days ago

~rjarry/dlrepo

Last active 4 days ago

~rjarry/aerc-announce

Last active 30 days ago
View more

Recent activity

[PATCH aerc 10/10] statusline: add column based render format 23 hours ago

From Robin Jarry to ~rjarry/aerc-devel

In the spirit of commit 535300cfdbfc ("config: add columns based index
format"), reuse the column definitions and table widget. Add new
template fields for status specific data:

{{.ConnectionInfo}}
	Connection state.
{{.ContentInfo}}
	General status information (e.g. filter, search)
{{.StatusInfo}}
	Combination of {{.ConnectionInfo}} and {{.StatusInfo}}
{{.TrayInfo}}
	General on/off information (e.g. passthrough, threading,
	sorting)
{{.PendingKeys}}
[message trimmed]

[PATCH aerc 09/10] ui/table: do not require width at construction 23 hours ago

From Robin Jarry to ~rjarry/aerc-devel

The width is only required when rendering the table in Draw. Remove the
redundant width attribute.

Fixes: 012be0192c88 ("ui: add reusable table widget")
Signed-off-by: Robin Jarry <robin@jarry.cc>
---
 lib/ui/table.go    | 14 ++++++--------
 widgets/msglist.go |  8 ++++----
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/lib/ui/table.go b/lib/ui/table.go
index 89b59c235035..0cd6e70648a4 100644
--- a/lib/ui/table.go
+++ b/lib/ui/table.go
[message trimmed]

[PATCH aerc 08/10] ui/table: allow zero width columns 23 hours ago

From Robin Jarry to ~rjarry/aerc-devel

When a column uses WIDTH_FIT and its contents are empty, the column is
not rendered at all, neither is its separator. This can cause display
artifacts (interruption of background color, etc.).

Make sure to differentiate between zero-width columns and columns that
overflow screen width.

Fixes: 012be0192c88 ("ui: add reusable table widget")
Signed-off-by: Robin Jarry <robin@jarry.cc>
---
 lib/ui/table.go | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

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

[PATCH aerc 07/10] format: remove unused code 23 hours ago

From Robin Jarry to ~rjarry/aerc-devel

Now that this is not used anywhere, remove it.

Signed-off-by: Robin Jarry <robin@jarry.cc>
---
 lib/format/format.go | 319 -------------------------------------------
 1 file changed, 319 deletions(-)

diff --git a/lib/format/format.go b/lib/format/format.go
index 7466cfd51964..9a675ef08b99 100644
--- a/lib/format/format.go
+++ b/lib/format/format.go
@@ -1,14 +1,12 @@
package format

[message trimmed]

[PATCH aerc 06/10] triggers: use templates instead of % mini language 23 hours ago

From Robin Jarry to ~rjarry/aerc-devel

Since previous commit, all commands now support expanding text/template
markup. Reuse that for the new-email trigger command.

Update commands.ExecuteCommand to take optional *AccountConfig and
*MessageInfo arguments. If these are nil, fallback to using the
currently selected account and message (if any).

Pass the proper *AccountConfig and *MessageInfo objects when firing the
trigger command so that these are used instead of the currently selected
ones.

If new-email contains % placeholders, try to convert them to template
markup reusing the same conversion added in commit 535300cfdbfc
("config: add columns based index format"). Warn the user that they need
[message trimmed]

[PATCH aerc 05/10] commands: expand template placeholders 23 hours ago

From Robin Jarry to ~rjarry/aerc-devel

From: Aivars Vaivods <aivars@vaivods.lv>

Interpret go template constructs in all aerc command arguments based on
the currently selected account, folder and message (if any).

Signed-off-by: Aivars Vaivods <aivars@vaivods.lv>
Signed-off-by: Robin Jarry <robin@jarry.cc>
---
 CHANGELOG.md         |  1 +
 commands/commands.go | 48 +++++++++++++++++++++++++++++++++++++++++++-
 doc/aerc.1.scd       |  9 +++++++++
 3 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
[message trimmed]

[PATCH aerc 04/10] templates: add now function 23 hours ago

From Robin Jarry to ~rjarry/aerc-devel

This allows to get the current local time.

Signed-off-by: Robin Jarry <robin@jarry.cc>
---
 doc/aerc-templates.7.scd   | 8 ++++++++
 lib/templates/functions.go | 1 +
 2 files changed, 9 insertions(+)

diff --git a/doc/aerc-templates.7.scd b/doc/aerc-templates.7.scd
index ed08814f7f28..a2b0d7cbb714 100644
--- a/doc/aerc-templates.7.scd
+++ b/doc/aerc-templates.7.scd
@@ -259,6 +259,14 @@ aerc provides the following additional functions:
	{{.DateAutoFormat .OriginalDate.Local}}
[message trimmed]

[PATCH aerc 03/10] templates: add message counts for specific folders 23 hours ago

From Robin Jarry to ~rjarry/aerc-devel

Change the {{.Recent}}, {{.Unread}} and {{.Exists}} template fields to
take a folder name as argument.

Add {{.RecentAll}}, {{.UnreadAll}} and {{.ExistsAll}} to get the
previous behaviour (count messages for all folders).

Signed-off-by: Robin Jarry <robin@jarry.cc>
---
 config/templates.go      |  9 ++++++---
 doc/aerc-templates.7.scd | 11 +++++++++--
 lib/state/templates.go   | 18 +++++++++---------
 models/templates.go      |  9 ++++++---
 4 files changed, 30 insertions(+), 17 deletions(-)
[message trimmed]

[PATCH aerc 02/10] templates: unify data interface 23 hours ago

From Robin Jarry to ~rjarry/aerc-devel

Require that all aerc template data objects implement the same
TemplateData interface.

Implement that interface in two different places:

1) state.TemplateData (renamed/moved from templates.TemplateData).
   This structure (along with all its methods) needs to be decoupled
   from the templates package to break the import cycle with the config
   package. This allows much simpler construction of this object and
   ensure that values are calculated only when requested.

2) config.dummyData (extracted from templates).
   This is only used in the config package to validate user templates.
   Putting it here allows also to break an import cycle.
[message trimmed]

[PATCH aerc 01/10] account: fix segfault when message store is not initialized 23 hours ago

From Robin Jarry to ~rjarry/aerc-devel

Fix the following error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x130 pc=0x8769b4]

goroutine 1 [running]:
git.sr.ht/~rjarry/aerc/lib.(*MessageStore).Uids(0x40ffa5?)
	git.sr.ht/~rjarry/aerc/lib/msgstore.go:579 +0x14
git.sr.ht/~rjarry/aerc/widgets.(*AccountView).SelectedMessage(0xc0000f41c0)
	git.sr.ht/~rjarry/aerc/widgets/account.go:198 +0x33

Signed-off-by: Robin Jarry <robin@jarry.cc>
---
 widgets/account.go | 3 +++
[message trimmed]