unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 'origin' indentation rule.
@ 2015-09-10 21:26 Mathieu Lirzin
  2015-09-11 17:08 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Lirzin @ 2015-09-10 21:26 UTC (permalink / raw)
  To: guix-devel

Hi,

While reviewing patches I got confused when I discovered that
indentation for 'origin' is not consistent in package definitions.

Since commit 35ef3633001b05c25324c6e5a69d635ddc62cb6d, which add

   (eval . (put 'origin 'scheme-indent-function 0))

In .dir-locals.el, it seems that there has been quite a lot of commits
since then that don't use this rule.  Even in the manual the "suggested"
way is not clear since for example "doc/package-hello.scm" uses the rule,
but (info "(guix)Defining Packages") doesn't.

I failed to retrieve the post where this rule has been suggested (if
there is one), so I don't know the rationale behind it.  My personnal
opinion is that for the sake of simplicity and column saving we should
remove it. But Whatever the final decision is, I think it's important to be
consistent at least in the manual and the importers.

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'origin' indentation rule.
  2015-09-10 21:26 'origin' indentation rule Mathieu Lirzin
@ 2015-09-11 17:08 ` Ludovic Courtès
  2015-09-11 17:09   ` Thompson, David
  2015-09-11 19:35   ` Mathieu Lirzin
  0 siblings, 2 replies; 6+ messages in thread
From: Ludovic Courtès @ 2015-09-11 17:08 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Hello!

Mathieu Lirzin <mthl@openmailbox.org> skribis:

> I failed to retrieve the post where this rule has been suggested (if
> there is one), so I don't know the rationale behind it.

I don’t think it was discussed at the time.  It’s just that I like
‘package’ and ‘origin’ indented like ‘begin’, I think it’s more pleasant
to the eye.  :-)

> My personnal opinion is that for the sake of simplicity and column
> saving we should remove it. But Whatever the final decision is, I
> think it's important to be consistent at least in the manual and the
> importers.

It’s a good idea to have the manual conform to the rule.

Other than that, I think it’s no big deal if some packages don’t follow
exactly this rule.  I encourage people to follow this rule, but I prefer
a patch that violates it than no patch at all.  I guess it’s about
finding the right balance between nitpicking and welcoming.  ;-)

Importers render code with (ice-9 pretty-print), which is quite
primitive, so they cannot follow sophisticated rules.

So apart from the manual, I wouldn’t change anything.
What do people think?

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'origin' indentation rule.
  2015-09-11 17:08 ` Ludovic Courtès
@ 2015-09-11 17:09   ` Thompson, David
  2015-09-11 19:12     ` Mathieu Lirzin
  2015-09-11 19:35   ` Mathieu Lirzin
  1 sibling, 1 reply; 6+ messages in thread
From: Thompson, David @ 2015-09-11 17:09 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Fri, Sep 11, 2015 at 1:08 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> Hello!
>
> Mathieu Lirzin <mthl@openmailbox.org> skribis:
>
>> I failed to retrieve the post where this rule has been suggested (if
>> there is one), so I don't know the rationale behind it.
>
> I don’t think it was discussed at the time.  It’s just that I like
> ‘package’ and ‘origin’ indented like ‘begin’, I think it’s more pleasant
> to the eye.  :-)
>
>> My personnal opinion is that for the sake of simplicity and column
>> saving we should remove it. But Whatever the final decision is, I
>> think it's important to be consistent at least in the manual and the
>> importers.
>
> It’s a good idea to have the manual conform to the rule.
>
> Other than that, I think it’s no big deal if some packages don’t follow
> exactly this rule.  I encourage people to follow this rule, but I prefer
> a patch that violates it than no patch at all.  I guess it’s about
> finding the right balance between nitpicking and welcoming.  ;-)
>
> Importers render code with (ice-9 pretty-print), which is quite
> primitive, so they cannot follow sophisticated rules.
>
> So apart from the manual, I wouldn’t change anything.
> What do people think?

Sounds fine to me.  It's best to be consistent, but this isn't a big deal.

- Dave

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'origin' indentation rule.
  2015-09-11 17:09   ` Thompson, David
@ 2015-09-11 19:12     ` Mathieu Lirzin
  0 siblings, 0 replies; 6+ messages in thread
From: Mathieu Lirzin @ 2015-09-11 19:12 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

"Thompson, David" <dthompson2@worcester.edu> writes:

> Sounds fine to me.  It's best to be consistent, but this isn't a big deal.

yeah I know...

I tend to have OCD in regards of code formatting.  Sorry about that.  :)

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'origin' indentation rule.
  2015-09-11 17:08 ` Ludovic Courtès
  2015-09-11 17:09   ` Thompson, David
@ 2015-09-11 19:35   ` Mathieu Lirzin
  2015-09-11 20:57     ` Ludovic Courtès
  1 sibling, 1 reply; 6+ messages in thread
From: Mathieu Lirzin @ 2015-09-11 19:35 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin <mthl@openmailbox.org> skribis:
>
>> I failed to retrieve the post where this rule has been suggested (if
>> there is one), so I don't know the rationale behind it.
>
> I don’t think it was discussed at the time.  It’s just that I like
> ‘package’ and ‘origin’ indented like ‘begin’, I think it’s more pleasant
> to the eye.  :-)

Ok, that makes sense. :)

> It’s a good idea to have the manual conform to the rule.
>
> Other than that, I think it’s no big deal if some packages don’t follow
> exactly this rule.  I encourage people to follow this rule, but I prefer
> a patch that violates it than no patch at all.  I guess it’s about
> finding the right balance between nitpicking and welcoming.  ;-)

"encourage" means that this is OK that those who use Emacs and/or know
this rule apply silently this indentation rule when for example updating
a package definition?

> Importers render code with (ice-9 pretty-print), which is quite
> primitive, so they cannot follow sophisticated rules.

OK, I didn't know about that.

> So apart from the manual, I wouldn’t change anything.

I will send a patch for this, if we agree on that.

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'origin' indentation rule.
  2015-09-11 19:35   ` Mathieu Lirzin
@ 2015-09-11 20:57     ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2015-09-11 20:57 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@openmailbox.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:

>> Other than that, I think it’s no big deal if some packages don’t follow
>> exactly this rule.  I encourage people to follow this rule, but I prefer
>> a patch that violates it than no patch at all.  I guess it’s about
>> finding the right balance between nitpicking and welcoming.  ;-)
>
> "encourage" means that this is OK that those who use Emacs and/or know
> this rule apply silently this indentation rule when for example updating
> a package definition?

Sure.

>> So apart from the manual, I wouldn’t change anything.
>
> I will send a patch for this, if we agree on that.

We’ve already agreed.  :-)

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-09-11 20:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-10 21:26 'origin' indentation rule Mathieu Lirzin
2015-09-11 17:08 ` Ludovic Courtès
2015-09-11 17:09   ` Thompson, David
2015-09-11 19:12     ` Mathieu Lirzin
2015-09-11 19:35   ` Mathieu Lirzin
2015-09-11 20:57     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).