unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: 27675@debbugs.gnu.org
Subject: [bug#27675] [PATCH] gnu: kbd: Recursively search $LOADKEYS_KEYMAP_PATH.
Date: Mon, 17 Jul 2017 11:20:55 +0200	[thread overview]
Message-ID: <87poczctc8.fsf@gnu.org> (raw)
In-Reply-To: <20170713003425.31282-1-me@tobias.gr> (Tobias Geerinckx-Rice's message of "Thu, 13 Jul 2017 02:34:25 +0200")

Hello!

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> Fix a regression since commit fd7000fe33d3c4188c241cab97e2b891dd4e1268.
>
> * gnu/packages/linux.scm (kbd)[native-search-path]: Add a double asterisk.
> ---
>  gnu/packages/linux.scm | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index c5fed1a7c..700408cc8 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -1837,7 +1837,10 @@ system.")
>      (native-search-paths
>       (list (search-path-specification
>              (variable "LOADKEYS_KEYMAP_PATH")
> -            (files (list "share/keymaps")))))
> +            ;; Append ‘/**’ to recursively search all directories.  One can then
> +            ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
> +            ;; and type ‘i386/colemak/en-latin9’ on an unfamiliar keyboard.
> +            (files (list "share/keymaps/**")))))

That works if you copy paste the suggested search path in a shell, but
not if we pass it to ‘evaluate-search-paths’ from (guix search-paths)
(it doesn’t recognize the ** syntax.)

What about:

  (search-path-specification
    (variable "LOADKEYS_KEYMAP_PATH")
    (files (list "share/keymaps"))
    (file-type 'regular)
    (file-pattern ".*"))  ;or "\\.map"?

That gives this:

--8<---------------cut here---------------start------------->8---
scheme@(guix search-paths)> (search-path-specification
    (variable "LOADKEYS_KEYMAP_PATH")
    (files (list "share/keymaps"))
    (file-type 'regular)
    (file-pattern ".*"))
$8 = #<<search-path-specification> variable: "LOADKEYS_KEYMAP_PATH" files: ("share/keymaps") separator: ":" file-type: regular file-pattern: ".*">
scheme@(guix search-paths)> (evaluate-search-paths (list $8) (list "/run/current-system/profile"))
$9 = ((#<<search-path-specification> variable: "LOADKEYS_KEYMAP_PATH" files: ("share/keymaps") separator: ":" file-type: regular file-pattern: ".*"> . "/run/current-system/profile/share/keymaps/amiga/amiga-de.map.gz:/run/current-system/profile/share/keymaps/amiga/amiga-us.map.gz:/run/current-system/profile/share/keymaps/atari/atari-de.map.gz:/run/current-system/profile/share/keymaps/atari/atari-se.map.gz:/run/current-system/profile/share/keymaps/atari/atari-uk-falcon.map.gz:/run/current-system/profile/share/keymaps/atari/atari-us.map.gz:/run/current-system/profile/share/key…
--8<---------------cut here---------------end--------------->8---

Is this correct?

Ludo’.

  parent reply	other threads:[~2017-07-17  9:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13  0:34 [bug#27675] [PATCH] gnu: kbd: Recursively search $LOADKEYS_KEYMAP_PATH Tobias Geerinckx-Rice
2017-07-13  0:41 ` Tobias Geerinckx-Rice
2017-07-13  7:41   ` ng0
2017-07-14  8:39 ` bug#27675: " Tobias Geerinckx-Rice
2017-07-17  9:20 ` Ludovic Courtès [this message]
2017-07-17  9:35   ` [bug#27675] " Tobias Geerinckx-Rice
2017-07-17 11:00     ` Ludovic Courtès
2017-07-17 11:54       ` Tobias Geerinckx-Rice
     [not found]       ` <1a1b4745-31a4-f32c-ed46-cb7640591aae@tobias.gr>
2017-07-17 15:46         ` 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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87poczctc8.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=27675@debbugs.gnu.org \
    --cc=me@tobias.gr \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).