~jeffas

Recent activity

[PATCH v3] Add pinned tabs a month ago

From Jeffas to ~sircmpwn/aerc

This adds the commands pin-tab and unpin-tab. Once pinned a tab lives on
the left of the tabstrip and has a configurable marker, defaulting to `
before its name.
---

Rebased on master and updated to use the MoveTab logic.

Might still be missing things or the logic might not be perfect, let me
know any problems :).

 commands/pin-tab.go   | 36 +++++++++++++++++++++++
 config/aerc.conf.in   |  5 ++++
 config/config.go      |  2 ++
 doc/aerc-config.5.scd |  5 ++++
[message trimmed]

Re: [PATCH] Count recent messages in maildir exists total too a month ago

From Jeffas to ~sircmpwn/aerc

> I dont' have an opinion, but we should do it the same over all workers.

Agreed, it should be consistent.

> What's your take on it?

I'd expect that recent is the number of messages in a mailbox which have
not been seen before and that are unread (since they have not been seen
before). This fits with IMAPs RECENT and maildir's `new` I believe.

Then unread(/unseen) would be the number of recent messages plus the
number of unread messages in the rest of the mailbox which are not
recent.

Re: [PATCH v3] Add move-tab command a month ago

From Jeffas to ~sircmpwn/aerc

On Mon Mar 2, 2020 at 10:22 PM PST, Reto wrote:
> Let's see if someone else has a remark, if not I'll merge it in a day or
> two
> if that's fine for you.

Certainly, thanks again.

[PATCH] Count recent messages in maildir exists total too a month ago

From Jeffas to ~sircmpwn/aerc

---
 worker/maildir/worker.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index 17123c6..3f0bd0a 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -136,7 +136,6 @@ func (w *Worker) getDirectoryInfo(name string) *models.DirectoryInfo {
		w.worker.Logger.Printf("could not get uids: %v", err)
		return dirInfo
	}
	dirInfo.Exists = len(uids)
[message trimmed]

Re: [PATCH v2] Add move-tab command a month ago

From Jeffas to ~sircmpwn/aerc

Thanks for catching this. I've updated it to handle history updates too
now.

[PATCH v3] Add move-tab command a month ago

From Jeffas to ~sircmpwn/aerc

---
v2 -> v3:
    fix tab history

We now rewrite the history with the updated indices.

 commands/move-tab.go | 51 ++++++++++++++++++++++++++++++++++++++++++++
 doc/aerc.1.scd       |  4 ++++
 lib/ui/tab.go        | 41 +++++++++++++++++++++++++++++++++++
 widgets/aerc.go      | 12 +++++++++++
 4 files changed, 108 insertions(+)
 create mode 100644 commands/move-tab.go

diff --git a/commands/move-tab.go b/commands/move-tab.go
[message trimmed]

Re: [PATCH v2] Add move-tab command a month ago

From Jeffas to ~sircmpwn/aerc

On Sun Mar 1, 2020 at 3:01 PM PST, Reto wrote:
> Ah... I was too lazy to write a script in go... used python to
> validate...
>
> python: -42 % 4
> 2

Yeah, Go is one of the different ones.

> Thanks for the effort :) (and sorry for being a bother)

No worries, thanks for being thorough!

Re: [PATCH v2] Add move-tab command a month ago

From Jeffas to ~sircmpwn/aerc

On Sun Mar 1, 2020 at 2:36 PM PST, Reto wrote:
> On Sun Mar 1, 2020 at 2:27 PM, Reto wrote:
> > I'm confused here, isn't ($something + $num) % $num always just $something?
> > After your first modulo you are in the range of 0 to $something - 1.
>
> ^ that should have said:
> After your first modulo you are in the range of 0 to $l - 1.
>
> What I mean is that $something is already bounded to the same range the
> second modulo
> enforces, else the rest of my mail wouldn't make sense.
>
> > Adding the number l to it and using modulo l yields $something, simply reverting
> > the add operation you just made.

[PATCH v2] Add move-tab command a month ago

From Jeffas to ~sircmpwn/aerc

---
v1 -> v2:
    Use modulo instead of loops for calculating the index.

 commands/move-tab.go | 51 ++++++++++++++++++++++++++++++++++++++++++++
 doc/aerc.1.scd       |  4 ++++
 lib/ui/tab.go        | 22 +++++++++++++++++++
 widgets/aerc.go      | 12 +++++++++++
 4 files changed, 89 insertions(+)
 create mode 100644 commands/move-tab.go

diff --git a/commands/move-tab.go b/commands/move-tab.go
new file mode 100644
index 0000000..9f0293c
[message trimmed]

[PATCH] Add move-tab command a month ago

From Jeffas to ~sircmpwn/aerc

---
 commands/move-tab.go | 61 ++++++++++++++++++++++++++++++++++++++++++++
 doc/aerc.1.scd       |  4 +++
 lib/ui/tab.go        | 22 ++++++++++++++++
 widgets/aerc.go      | 12 +++++++++
 4 files changed, 99 insertions(+)
 create mode 100644 commands/move-tab.go

diff --git a/commands/move-tab.go b/commands/move-tab.go
new file mode 100644
index 0000000..1e7d6c8
--- /dev/null
+++ b/commands/move-tab.go
@@ -0,0 +1,61 @@
[message trimmed]