From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: on indentation Date: Fri, 14 Jun 2019 21:59:11 +0200 Message-ID: <87d0jgq6pc.fsf@elephly.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50474) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbsMB-0003cX-Vv for guix-devel@gnu.org; Fri, 14 Jun 2019 15:59:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbsM7-0005gc-N9 for guix-devel@gnu.org; Fri, 14 Jun 2019 15:59:25 -0400 Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21367) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbsM4-0005bY-Fw for guix-devel@gnu.org; Fri, 14 Jun 2019 15:59:21 -0400 In-reply-to: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Robert Vollmert Cc: guix-devel@gnu.org 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=E2=80=99t it already usable as an executable? = It is a regular script after all. > * Most source files aren=E2=80=99t 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=E2=80=99t look the way we want t= hem 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=E2=80=99t 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? -- Ricardo