Last active 1 year, 4 months ago
View more

Recent activity

Re: [PATCH] Fix crash on mouse scrolling before messages load 3 months ago

From Wiktor Kwapisiewicz to ~sircmpwn/aerc

On 23.02.2020 09:18, Amir Yalon wrote:
> Curious to know – was this in response to https://todo.sr.ht/~sircmpwn/aerc2/348
> (Crash on embedded terminal mouse scroll event), or was it unrelated?

To be honest I first saw your issue, tried to reproduce it, but then 
found a different bug (that looked similar) and fixed that one.

I should've attached the stacktrace to my commit as it shows the panic 
comes from a different part of code (msglist.go) that your trace doesn't 

I do suspect that fix to your code should also be simple if != nil in 
the line that the stacktrace shows. If you're interested in fixing it 
I'd recommend building from source, reproducing, checking the exact

[PATCH] Fix crash on mouse scrolling before messages load 3 months ago

From Wiktor Kwapisiewicz to ~sircmpwn/aerc

Using mouse scroll before messages load will trigger a panic as
`ml.store` has not been assigned yet and is `nil`.
 widgets/msglist.go | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/widgets/msglist.go b/widgets/msglist.go
index 9aff0d4..51c133c 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -163,10 +163,14 @@ func (ml *MessageList) MouseEvent(localX int, localY int, event tcell.Event) {
				ml.aerc.NewTab(viewer, msg.Envelope.Subject)
		case tcell.WheelDown:
[message trimmed]

[PATCH] Fix crash when no message is selected 5 months ago

From Wiktor Kwapisiewicz to ~sircmpwn/aerc

Pressing `Enter` on a view that has not yet loaded messages (e.g. at
startup) would return `nil` from `Selected()`. Accessing `msg.Uid` on a
`nil` reference crashes aerc.

This patch moves the `msg == nil` check before accessing `msg.Uid` thus
avoiding the crash.

To test this patch repeatedly press `Enter` on startup.
 commands/account/view.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/commands/account/view.go b/commands/account/view.go
index b287406..aab9052 100644
[message trimmed]

Re: [PATCH 1/1] nginx/http.conf: security headers 6 months ago

From Wiktor Kwapisiewicz to ~sircmpwn/sr.ht-dev

One more thing (sorry for the reply spam):

> +add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;

"preload" can be dangerous if enabled on a whim:


Preload + hstspreload.org submission will make browsers *always* use 
HTTPS for sr.ht + subdomains with no workaround (if cert is invalid 
there won't be a "load site anyway" button in the browser UI).

In 2019 SSL certs are available for free so it's not a big problem but I 
think it's good to point out the ramifications of this process: removing

Re: [PATCH 1/1] nginx/http.conf: security headers 6 months ago

From Wiktor Kwapisiewicz to ~sircmpwn/sr.ht-dev

Hi Kyle,

> +add_header Upgrade-Insecure-Requests "1" always;

Upgrade-Insecure-Request seems to be a request header (that is sent by 
clients, not servers). More info on MDN:


and in the spec:


Kind regards,

Re: Using git am --message-id 1 year, 1 day ago

From Wiktor Kwapisiewicz to ~sircmpwn/sr.ht-discuss

On 25.05.2019 22:40, Drew DeVault wrote:
> Interesting idea, but I'd like to explore ways of implementing this that
> don't require extra intervention from users. Ideally we would find a
> solution that just works by default.

Got it. For the record git has "am.messageid" configuration variable 
that can be set once and it will "just work".

I generally enjoy git's "stupid content tracker" motto and that it 
doesn't try to be too "smart" but I'd be interested in looking at how 
would the automatic detection work.

Kind regards,

Using git am --message-id 1 year, 1 day ago

From Wiktor Kwapisiewicz to ~sircmpwn/sr.ht-discuss


I just found out that git am accepts "--message-id" option that causes 
it to embed Message-ID from the patch e-mail into the commit message.

Would it be useful for SourceHut to detect such embedded Message IDs and 
re-use it for cross-linking and automatic management of patch status? 
(For example if a commit with Message-ID is pushed then the relevant 
patch e-mail can be marked as "merged").

Kind regards,


[PATCH] Fix git commit signoff command 1 year, 1 month ago

From Wiktor Kwapisiewicz to ~eliasnaur/gio

Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
I don't know if line doesn't need to be re-flowed to adjust to line
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 9687d30..321e99d 100644
--- a/README.md
+++ b/README.md
@@ -113,7 +113,7 @@ With `git send-email` configured, you can clone the project and set it up for su

Contributors must agree to the [developer certificate of origin](https://developercertificate.org/),
[message trimmed]

Re: Contributions without a sr.ht account 1 year, 2 months ago

From Wiktor Kwapisiewicz to ~sircmpwn/sr.ht-discuss

Hi Elias,

> Or a special mailing list address could turn all emails into tickets
> more or less automatically, just like Zendesk
> and the like.

I like that idea.

I'm actually wondering why it wasn't pursued as on first sight a bug 
tracker could be easily modelled using a mailing list where for each 
thread there is a little bit of metadata stored (status, label) that 
could be changed via e-mail interface. I guess that would be similar to 
Debbugs in some aspects.

Re: Why hard wrap at 72 in lists 1 year, 4 months ago

From Wiktor Kwapisiewicz to ~sircmpwn/sr.ht-discuss

On 22.01.2019 11:27, Wolf480pl wrote:
> W dniu 22.01.2019 o 00:29, Ludovic Chabant pisze:
>> I found some interesting blog post from FastMail (the email provider I
>> use and, arguably, one of the top paid providers) about why they don't
>> plan to support "format=flowed":
>> https://fastmail.blog/2016/12/17/format-flowed/
>> (basically nobody supports it so as a result... nobody supports it :) )
> They have an interesting point about patches getting broken.
> The format=flowed RFC supports having lines that are explicitly meant
> not to be wrapped (they call them "fixed lines") but looks like
> many format=flowed MUAs don't give you a way to write such lines