Skip to main content

Module mailnote

Module mailnote 

Source
Expand description

New mail as a notification, at the times it may come (docs/porch.md, “Notifications”). The Porch keeps mail until you look; what your lists let through now is also told, once per batch, never once per message: the count in words and the first senders with their subjects. Batched notifications helped attention and mood where none at all made people more anxious (Fitz et al. 2019): what helps is predictability, not silence.

Mail that comes while it may not be told (its sender’s row of the matrix of what reaches you says later or shown, not told, now: as usual, sleep, a pause, Free time, a slot of time for you; attention) waits; when a time begins in which some of it may come, one notification says the Porch opens. A row that says “not at all” now: never told, on the Porch only.

Never told: what is set aside (forged, spam, a borrowed name, blocked), what your own spam filter flagged or moved (the review queue: it waits for your word, on every device), hostile mail, codes (they have their own notification), what you send yourself, the less important accounts, newsletters unless asked, and mail read elsewhere before it came here. Each message once, by its account and Message-ID, told or waiting (Ledger), on this device.

Structs§

Ledger
What was done with each new message, by key: told (or never to tell), or waiting for a time it may come in; with when. On this device only, in $XDG_STATE_HOME/sioul/mail-notified.toml, forgotten after 30 days.
Letter
A letter as a notification names it.
Sorted
A fetch’s arrivals, sorted.

Enums§

Fate
What becomes of a new message now, as the matrix says of its sender.

Constants§

KEPT 🔒
A message’s mark is kept this long: the Porch shows its last two weeks.
NAMED
How many letters a notification names: the count says the rest.

Functions§

batch
The notification of new mail: “Two letters”, and the first senders with their subjects, “Murena, Your invoice · Alice, Dinner on Friday”.
fnv 🔒
gone_by
Among the Porch’s messages, those waiting that will never be told now: read meanwhile, blocked, set aside. Their marks become told.
key
A message’s key: its account and Message-ID, else its file’s unique name (which a change of flags keeps), hashed: the same message fetched again keeps it, the same one in another account is another; and the ledger holds no address and no Message-ID.
moment
The moment as new mail sees it: what now is for, its columns and layers in the matrix (a slot of time for you, do-not-disturb from its switch or a focus session), Free time’s “Nothing at all”, and whether mail may be told at all. When it changes, a time began: what waited and may come now is told once (waited).
named 🔒
The first letters, “Sender, Subject”, joined by “ · “.
never
Whether a message is never told, whatever the time: set aside (forged, spam, a borrowed name, blocked), in the review queue (your own filter flagged it, or moved it into a Junk folder), hostile, a code (it has its own notification), from yourself, in the less important accounts’ lane, a newsletter in the Filed lane unless newsletters (an automatic sender there, a bill from no-reply, is told), or read already.
one_line 🔒
A sender’s name or a subject on one line: a mail’s words never break the notification’s.
opens
When a time begins in which mail that waited may come: “The Porch opens: three letters wait for you.”, the first senders below.
read_already 🔒
Read before it came here (the server said \Seen: read on a phone, in a webmail): nothing to tell.
sort
Sorts the inbox’s arrivals of a fetch, as the Porch judged them: those told now, those that wait, those never told (fate: what the matrix of what reaches you says of each now, attention::Attention::decide; and the lanes never told). A message the ledger knows is left out: told once.
waited
The mail that waited and may come now (now, as for sort): among the Porch’s messages (items), those waiting in the ledger, still unread and not set aside since (a sender blocked meanwhile).