guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Outreachy] - Guix Data Service - Set a more informative page title


From: Maxime Devos
Subject: Re: [Outreachy] - Guix Data Service - Set a more informative page title
Date: Tue, 13 Apr 2021 19:51:32 +0200
User-agent: Evolution 3.34.2

On Tue, 2021-04-13 at 18:56 +0300, Canan Talayhan wrote:
> [...]
> After sending the patch I've turned the patch like below. 
>       (title ,(if title
>             `,(string-append title " - Guix Data Service")
>             '("Guix Data Service")))

A little more simplification is possible:

`,(string-append title ...) --> (string-append  ...)

The code `,A after macro-expansion simply becomes A, for every A.
To test, you can run
  ,expand `,(string-append title " something")
in a Guile REPL.

Also,
             '("Guix Data Service")))
seems incorrect.  The end result if title is #f would be
  (title ("Guix Data Service")),
while I believe you wanted
  (title "Guix Data Service").

Correct code would be

>      (title ,(if title
>             `,(string-append title " - Guix Data Service")
>             "Guix Data Service"))
or alternatively

>      (title ,(if title
>             `,(string-append title " - Guix Data Service")
>             '"Guix Data Service"))
or
>      (title ,(if title
>             `,(string-append title " - Guix Data Service")
>             `"Guix Data Service"))

I don't know how familiar you are with quasiquote (`), quote (') and
unquote (,); it may be worthwhile to look this up in the Guile maual

          `,(string-append title " - Guix Data Service")

I recommend sending e-mails as plain text.  One benefit is that plain
text doesn't mess up code indentation (at least on e-mail clients using
fixed-width fonts for plain text, which seems standard).

Greetings,
Maxime.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]