Posts
4417
Following
315
Followers
471
Linux kernel hacker and maintainer etc.

OpenPGP: 3AB05486C7752FE1
the circle has closed: https://sound-force.nl/?page_id=2318
0
0
0
@bremner @jani Anyway thanks for the comments! I now at least know what the problem is so this helped.
0
0
1
@bremner @jani Right, in mutt it was nice because you could limit the view with ~= based on message ID's and quickly delete the most obvious ones and check manually rest.

So, can notmuch form a query that would be 1:1 match to what ~= does in mutt? In that case I can use that together with :query command in aerc.
2
0
0
@bremner @jani mutt just has a hash table of message ID's that it uses (pattern.c, thread.c and hash.c in its src tree).
1
0
0

@bremner @jani I’m wondering here, did ~= in mutt do full body compare…

I’m also thinking that as aerc has this:

:query [-a <account>] [-n name] [-f] <notmuch query>
Create a virtual folder using the specified top-level notmuch query. 
This command is ex clusive to the notmuch backend. 

[man aerc]

Maybe one possibility would be feasible to implement directly into aerc :duplicate which would similarly create a virtual folder for duplicates, which would then allow interactively decide the faith (as it is for filter and query). This could potentially then do full body compare as it was within the implementation in Go.

1
0
0
@jani The most optimal would be something that would be just notmuch search query because :query command in aerc is able to do virtual folder of the messages. Then I could just add a binding to aerc.conf and would not need a script in the first place.
0
0
0

@jani And it does work ;-) That is always a a good state to begin with. I actually wanted to learn notmuch only because aerc does not have ~= query of mutt.

1
0
0
@jani How? I just started to use it.
1
0
0

Now that I’m already using maildirs again, I could fulfill the lacking feature from #aerc (compared to #mutt) using #notmuch, which de-duplicates my emails:

#!/usr/bin/env bash
#
# Copyright (c) Jarkko Sakkinen 2024
# JSON queries ripped from https://github.com/esovetkin/notmuch-deduplicate

set -e

QUERY='*'

notmuch show \
  --format=json \
  --entire-thread=false \
  --body=false \
  "${QUERY}" | \
  jq \
    -n \
    --stream 'fromstream(1 | truncate_stream(inputs))' | \
  jq -r '.. | .filename? //empty | @tsv'  | \
  grep '\t' | \
  awk -F'\t' '{for (i=2; i<=NF; i++) print $i}' | \
  xargs -I{} rm -v "{}"
notmuch new

# vim: filetype=vim ts=2 sw=2 et

#email

0
0
0
@mjg59 Generally I think that the best way to practically understand "virtual" security and access control is to reflect that with physical security.
0
0
0
@mjg59 Yes, similarly as my door adds physical security for getting into my house. With the right set of tools it can be can be torn off the hinges, but still I feel safer having a door, an not just plain doorway...
2
0
3
I used to use #fdm for many years, last few I've simply used #IMAP access a Finnish server, an since yesterday #isync. It gets less in the way than fdm (especially with verbatim folders) but still provides offline access and allows to use #notmuch, which integrated to #aerc. :-)

#email
0
0
0
Edited 11 months ago

Improved my #email workflow a bit with #isync.

So the basic config in ~/.mbsyncrc is:

IMAPAccount kapsi
Host mail.kapsi.fi
User jjs
PassCmd "pass show imap/mail.kapsi.fi"
SSLType IMAPS

IMAPStore kapsi-remote
Account kapsi

MaildirStore kapsi-local
SubFolders Verbatim
Path ~/.mail/kapsi/
Inbox ~/.mail/kapsi/INBOX

Channel kapsi
Far :kapsi-remote:
Near :kapsi-local:
Patterns *
Create Both
Expunge Both
SyncState *

Essentially only other change I had to do was repeal and replace sources in ~/.config/aerc/accounts.conf (I was already using msmtp since many many years ago):

[personal]
source			= maildir://~/.mail/kapsi
outgoing		= msmtp -a iki.fi
default                 = INBOX
from                    = Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
copy-to                 = Sent

[kernel]
source			= maildir://~/.mail/kapsi
outgoing		= msmtp -a iki.fi
default                 = INBOX
from                    = Jarkko Sakkinen <jarkko@kernel.org>
copy-to                 = Sent
folder-map              = ~/.config/aerc/folder-maps/kernel.map

For the record kernel.map (also existed previously unrelated to this change) is just:

personal = INBOX
INBOX = kernel

I use this magic given that @kernel.org routes to a sub-address of the same account.

Have been planning to level up here for a long while so thought now is the time given tomorrow is first workday after holidays.

0
0
0
Almost feel ashamed writing such a dumb tool but the truth is that #musicians love bad software (and companies that hate musicians).

Best alternative I know for this would be this ugly Win32 vomit:
1
0
0
Edited 11 months ago
was worth of trouble making this quick little tool for getting millisecond lengths for different divisions.

i think i also add note frequency chart type of thing to it but that is less crucial. Does all calculations with rational numbers instead of floating point numbers as there are no imaginary numbers in this context.

#audio #midi #delay #MusicProduction
1
0
0
@kedde forgot to multiply beat length by four, and also found a pure Rust crate, which seems rather sane and properly maintained: https://github.com/cmpute/dashu

So going forward with that.
0
0
0
Show older