Subject: Re: [bug#46823] [PATCH 1/3] gnu: Add python-readability.

From: Nicolas Goaziou <[email-masked]>
Date: Sat, 06 Mar 2021 11:13:52 +0100

Hello,

Léo Le Bouter <[email-masked]> writes:

> On Fri, 2021-03-05 at 17:32 +0100, Nicolas Goaziou wrote:

>> Note that (native-)inputs should be sorted alphabetically, and
>> descriptions ought to be full sentences.
>
> I did the descriptions but did not sort all *inputs because it is quite
> troublesome to do so editing commit history etc.. I don't like doing it
> manually and don't have any tooling, also don't think it is very
> worthwhile use of my time, nor do I think it adds much value to GNU
> Guix.

I obviously cannot tell what is worth of your time. 

However, sorting inputs alphabetically has some value. For example, it
makes it easier to add more inputs later, as it becomes less tedious to
check for duplicates.

> If you have any tooling to suggest to do it easily in Emacs then
> I'll happily do that in every of my contributions by default.

What about a basic M-x sort-lines ? Note that you need to be cautious
about the first and last inputs, as opening and closing parens should be
sent to another line there.

If you don't want to special-casing first and last inputs, there's the
more "advanced"

  M-x sort-regexp-fields RET (".+?".*?) RET \& RET

while selecting the full input field (with C-M-SPC).

HTH,
-- 
Nicolas Goaziou