[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/7] import cran: Remove more invalid characters from package
From: |
Ricardo Wurmus |
Subject: |
Re: [PATCH 1/7] import cran: Remove more invalid characters from package names. |
Date: |
Tue, 14 Jun 2016 17:02:56 +0200 |
User-agent: |
mu4e 0.9.16; emacs 24.5.1 |
Ludovic Courtès <address@hidden> writes:
> Ricardo Wurmus <address@hidden> skribis:
>
>> * guix/import/cran.scm (guix-name): Replace period and underscore with
>> dash; always prepend package names with "r-".
>
> [...]
>
>> + (string-append "r-" (string-downcase
>> + (regexp-substitute/global #f "(_|\\.)" name
>> + 'pre "-" 'post))))
>
> I have a preference fro ‘string-map’, which I find more readable than
> ‘regexp-substitute/global’ in simple cases. Thoughts?
>
> Otherwise LGTM!
Using “string-map” is indeed nicer! I’m not a fan of
“regexp-substitute/global” (and regular expressions in general), but it
didn’t occur to me to use “string-map”. Thanks for the hint.
~~ Ricardo
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 1/7] import cran: Remove more invalid characters from package names.,
Ricardo Wurmus <=