~bsprague

Pacific Northwest

https://bsprague.com/

~bsprague/patchwork

Last active a month ago
View more

Recent activity

Re: Fuzzy matching for :open-link a month ago

From Brandon Sprague to ~rjarry/aerc-devel

Thanks for all the tips! Between `[ui].fuzzy-complete` and `:unsubscribe`, seems
like I should have everything I need for now.


On Wed Sep 4, 2024 at 8:12 AM PDT, inwit wrote:
> We do have [ui].fuzzy-complete in the config, doesn't that work for you?

Not sure how I missed this option, it's pretty much exactly what I want. So far,
the algorithm has been fine, but I'll try tweaking it if I find examples where I
think it works poorly.


On Wed Sep 4, 2024 at 5:29 AM PDT, Peter Sanchez wrote:
> For this I simply map C-l to use urlscan[0] instead of the default 

Fuzzy matching for :open-link a month ago

From Brandon Sprague to ~rjarry/aerc-devel

Hi there,

Frequently I want to use the `:open-link` command, but the email has a dozen
links that all look vaguely similar, and I want to just search for the unique
bit (usually 'unsubscribe'), but the command palette matching seems to be
prefix-based, which isn't useful in this context.

I'm planning on adding this functionality, and wanted to double-check others
would find it useful, as well as ask a few other questions:

- Should this be only for `:open-link`, for all command arg completion, or
configurable?
- Do folks care about the algorithm?

Re: [PATCH go-jmap 1/2] Fix an issue with `isAscending` 7 months ago

From Brandon Sprague to ~rockorager/go-jmap-devel

Thanks!

One thing that didn't occur to me until after is that this
unfortunately isn't a backwards compatible change. Since the library
is pre-1.0.0, it's probably fine, but worth noting. Anywhere that
'IsAscending' is not specified will now sort in the opposite direction
(assuming a compliant JMAP server).

The other alternative would be to make 'isAscending' a *bool, but
that's just backwards-incompatible in a different way, causing
compilation errors for anyone currently specifying 'IsAscending'. That
approach has the benefit of failing loudly rather than quietly though.

Brandon

Re: [PATCH go-jmap 1/2] Fix an issue with `isAscending` 7 months ago

From Brandon Sprague to ~rockorager/go-jmap-devel

> Do I have that right?

Yup, that's exactly correct! A value of false gets omitted with
`omitempty`, but the default in the spec is true in its absence, so
there's no way to say "this should be sorted descending". With
`omitempty`:

- No value -> Go sends nothing -> isAscending == true
- Set false -> Go sends nothing -> isAscending == true
- Set true -> Go sends true -> isAscending == true

Brandon

[pages] Allowing APIs on custom domain subdomains in CSP policy 1 year, 1 month ago

From Brandon Sprague to ~sircmpwn/sr.ht-discuss

Hello!

One thing that would increase the utility of static sites, without
opening them up to much chicanery, would be to relax the CSP policy
_slightly_ on custom domains. Specifically, adding something like:

Content-Security-Policy: connect-src self https://*.<custom domain>/;

(I have not tested this particular invocation)

This change would allow a static frontend to communicate with a (non-
sourcehut pages hosted) API backend, running something like Pocketbase
(https://github.com/pocketbase/pocketbase), for example.

[PATCH v2] Demonstrate that I can use git send-email 1 year, 2 months ago

From Brandon Sprague to ~sircmpwn/email-test-drive

---
 brandon-sprague | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 brandon-sprague

diff --git a/brandon-sprague b/brandon-sprague
new file mode 100644
index 0000000..7fbef93
--- /dev/null
@@ -0,0 +1 @@
I have successfully used git send-email!
\ No newline at end of file
--
[message trimmed]

[PATCH] Demonstrate that I can use git send-email 1 year, 2 months ago

From Brandon Sprague to ~sircmpwn/email-test-drive

---
 brandon-sprague | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 brandon-sprague

diff --git a/brandon-sprague b/brandon-sprague
new file mode 100644
index 0000000..6d0ecfd
--- /dev/null
@@ -0,0 +1 @@
I'm about to try git send-email
-- 
2.41.0
[message trimmed]