guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feedback on indentation rules


From: Maxim Cournoyer
Subject: Re: Feedback on indentation rules
Date: Thu, 09 Mar 2023 08:55:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi Simon,

Simon Tournier <zimon.toutoune@gmail.com> writes:

> Hi Maxim,
>
> On Tue, 07 Mar 2023 at 11:54, Maxim Cournoyer <maxim.cournoyer@gmail.com> 
> wrote:
>
>>> For what it is worth, I do not see an high difference between the both
>>> indentations.  So, my opinion would to keep the current practise.
>>
>> Please take a look at my original message in this thread,
>> https://lists.gnu.org/archive/html/guix-devel/2023-02/msg00297.html,
>> where I gave examples of gexp->derivation indentations that should
>> explain the rationale allow nesting arguments more naturally, as if
>> gexp->derivation was a special form (although it's a simple procedure).
>
> Yeah, I have read this rationale before. :-)
>
> My question was somehow directed to Ludo:
>
>         > Yes, that’s my take and current practice so far: special rules for
>         > special forms (macros), not for procedures.
>
>         What is the rationale?  Being able to know directly at the location 
> when
>         it is a plain function or a special form?
>
> Sorry for having been unclear.
>
> And I do not see a big difference between,
>
>           (gexp->derivation "check-deb-pack"
>             (with-imported-modules '((guix build utils))
>
> or
>
>           (gexp->derivation "check-deb-pack"
>                             (with-imported-modules '((guix build utils))
>
> It is somehow personal cosmetic and I am sometimes poor person about
> cosmetic. ;-)

In the second case, we end up busting the 80 chars limit easily, so it
usually ends up formatted as:

--8<---------------cut here---------------start------------->8---
            (gexp->derivation
             "check-deb-pack"
             (with-imported-modules '((guix build utils))
              [...]

or

            (define builder
              #~(the builder code))

            (gexp->derivation
             "name"
             builder)
--8<---------------cut here---------------end--------------->8---

Which is not very natural (in fact, I had found already used
indentation like 1) in tests/pack.scm before I adjusted the
.dir-locals.el file to match it, otherwise Emacs was re-indenting them
differently).

-- 
Thanks,
Maxim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]