From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Tool to format/indent scheme code Date: Sat, 04 Mar 2017 22:05:22 +0300 Message-ID: <87wpc4amml.fsf@gmail.com> References: <878tolwprw.fsf@163.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckEzh-0003a3-FY for help-guix@gnu.org; Sat, 04 Mar 2017 14:05:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckEzc-00025V-Hj for help-guix@gnu.org; Sat, 04 Mar 2017 14:05:29 -0500 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:33471) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ckEzc-00024X-9g for help-guix@gnu.org; Sat, 04 Mar 2017 14:05:24 -0500 Received: by mail-lf0-x242.google.com with SMTP id r36so10240196lfi.0 for ; Sat, 04 Mar 2017 11:05:22 -0800 (PST) In-Reply-To: <878tolwprw.fsf@163.com> (Ying Huang's message of "Sat, 04 Mar 2017 13:54:11 +0800") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: "Huang, Ying" Cc: help-guix Huang, Ying (2017-03-04 13:54 +0800) wrote: > Hi, All, > > Sometimes, I want to check the contents of auto-generated scheme code in > store. But the readability is not very good. So I want to use a code > format/indent tool to help on this. Do you know is there such tool in > Guix? If no, any tool not in Guix? Thanks in advance! In Emacs you can use "C-u M-x indent-pp-sexp" to pretty print a sexp after the point. BTW, if anyone is interested, Emacs-Guix uses 'indent-pp-sexp' to pretty-print Shepherd config of a system generation, which can be shown like this: 1. Run "M-x guix-system-generations" 2. Press "RET" on any generation to get more info 3. Press "Pretty print" button -- Alex