From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: indent with emacs batch mode Date: Sat, 07 Jan 2017 08:25:24 +0100 Message-ID: <87shovcowr.fsf@elephly.net> References: <87y3yocil2.fsf@elephly.net> <87inpr8l6y.fsf@gmail.com> 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]:52112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPlNh-0000sr-4E for guix-devel@gnu.org; Sat, 07 Jan 2017 02:25:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPlNd-00050U-P8 for guix-devel@gnu.org; Sat, 07 Jan 2017 02:25:37 -0500 Received: from sender163-mail.zoho.com ([74.201.84.163]:21429) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cPlNd-00050I-F2 for guix-devel@gnu.org; Sat, 07 Jan 2017 02:25:33 -0500 In-reply-to: <87inpr8l6y.fsf@gmail.com> 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: Alex Kost Cc: guix-devel Hi Alex, I’m glad that my public display of my lack of skill with Emacs batch mode has prompted you to come up with a much nicer solution that actually works :) My first version actually did use “re-search-forward” and required the user to input both file name and package variable. I had hoped to simplify this a little by using “guix-location”. > And here are the lines for the environment and running emacs (I used > 'emacs-no-x' as it is not so heavy as 'emacs'): > > guix environment --ad-hoc emacs-no-x emacs-guix > > emacs -q --no-site-file --batch -l indent-package-expr.el /path/to/package-file.scm package-name Thanks for the code and the example invocation! > All that stuff can work without 'emacs-guix' (if the line with > 'guix-devel-mode' scheme hook will be removed), but in this case the > package may not be indented properly. Guix still comes with a “.dir-locals.el” that specifies the indentation rules, doesn’t it? Can we use that? -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC http://elephly.net