From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: Code formatting Date: Sun, 11 Sep 2016 18:35:38 +0200 Message-ID: <20160911163538.GH746@solar> References: <20160729082357.17501-1-david@craven.ch> <87lh0kxncf.fsf@gnu.org> <20160730085741.GC23346@solar> <871t2aagqd.fsf_-_@gnu.org> <20160731123412.7515094d@scratchpost.org> <874m76845l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bj7jR-0006VV-Iv for guix-devel@gnu.org; Sun, 11 Sep 2016 12:35:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bj7jN-0004sN-D7 for guix-devel@gnu.org; Sun, 11 Sep 2016 12:35:48 -0400 Received: from mailrelay7.public.one.com ([91.198.169.215]:18861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bj7jM-0004sD-W8 for guix-devel@gnu.org; Sun, 11 Sep 2016 12:35:45 -0400 Content-Disposition: inline In-Reply-To: <874m76845l.fsf@gnu.org> 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: Ludovic =?iso-8859-15?Q?Court=E8s?= Cc: guix-devel@gnu.org On Sun, Jul 31, 2016 at 12:59:02PM +0200, Ludovic Courtès wrote: > Danny Milosavljevic skribis: > >> Bonus to whoever posts indentation rules for their favorite editor! :-) > > Is there a standalone program that reformats Scheme code to what we want it to be? > There’s Emacs, which can be invoked for batch processing. I’m not sure > what the right incantation is. > > Though to me, it sounds more productive to have $EDITOR do the right > thing. Well, that would be optimal, but there are so many editors in the wild... So I still think it would be good to have a batch processor, or at least a recipe for non-emacs users on which keys to press to obtain correct indentation, like so (from my vague memory of emacs): run "emacs module.scm" press "n" or "arrow down" until you arrive on the package recipe alternate "tab" and "n" until you arrive at the end of the recipe press "ctrl-x ctrl-somethingelse" Also, it might be good to do one commit that fixes all indentations, since I tend to copy wrongly indented code (from my own and other people's recipes). Andreas