Subject: Re: [bug#77093] [PATCH rust-team 10/18] scripts: import: Add two newlines for ‘--insert’ option.

From: Hilton Chain <[email-masked]>
Date: Tue, 18 Mar 2025 20:18:43 +0800

On Tue, 18 Mar 2025 19:49:33 +0800,
Efraim Flashner wrote:
>
> [1  <text/plain; utf-8 (quoted-printable)>]
> Is this only relevant for packages crated with 'guix import cargo'? If
> so we should probably just change the importer to add a newline to the
> misbehaving importer.
>
> On Tue, Mar 18, 2025 at 03:24:23PM +0800, Hilton Chain wrote:
> > For consistency with ‘insert-expression’.
> >
> > * guix/scripts/import.scm (guix-import): Add two newlines when inserting.
> >
> > Change-Id: I55b45ca137d175fdf6ee5c0bb2b6b1ca8385750d
> > ---
> >  guix/scripts/import.scm | 1 +
> >  1 file changed, 1 insertion(+)

This is a general issue, adding one newline doesn't work well with appending
multiple definitions.  For appending n definitions, (n - 1) lines need manual
addition:
--8<---------------cut here---------------start------------->8---
a
b
c
--8<---------------cut here---------------end--------------->8---

By adding two newlines, only one line needs manual deletion:
--8<---------------cut here---------------start------------->8---
a

b

c

--8<---------------cut here---------------end--------------->8---