GNU bug report logs -
#36112
[PATCH] gnu: aspell.scm: Fix dictionaries with underscore/uppercase in name.
Previous Next
Reported by: Jens Mølgaard <jens <at> zete.tk>
Date: Thu, 6 Jun 2019 05:46:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 36112 <at> debbugs.gnu.org (full text, mbox):
Salut ! :-)
Jens Mølgaard <jens <at> zete.tk> skribis:
> This could be fixed by changing either the way package names or URLs are
> generated. Rather than adapting URLs to special cases, it seems more
> straightforward to let the dict-name string represent upstream name, and
> then downcase and replace underscores to produce a package name in
> accordance with the naming conventions.
>
> This was the simplest/easiest thing I could come up with. Do let me know
> if there is a smarter way!
This looks like the right way to me!
> From 2bc4b7b31004642fcf300fe49f7b27ebd0353774 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Jens=20M=C3=B8lgaard?= <jens <at> zete.tk>
> Date: Thu, 6 Jun 2019 17:06:56 +1200
> Subject: [PATCH] gnu: aspell.scm: Fix dictionaries with underscore/uppercase
> in name.
>
> ---
> gnu/packages/aspell.scm | 14 ++++++++++----
Please provide a ChangeLog-style commit log. :-)
https://gnu.org/software/guix/manual/en/html_node/Submitting-Patches.html
> + (name (string-append
> + "aspell-dict-"
> + (regexp-substitute/global
> + ;; Downcase and replace underscore in package names
> + ;; to follow Guix naming conventions.
> + #f "_" (string-downcase dict-name) 'pre "-" 'post)))
What about avoiding regexps with something like:
(string-map (match-lambda
(#\_ #\-)
(chr chr))
(string-downcase dict-name))
?
Thanks,
Ludo’.
This bug report was last modified 6 years and 43 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.