[Top][All Lists]

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

Re: on indentation

From: Ricardo Wurmus
Subject: Re: on indentation
Date: Fri, 14 Jun 2019 21:59:11 +0200
User-agent: mu4e 1.2.0; emacs 26.2

Hi Robert,

> * I can run etc/indent-code.el by hand from the guix source
> repo, but it would be much nicer to have it available as a
> regular executable.

I would not package it.  Isn’t it already usable as an executable?  It
is a regular script after all.

> * Most source files aren’t indented according to etc/indent-code.el,
> presumably because guix import uses (ice-9 pretty-print) which does
> things differently. How to deal with this?

The importers produce expressions that don’t look the way we want them
to look.  Usually we re-indent the code (with etc/indent-code.el or the
equivalent manual invocation in Emacs) before committing.

Some existing code, however, may predate our indentation refinements,
and yet other parts may have been overlooked.  When we touch those
sections anyway we may also adjust the indentation, but making purely
cosmetic commits is discouraged.

> * Is anyone aware of a different command-line guile/scheme/sexp
> code formatter? etc/indent-code.el is a bit slow, and a tool that
> reformats stdin to stdout would be useful for calling from other
> editors.

I don’t think such a tool exists, also because we specify special
indentation rules for certain Guix-specific macros.  Emacs allows us to
do that so etc/indent-code.el uses Emacs.

Perhaps we can speed it up a little?


reply via email to

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