Subject: [bug#66557] [PATCH] home: services: Add goimapnotify service.

From: Nils Landt <[email-masked]>
Date: Sun, 26 Nov 2023 12:14:20 +0100 (CET)

Hello,

I have pushed a new version.
Compared to the version you reviewed, I made the following changes:
- docs: Stdin -> stdin
- docs: use file-append for "pass" example
- docs: re-add trailing whitespace
- rework filter + map to use fold instead
- update link to upstream config documentation from master to current commit
- ignore first element in list-of-goimapnotify-accounts?
- add question mark suffix to boolean fields (e.g. tls -> tls?)
- fix "on-new-mail" option in docstring
- remove parentheses around configuration field types

Lastly, some comments on review requests I was unable to implement.

Ricardo:
> So I think it would be better to let these fields accept command lists.
> FILE-APPEND should only join the package value with the file name of the
> executable, but not include any arguments.

I did not understand what this meant. Do you have any examples? I implemented your second suggestion of using file-append for pass instead.

> Could this be (cons (goimapnotify-format-field field-name) value)
> instead?  I don’t think we need this wrapping and unwrapping with G-exp
> syntax.

This results in e.g. ("boxes" . #("INBOX")) , leading to a syntax error in the generated guile script. I'm open to suggestions here.

Bruno:
> This isn't needed, fields whose maybe-values are unset don't call the
> serializing procedures.

combined with

> You can use 'serialize-configuration' instead which accounts for the unset maybe-values.

I put some time into this, but I don't see how serialize-configuration, which returns a gexp including string-append, could be used to turn a configuration record into the format required by guile-json.