[MlMt] Neet help for the query language in MailMate

Mike Brasch mikebrasch at fastmail.fm
Wed Oct 12 14:41:35 EDT 2022



On 12 Oct 2022, at 18:22, Glenn Parker wrote:

> There is some documentation buried in the builtin help under the 
> “Hidden Preferences” section. If you search for “format 
> string” in that section, under “Other”, and follow the link, 
> you’ll get this (and only this):

Yes, I had also found that earlier. Unfortunately, it lacks a bit of 
explanation.

>     Format String Syntax
>
>     ${«var»:?«if»:«else»}
>     ${«var»:+«if»}
>     ${«var»:-«else»}
>     ${«var»:«else»}
>     ${«var»/«regexp»/«format»/«options»}
>     ${«var»:[/upcase][/downcase][/capitalize][/asciify]}

In my special case, I have several lists with a header like:

```List-ID: NixOS Discourse | Development Moderation 
<moderation.development.discourse.nixos.org>```

and subject with double blobs like:

```[NixOS Discourse][Development] Anyone up for picking at some Nix 
~onboarding improvements?```

Do you see a way to pick up the 2nd blob? At this moment I get 15 smart 
subfolder with "NixOS Discourse". I see two options to resolve this:

  - auto-generated names like "NixOS Discourse – Development" or 
"NixOS Development" (which I would prefer)
  - all mails go to "NixOS Discourse", regardles of their sub-blob

Any ideas?

> Breaking down your original format string, I get this:

Wow, thank you for this. :)


PS and advertising: Nix is a packet manager on steroids, which runs on 
nearly every Linux distribution, macOS and Windows/WSL and BSD. One of 
the outstanding features is, that there is no dependency-hell by design. 
And with ca. 80000 packets nixpkgs is by far the biggest repository of 
all. If one has problems with homebrew, give Nix a shot. :)

-- 
Best Regards
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20221012/99169ec7/attachment.htm>


More information about the mailmate mailing list