Subject: Re: bug#55035: [PATCH] biblio: Replace template interpreter with a macro (a "compiler").
From: Ludovic Courtès <[email-masked]>
To: Arun Isaac <[email-masked]>
Cc: [email-masked]
Date: Thu, 05 May 2022 22:33:38 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Arun!

Arun Isaac <[email-masked]> skribis:

>> diff --git a/src/guile/skribilo/biblio.scm
>> b/src/guile/skribilo/biblio.scm
>
> This file only has deletions. But maybe, update copyright header in this
> file as well? It would be nice if we had automated tests for unupdated
> copyright headers.

Ah, good question.  I’d lean towards leaving copyright lines unchanged
when removing text, but I don’t know if there’s a preferred way.

>> +    (define-syntax instantiate-body
>> +      (lambda (s)
>> +        (define (literal? id)
>> +          (any (lambda (l)
>> +                 (and (identifier? id)
>> +                      (free-identifier=? id l)))
>
> We should avoid single letter names like `l'. :-)

I this particular case, the spelled-out name would be ‘literal’, but we
can’t use it because it’s a pattern variable.  So… an exception.  :-)

>> +        (syntax-case s (literal ... or if G_)
>> +          ((_ n str rest (... ...))
>
> And `n'.

This one yes; fixed!

>> diff --git a/tests/biblio.test b/tests/biblio.test
>> new file mode 100644
>> index 0000000..954d964
>> --- /dev/null
>> +++ b/tests/biblio.test
>> @@ -0,0 +1,88 @@
>> +;;; Exercise the `biblio' routines.                  -*- Scheme -*-
>> +;;;
>> +;;; Copyright (C) 2022 Ludovic Courtès <[email-masked]>
>
> We should switch to the unicode copyright symbol ©, at least in new
> files.

Probably we should rewrite en bloc with a sed script.

We first need to reencode as UTF-8 and leftover Latin-1 files.

>> +(test-equal "bibliography-template, simple"
>
> The comma is slightly confusing. I'd go with "bibliography-template:
> simple" or "simple bibliography-template".

Done.

Pushed as 424bef0d0aac2a5a8607cf9f76a6def5ee0ca183!

Thanks,  :-)
Ludo’.