all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: "Jens Mølgaard" <jens@zete.tk>
Cc: 36112@debbugs.gnu.org
Subject: [bug#36112] [PATCH] gnu: aspell.scm: Fix dictionaries with underscore/uppercase in name.
Date: Thu, 06 Jun 2019 17:41:22 +0200	[thread overview]
Message-ID: <87tvd2lo0t.fsf@gnu.org> (raw)
In-Reply-To: <871s07jmi9.fsf@zete.tk> ("Jens \=\?utf-8\?Q\?M\=C3\=B8lgaard\=22's\?\= message of "Thu, 06 Jun 2019 17:44:46 +1200")

Salut !  :-)

Jens Mølgaard <jens@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@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’.

  reply	other threads:[~2019-06-06 15:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06  5:44 [bug#36112] [PATCH] gnu: aspell.scm: Fix dictionaries with underscore/uppercase in name Jens Mølgaard
2019-06-06 15:41 ` Ludovic Courtès [this message]
2019-06-07  4:56   ` Jens Mølgaard
2019-06-07  7:32     ` bug#36112: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tvd2lo0t.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=36112@debbugs.gnu.org \
    --cc=jens@zete.tk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.