Dear Gottfried <gottfr...@posteo.de>, I use an editor which allows me
to check whether a bit of text is a well formed sexp, that is, a well
formed Lisp expression.  I do not have Guile on the machine I am
writing this on, but I am writing using Emacs.

Here is a syntactically, well, at the level of sexps, well formed
version of your Guix expression:

(services
 (append
  (list (service mate-desktop-service-type)
        (service enlightenment-desktop-service-type)
        (service cups-service-type
                 (cups-configuration
                  (web-interface? #t)
                  (extensions (list cups-filters
                                    hplip))))
        (service openssh-service-type)
        (service tor-service-type)
        (set-xorg-configuration
         (xorg-configuration
          (keyboard-layout keyboard-layout))))
  (modify-services %desktop-services
                   (sane-service-type _ => sane-backends))))

I got this by typing the following into an emacs buffer:

(services
 (append
   (list (service mate-desktop-service-type)
 (service enlightenment-desktop-service-type)
 (service cups-service-type
 (cups-configuration
 (web-interface? #t)
  (extensions (list cups-filters
 hplip))))
 (service openssh-service-type)
 (service tor-service-type)
 (set-xorg-configuration
  (xorg-configuration
  (keyboard-layout keyboard-layout))))
  (modify-services %desktop-services
                   (sane-service-type _ => sane-backends))

which is, I think, the thing you sent to the help-guix list.

I then added a single parenthesis onto your expression and Emacs
showed me that the new right parenthesis matched the left parenthesis
on the second line of your expression.  That is, the left parenthesis
in

 (append

I then added one more right parenthesis, which Emacs showed me matched
the first left parenthesis of your whole expression.  That is, the
left parenthesis in

(services

Assuming Emacs is correct in matching parentheses, the result, as
shown at top, is a Lisply correct sexp.  But it may, or may not, be a
Guixly syntactically correct expression, because the Guix system may
have more constraints on what it accepts as a command, beyond the
constraint of being a proper sexp.

I remain, as ever, your fellow student of history and probability,
Jay Sulzberger


PS. I got the Lisp-traditional (well, a Lisp traditional) indentation
of the (text representation of) the first expression by asking Emacs
to perform:

indent-sexp

on an un-indented version.

PPS. Reading more carefully your post to help-guix, I now understand
that you already completely grasp the main meat of my note.  But as a
member in mostly good standing of the Emacs Tendency of the Front for
Free Software, I send this note.


Reply via email to