help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

text editor


From: Gottfried
Subject: text editor
Date: Tue, 22 Feb 2022 18:14:32 +0000

Hi, thanks for Your email.
I am not sitting the whole day in front of a computer, I am working in a technical job to help people.

So I didn´t have time to learn any computer language, emacs etc. because I didn´t need it for my life yet.

Which editor You would propose , I should use, to show which brackets belong to each other, as you described in your email?

I guess emacs is too difficult for me to learn, because it would make sense only, if I used it regularly.
So it would be good a more simple editor.

gottfried



Date: Mon, 21 Feb 2022 20:34:05 +0000 ()
From: Jay Sulzberger <jays@panix.com>
To: help-guix@gnu.org
Subject: Re: scanner
Message-ID: <Pine.NEB.4.64.2202211947560.7652@panix3.panix.com>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

Dear Gottfried <gottfried@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

[Prev in Thread] Current Thread [Next in Thread]