unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Cameron <cam@tindall.space>
To: "julia.galaman--- via" <help-guix@gnu.org>
Subject: Re: Correct formatting of Guile in Emacs
Date: Mon, 01 Feb 2021 15:18:17 -0600	[thread overview]
Message-ID: <f386552d-2081-4942-8148-395e91d01d2c@www.fastmail.com> (raw)
In-Reply-To: <85v9bbec1e.fsf@beadling.co.uk>

Hi Phil,

I haven't done this myself, but the manual has a page on this: https://guix.gnu.org/manual/en/html_node/Formatting-Code.html

From this, it seems like the 'emacs-guix' package has a 'guix-devel-mode' that should indent per the Guix style guide.

-Cam

On Mon, Feb 1, 2021, at 3:03 PM, Phil wrote:
> Hi,
> 
> I'm in a position where I have quite a few packages built that I'd like
> to contribute to Guix.
> 
> I'm writing these in emacs with scheme-mode/geiser installed.  However
> I've noted that any attempt to align my Guile code (eg M-x indent-region)
> results in code being aligned under the previous lines' parameter rather
> than simply indenting.
> 
> So my code looks much wider, and uglier (IMHO) than that in the Guix repo:
> 
> (something like
>   (this type
>     (of format)))
> 
> ends up being reformated by Emacs to look like this:
> 
> (something like
>            (this type
>                  (of format)))
> 
> The more nesting and split lines the crazier this gets.  Some packages
> are unreadable using emacs' default scheme indentation without a large monitor!
> 
> It seems like an simple question (hopefully not too off-topic!) - but
> how do I make Emacs conform to code alignments rules adopted by Guile/Guix repo?
> 
> Is there an off-the-shelf setting, package or setup I can use?
> 
> The Guile manual mentions "Emacs has good support for Scheme out of the
> box, with sensible indentation rules" - but these defaults seem at odds
> with the Guix repo (or I'm doing something daft!):
> 
> https://www.gnu.org/software/guile/manual/html_node/Using-Guile-in-Emacs.html#Using-Guile-in-Emacs
> 
> 
> Thanks,
> Phil.
> 
>


  reply	other threads:[~2021-02-01 21:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 21:03 Correct formatting of Guile in Emacs Phil
2021-02-01 21:18 ` Cameron [this message]
2021-02-01 22:15   ` Phil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f386552d-2081-4942-8148-395e91d01d2c@www.fastmail.com \
    --to=cam@tindall.space \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).