From: Efraim Flashner <efraim@flashner.co.il>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: "Ludovic Courtès" <ludo@gnu.org>, guix-devel <guix-devel@gnu.org>
Subject: Re: Feedback on indentation rules (was: [PATCH 0/5] Add support for the RPM format to "guix pack")
Date: Mon, 27 Feb 2023 21:14:59 +0200 [thread overview]
Message-ID: <Y/0BMxFV2s838iRL@3900XT> (raw)
In-Reply-To: <877cw8hvlk.fsf_-_@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3914 bytes --]
On Thu, Feb 23, 2023 at 05:20:55PM -0500, Maxim Cournoyer wrote:
> -CC bug#61255
> +CC guix-devel
>
> Hi Ludovic and guix-devel readers,
>
> Ludovic Courtès <ludo@gnu.org> writes:
>
> > Hi,
> >
> > Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
> >
> >> Ludovic Courtès <ludo@gnu.org> writes:
> >>
>
> [...]
>
> >>> I’m not convinced by the indentation rule for ‘gexp->derivation’ added
> >>> in 82daab42811a2e3c7684ebdf12af75ff0fa67b99: there’s no reason to treat
> >>> ‘gexp->derivation’ differently from other procedures.
> >>
> >> The benefit I saw was that writing
> >>
> >> (gexp->derivation the-name
> >> #~(begin
> >> (the
> >> (multi-line
> >> (gexp)))))
> >
> > I understand, but you know, it’s best to avoid unilaterally changing
> > established conventions. :-)
> >
> > If and when there’s consensus about this change, (guix read-print)
> > should be updated.
>
> OK. I'm not against soliciting more opinions; I'm CC'ing guix-devel,
> hoping some opinionated individuals tip in on this 2021
> 82daab42811a2e3c7684ebdf12af75ff0fa67b99 commit, more specifically, the
> part that change the indentation rules for .dir-locals.el like this:
>
> --8<---------------cut here---------------start------------->8---
> + (eval . (put 'gexp->derivation 'scheme-indent-function 1))
> --8<---------------cut here---------------end--------------->8---
>
> In the same spirit there was also
> b1c25e2ce364741d1c257d3bb3ab773032807a80 (".dir-locals.el: Add
> indentation rule for computed-file.") made more recently (last month).
>
> The idea was to be able to format gexp->derivation like this:
>
> --8<---------------cut here---------------start------------->8---
> (gexp->derivation "check-deb-pack"
> (with-imported-modules '((guix build utils))
> #~(begin
> (use-modules (guix build utils)
> (ice-9 match)
> (ice-9 popen)
> (ice-9 rdelim)
> (ice-9 textual-ports)
> (rnrs base))
> [...]
> --8<---------------cut here---------------end--------------->8---
>
> Rather than like this:
>
> --8<---------------cut here---------------start------------->8---
> (gexp->derivation "check-deb-pack"
> (with-imported-modules '((guix build utils))
> #~(begin
> (use-modules (guix build utils)
> (ice-9 match)
> (ice-9 popen)
> (ice-9 rdelim)
> (ice-9 textual-ports)
> (rnrs base))
> --8<---------------cut here---------------end--------------->8---
>
> (or having to use another 'builder' variable, for example).
>
> What do you all think?
The second one is waaaay to indented. For myself I sometimes end up
wrapping the lines (although I don't love it) so it looks like this:
(gexp->derivation
"check-deb-pack"
(with-imported-modules '((guix build utils))
#~(begin
(use-modules (guix build utils)
(ice-9 match)
(ice-9 popen)
(ice-9 rdelim)
(ice-9 textual-ports)
(rnrs base))
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-02-27 19:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230203221409.15886-2-maxim.cournoyer@gmail.com>
[not found] ` <20230203221409.15886-5-maxim.cournoyer@gmail.com>
[not found] ` <87357alp9n.fsf_-_@gnu.org>
[not found] ` <878rgxws6l.fsf@gmail.com>
[not found] ` <871qmg5qpj.fsf@gnu.org>
2023-02-23 22:20 ` Feedback on indentation rules (was: [PATCH 0/5] Add support for the RPM format to "guix pack") Maxim Cournoyer
2023-02-27 19:14 ` Efraim Flashner [this message]
2023-03-01 15:17 ` Feedback on indentation rules Maxim Cournoyer
2023-03-06 16:56 ` Ludovic Courtès
2023-03-07 13:46 ` Simon Tournier
2023-03-07 16:54 ` Maxim Cournoyer
2023-03-07 17:29 ` Simon Tournier
2023-03-09 13:55 ` Maxim Cournoyer
2023-03-15 16:15 ` Ludovic Courtès
2023-03-17 16:16 ` Maxim Cournoyer
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=Y/0BMxFV2s838iRL@3900XT \
--to=efraim@flashner.co.il \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
--cc=maxim.cournoyer@gmail.com \
/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.
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).