unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] services: 'console-keymap-service' takes multiple files.
@ 2016-04-08 21:32 Alex Kost
  2016-04-09  8:16 ` Alex Kost
  2016-04-13 21:23 ` Ludovic Courtès
  0 siblings, 2 replies; 12+ messages in thread
From: Alex Kost @ 2016-04-08 21:32 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

"loadkeys" can take multiple files as arguments, and this may be useful
in practice (as discussed with suitsmeveryfine on #guix¹).  So
'console-keymap-service' should be modified accordingly.

¹ https://gnunet.org/bot/log/guix/2016-04-08#T994015


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-services-console-keymap-service-takes-multiple-files.patch --]
[-- Type: text/x-patch, Size: 2488 bytes --]

From 8c58974b549479a8e97cf64f21393aa495596e13 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Sat, 9 Apr 2016 00:21:15 +0300
Subject: [PATCH] services: 'console-keymap-service' takes multiple files.

* gnu/services/base.scm (console-keymap-service-type): Type procedure
takes a list of files instead of a single file.
(console-keymap-service): Take 'files' as rest arguments.
* doc/guix.texi (Base Services): Improve documentation of
'console-keymap-service'.
---
 doc/guix.texi         | 13 +++++++++++--
 gnu/services/base.scm | 10 +++++-----
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index a34d547..ccf37da 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7262,8 +7262,17 @@ Run @var{udev}, which populates the @file{/dev} directory dynamically.
 
 @deffn {Scheme Procedure} console-keymap-service @var{file}
 @cindex keyboard layout
-Return a service to load console keymap from @var{file} using
-@command{loadkeys} command.
+Return a service to load console keymaps from @var{files} using
+@command{loadkeys} command.  Most likely, you want to load some default
+keymap, which can be done like this:
+
+@example
+(console-keymap-service "dvorak")
+@end example
+
+But also you can specify a full file name (or file names) of your
+keymap(s).  See @code{man loadkeys} for details.
+
 @end deffn
 
 @deffn {Scheme Procedure} gpm-service-type [#:gpm @var{gpm}] @
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index b168543..a3585cc 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -494,18 +494,18 @@ strings or string-valued gexps."
 (define console-keymap-service-type
   (shepherd-service-type
    'console-keymap
-   (lambda (file)
+   (lambda (files)
      (shepherd-service
       (documentation (string-append "Load console keymap (loadkeys)."))
       (provision '(console-keymap))
       (start #~(lambda _
                  (zero? (system* (string-append #$kbd "/bin/loadkeys")
-                                 #$file))))
+                                 #$@files))))
       (respawn? #f)))))
 
-(define (console-keymap-service file)
-  "Return a service to load console keymap from @var{file}."
-  (service console-keymap-service-type file))
+(define (console-keymap-service . files)
+  "Return a service to load console keymaps from @var{files}."
+  (service console-keymap-service-type files))
 
 (define console-font-service-type
   (shepherd-service-type
-- 
2.7.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] services: 'console-keymap-service' takes multiple files.
  2016-04-08 21:32 [PATCH] services: 'console-keymap-service' takes multiple files Alex Kost
@ 2016-04-09  8:16 ` Alex Kost
  2016-04-13 21:23 ` Ludovic Courtès
  1 sibling, 0 replies; 12+ messages in thread
From: Alex Kost @ 2016-04-09  8:16 UTC (permalink / raw)
  To: guix-devel

Alex Kost (2016-04-09 00:32 +0300) wrote:

> From 8c58974b549479a8e97cf64f21393aa495596e13 Mon Sep 17 00:00:00 2001
> From: Alex Kost <alezost@gmail.com>
> Date: Sat, 9 Apr 2016 00:21:15 +0300
> Subject: [PATCH] services: 'console-keymap-service' takes multiple files.
>
> * gnu/services/base.scm (console-keymap-service-type): Type procedure
> takes a list of files instead of a single file.
> (console-keymap-service): Take 'files' as rest arguments.
> * doc/guix.texi (Base Services): Improve documentation of
> 'console-keymap-service'.
> ---
>  doc/guix.texi         | 13 +++++++++++--
>  gnu/services/base.scm | 10 +++++-----
>  2 files changed, 16 insertions(+), 7 deletions(-)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index a34d547..ccf37da 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -7262,8 +7262,17 @@ Run @var{udev}, which populates the @file{/dev} directory dynamically.
>  
>  @deffn {Scheme Procedure} console-keymap-service @var{file}

Oops, this line should also be modified:

  @deffn {Scheme Procedure} console-keymap-service @var{files} ...

>  @cindex keyboard layout
> -Return a service to load console keymap from @var{file} using
> -@command{loadkeys} command.
> +Return a service to load console keymaps from @var{files} using
> +@command{loadkeys} command.  Most likely, you want to load some default
> +keymap, which can be done like this:
> +
> +@example
> +(console-keymap-service "dvorak")
> +@end example
> +
> +But also you can specify a full file name (or file names) of your
> +keymap(s).  See @code{man loadkeys} for details.
> +
>  @end deffn
>  
>  @deffn {Scheme Procedure} gpm-service-type [#:gpm @var{gpm}] @

-- 
Alex

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] services: 'console-keymap-service' takes multiple files.
  2016-04-08 21:32 [PATCH] services: 'console-keymap-service' takes multiple files Alex Kost
  2016-04-09  8:16 ` Alex Kost
@ 2016-04-13 21:23 ` Ludovic Courtès
  2016-04-15 16:10   ` Alex Kost
  1 sibling, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2016-04-13 21:23 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Alex Kost <alezost@gmail.com> skribis:

> From 8c58974b549479a8e97cf64f21393aa495596e13 Mon Sep 17 00:00:00 2001
> From: Alex Kost <alezost@gmail.com>
> Date: Sat, 9 Apr 2016 00:21:15 +0300
> Subject: [PATCH] services: 'console-keymap-service' takes multiple files.
>
> * gnu/services/base.scm (console-keymap-service-type): Type procedure
> takes a list of files instead of a single file.
> (console-keymap-service): Take 'files' as rest arguments.
> * doc/guix.texi (Base Services): Improve documentation of
> 'console-keymap-service'.

[...]

> +Return a service to load console keymaps from @var{files} using
> +@command{loadkeys} command.  Most likely, you want to load some default
> +keymap, which can be done like this:
> +
> +@example
> +(console-keymap-service "dvorak")
> +@end example

Perhaps you could add the example from the IRC discussion you mentioned
with a short explanation, just below this example?

Otherwise LGTM, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] services: 'console-keymap-service' takes multiple files.
  2016-04-13 21:23 ` Ludovic Courtès
@ 2016-04-15 16:10   ` Alex Kost
  2016-04-15 20:19     ` Albin
  2016-04-15 21:17     ` Ludovic Courtès
  0 siblings, 2 replies; 12+ messages in thread
From: Alex Kost @ 2016-04-15 16:10 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]

Ludovic Courtès (2016-04-14 00:23 +0300) wrote:

> Alex Kost <alezost@gmail.com> skribis:
>
>> From 8c58974b549479a8e97cf64f21393aa495596e13 Mon Sep 17 00:00:00 2001
>> From: Alex Kost <alezost@gmail.com>
>> Date: Sat, 9 Apr 2016 00:21:15 +0300
>> Subject: [PATCH] services: 'console-keymap-service' takes multiple files.
>>
>> * gnu/services/base.scm (console-keymap-service-type): Type procedure
>> takes a list of files instead of a single file.
>> (console-keymap-service): Take 'files' as rest arguments.
>> * doc/guix.texi (Base Services): Improve documentation of
>> 'console-keymap-service'.
>
> [...]
>
>> +Return a service to load console keymaps from @var{files} using
>> +@command{loadkeys} command.  Most likely, you want to load some default
>> +keymap, which can be done like this:
>> +
>> +@example
>> +(console-keymap-service "dvorak")
>> +@end example
>
> Perhaps you could add the example from the IRC discussion you mentioned
> with a short explanation, just below this example?

Would the following be OK?


[-- Attachment #2: keymaps.texi --]
[-- Type: application/texinfo, Size: 588 bytes --]

[-- Attachment #3: Type: text/plain, Size: 239 bytes --]


Albin, does "loadkeys se-ir209 se-fi-ir209" do the right thing for you?
If I understood correctly this is the exact combination of keymaps that
suits your keyboard, right?  Is it a general layout for Swedish
keyboards?

Thanks.

-- 
Alex

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] services: 'console-keymap-service' takes multiple files.
  2016-04-15 16:10   ` Alex Kost
@ 2016-04-15 20:19     ` Albin
  2016-04-16  8:24       ` Alex Kost
  2016-04-15 21:17     ` Ludovic Courtès
  1 sibling, 1 reply; 12+ messages in thread
From: Albin @ 2016-04-15 20:19 UTC (permalink / raw)
  To: Alex Kost, guix-devel

Den 2016-04-15 kl. 18:10, skrev Alex Kost:
> Ludovic Courtès (2016-04-14 00:23 +0300) wrote:
> 
>> Alex Kost <alezost@gmail.com> skribis:
>>
>>> From 8c58974b549479a8e97cf64f21393aa495596e13 Mon Sep 17 00:00:00 2001
>>> From: Alex Kost <alezost@gmail.com>
>>> Date: Sat, 9 Apr 2016 00:21:15 +0300
>>> Subject: [PATCH] services: 'console-keymap-service' takes multiple files.
>>>
>>> * gnu/services/base.scm (console-keymap-service-type): Type procedure
>>> takes a list of files instead of a single file.
>>> (console-keymap-service): Take 'files' as rest arguments.
>>> * doc/guix.texi (Base Services): Improve documentation of
>>> 'console-keymap-service'.
>>
>> [...]
>>
>>> +Return a service to load console keymaps from @var{files} using
>>> +@command{loadkeys} command.  Most likely, you want to load some default
>>> +keymap, which can be done like this:
>>> +
>>> +@example
>>> +(console-keymap-service "dvorak")
>>> +@end example
>>
>> Perhaps you could add the example from the IRC discussion you mentioned
>> with a short explanation, just below this example?
> 
> Would the following be OK?
> 
> 
> 
> 
> Albin, does "loadkeys se-ir209 se-fi-ir209" do the right thing for you?

Yes.  I tried it with the GuixSD USB installer on two different
computers -- a macbook and a traditional desktop PC.

> If I understood correctly this is the exact combination of keymaps that
> suits your keyboard, right?  Is it a general layout for Swedish
> keyboards?

It doesn't appear to be the only working combination.  I also tried
`loadkeys se-lat6 se-fi-lat6` which seems to produce the same result.
Loading the first keymap (either 'se-ir209' or 'se-lat6') gives me the
right keyboard except I get the Danish/Norwegian letters 'ø', 'æ'
instead of the Swedish 'ö', 'ä' and certain characters, e.g. '/' and
'+', are in the wrong place.  Loading the second keymap (either
'se-fi-ir209' or 'se-fi-lat6') fixes that.  There must be some minor
difference between 'lat6' and 'ir209' but I couldn't see what that would be.

In other words, using either `loadkeys se-ir209 se-fi-ir209` or
`loadkeys se-lat6 se-fi-lat6` generates a general Swedish keyboard
layout from what I can see.

Albin

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] services: 'console-keymap-service' takes multiple files.
  2016-04-15 16:10   ` Alex Kost
  2016-04-15 20:19     ` Albin
@ 2016-04-15 21:17     ` Ludovic Courtès
  2016-04-16  2:47       ` Albin
  1 sibling, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2016-04-15 21:17 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2016-04-14 00:23 +0300) wrote:
>
>> Alex Kost <alezost@gmail.com> skribis:
>>
>>> From 8c58974b549479a8e97cf64f21393aa495596e13 Mon Sep 17 00:00:00 2001
>>> From: Alex Kost <alezost@gmail.com>
>>> Date: Sat, 9 Apr 2016 00:21:15 +0300
>>> Subject: [PATCH] services: 'console-keymap-service' takes multiple files.
>>>
>>> * gnu/services/base.scm (console-keymap-service-type): Type procedure
>>> takes a list of files instead of a single file.
>>> (console-keymap-service): Take 'files' as rest arguments.
>>> * doc/guix.texi (Base Services): Improve documentation of
>>> 'console-keymap-service'.
>>
>> [...]
>>
>>> +Return a service to load console keymaps from @var{files} using
>>> +@command{loadkeys} command.  Most likely, you want to load some default
>>> +keymap, which can be done like this:
>>> +
>>> +@example
>>> +(console-keymap-service "dvorak")
>>> +@end example
>>
>> Perhaps you could add the example from the IRC discussion you mentioned
>> with a short explanation, just below this example?
>
> Would the following be OK?
>
>
> @deffn {Scheme Procedure} console-keymap-service @var{files} ...
> @cindex keyboard layout
> Return a service to load console keymaps from @var{files} using
> @command{loadkeys} command.  Most likely, you want to load some default
> keymap, which can be done like this:
>
> @example
> (console-keymap-service "dvorak")
> @end example
>
> Or, for example, for Swedish keyboards, you may need to combine keymaps:
> @example
> (console-keymap-service "se-ir209" "se-fi-ir209")

Ideally with a few words to explain why this is useful on Swedish
keyboards (Albin? :-)), but otherwise LGTM!

Ludo’.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] services: 'console-keymap-service' takes multiple files.
  2016-04-15 21:17     ` Ludovic Courtès
@ 2016-04-16  2:47       ` Albin
  2016-04-16  8:24         ` Alex Kost
  0 siblings, 1 reply; 12+ messages in thread
From: Albin @ 2016-04-16  2:47 UTC (permalink / raw)
  To: Ludovic Courtès, Alex Kost; +Cc: guix-devel

Den 2016-04-15 kl. 23:17, skrev Ludovic Courtès:
> Alex Kost <alezost@gmail.com> skribis:
> 
>> Ludovic Courtès (2016-04-14 00:23 +0300) wrote:
>>
>>> Alex Kost <alezost@gmail.com> skribis:
>>>
>>>> From 8c58974b549479a8e97cf64f21393aa495596e13 Mon Sep 17 00:00:00 2001
>>>> From: Alex Kost <alezost@gmail.com>
>>>> Date: Sat, 9 Apr 2016 00:21:15 +0300
>>>> Subject: [PATCH] services: 'console-keymap-service' takes multiple files.
>>>>
>>>> * gnu/services/base.scm (console-keymap-service-type): Type procedure
>>>> takes a list of files instead of a single file.
>>>> (console-keymap-service): Take 'files' as rest arguments.
>>>> * doc/guix.texi (Base Services): Improve documentation of
>>>> 'console-keymap-service'.
>>>
>>> [...]
>>>
>>>> +Return a service to load console keymaps from @var{files} using
>>>> +@command{loadkeys} command.  Most likely, you want to load some default
>>>> +keymap, which can be done like this:
>>>> +
>>>> +@example
>>>> +(console-keymap-service "dvorak")
>>>> +@end example
>>>
>>> Perhaps you could add the example from the IRC discussion you mentioned
>>> with a short explanation, just below this example?
>>
>> Would the following be OK?
>>
>>
>> @deffn {Scheme Procedure} console-keymap-service @var{files} ...
>> @cindex keyboard layout
>> Return a service to load console keymaps from @var{files} using
>> @command{loadkeys} command.  Most likely, you want to load some default
>> keymap, which can be done like this:
>>
>> @example
>> (console-keymap-service "dvorak")
>> @end example
>>
>> Or, for example, for Swedish keyboards, you may need to combine keymaps:
>> @example
>> (console-keymap-service "se-ir209" "se-fi-ir209")
> 
> Ideally with a few words to explain why this is useful on Swedish
> keyboards (Albin? :-)), but otherwise LGTM!
> 
> Ludo’.
> 

I don't think it's necessary to explain exactly why it's useful here
because it's a simple fact that loading just the first "se-ir209"
doesn't enable a Swedish but some kind of US-Danish freak keymap :-),
which the user will soon discover.  If it doesn't cross your mind that
*two* keymaps may be necessary for using *one* keyboard (how obvious is
that, really?), then you might start to think that perhaps the Guix
folks simply forgot to include the one that you need.  IMHO upstream
should ditch the whole dual keymap thing if it's technically feasible to
do so.

The formulation above looks good to me also, except I think it's clearer
with the formulation "a Swedish keyboard" in this context.


Albin

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] services: 'console-keymap-service' takes multiple files.
  2016-04-15 20:19     ` Albin
@ 2016-04-16  8:24       ` Alex Kost
  0 siblings, 0 replies; 12+ messages in thread
From: Alex Kost @ 2016-04-16  8:24 UTC (permalink / raw)
  To: Albin; +Cc: guix-devel

Albin (2016-04-15 23:19 +0300) wrote:

> Den 2016-04-15 kl. 18:10, skrev Alex Kost:
[...]
>> Albin, does "loadkeys se-ir209 se-fi-ir209" do the right thing for you?
>
> Yes.  I tried it with the GuixSD USB installer on two different
> computers -- a macbook and a traditional desktop PC.
>
>> If I understood correctly this is the exact combination of keymaps that
>> suits your keyboard, right?  Is it a general layout for Swedish
>> keyboards?
>
> It doesn't appear to be the only working combination.  I also tried
> `loadkeys se-lat6 se-fi-lat6` which seems to produce the same result.
> Loading the first keymap (either 'se-ir209' or 'se-lat6') gives me the
> right keyboard except I get the Danish/Norwegian letters 'ø', 'æ'
> instead of the Swedish 'ö', 'ä' and certain characters, e.g. '/' and
> '+', are in the wrong place.  Loading the second keymap (either
> 'se-fi-ir209' or 'se-fi-lat6') fixes that.  There must be some minor
> difference between 'lat6' and 'ir209' but I couldn't see what that would be.

Look at "/run/current-system/profile/share/keymaps/i386/qwerty":
'se-fi-lat6' and 'se-fi-ir209' are actually the same (except for the
commentary lines).  'se-ir209' and 'se-lat6' differs though.

> In other words, using either `loadkeys se-ir209 se-fi-ir209` or
> `loadkeys se-lat6 se-fi-lat6` generates a general Swedish keyboard
> layout from what I can see.

OK, thanks for the explanation.

-- 
Alex

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] services: 'console-keymap-service' takes multiple files.
  2016-04-16  2:47       ` Albin
@ 2016-04-16  8:24         ` Alex Kost
  2016-04-16 14:41           ` Albin
  0 siblings, 1 reply; 12+ messages in thread
From: Alex Kost @ 2016-04-16  8:24 UTC (permalink / raw)
  To: Albin; +Cc: guix-devel

Albin (2016-04-16 05:47 +0300) wrote:

> Den 2016-04-15 kl. 23:17, skrev Ludovic Courtès:
>> Alex Kost <alezost@gmail.com> skribis:
[...]
>>> @deffn {Scheme Procedure} console-keymap-service @var{files} ...
>>> @cindex keyboard layout
>>> Return a service to load console keymaps from @var{files} using
>>> @command{loadkeys} command.  Most likely, you want to load some default
>>> keymap, which can be done like this:
>>>
>>> @example
>>> (console-keymap-service "dvorak")
>>> @end example
>>>
>>> Or, for example, for Swedish keyboards, you may need to combine keymaps:
>>> @example
>>> (console-keymap-service "se-ir209" "se-fi-ir209")
>>
>> Ideally with a few words to explain why this is useful on Swedish
>> keyboards (Albin? :-)), but otherwise LGTM!
>
> I don't think it's necessary to explain exactly why it's useful here
> because it's a simple fact that loading just the first "se-ir209"
> doesn't enable a Swedish but some kind of US-Danish freak keymap :-),
> which the user will soon discover.  If it doesn't cross your mind that
> *two* keymaps may be necessary for using *one* keyboard (how obvious is
> that, really?), then you might start to think that perhaps the Guix
> folks simply forgot to include the one that you need.  IMHO upstream
> should ditch the whole dual keymap thing if it's technically feasible to
> do so.

It is definitely feasible.  I think it is done so because it is simple:
instead of making a single map file for a Swedish keyboard, they just
made a small "extension" to a general Scandinavian layout (If I
understand it correctly).

> The formulation above looks good to me also, except I think it's clearer
> with the formulation "a Swedish keyboard" in this context.

Fixed, thanks!

I think I'll change the example from "ir209" to "lat6", as "se-lat6.map"
has the following line in the commentary:

  # Covers ISO 8859-10, 1993

Since it is the Standard¹, I think it is better to use it in the
example.  WDYT?

¹ https://en.wikipedia.org/wiki/ISO/IEC_8859-10

-- 
Alex

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] services: 'console-keymap-service' takes multiple files.
  2016-04-16  8:24         ` Alex Kost
@ 2016-04-16 14:41           ` Albin
  2016-04-16 22:49             ` Ludovic Courtès
  2016-04-17  7:41             ` Alex Kost
  0 siblings, 2 replies; 12+ messages in thread
From: Albin @ 2016-04-16 14:41 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Den 2016-04-16 kl. 10:24, skrev Alex Kost:
> Albin (2016-04-16 05:47 +0300) wrote:
> 
>> Den 2016-04-15 kl. 23:17, skrev Ludovic Courtès:
>>> Alex Kost <alezost@gmail.com> skribis:
> [...]
>>>> @deffn {Scheme Procedure} console-keymap-service @var{files} ...
>>>> @cindex keyboard layout
>>>> Return a service to load console keymaps from @var{files} using
>>>> @command{loadkeys} command.  Most likely, you want to load some default
>>>> keymap, which can be done like this:
>>>>
>>>> @example
>>>> (console-keymap-service "dvorak")
>>>> @end example
>>>>
>>>> Or, for example, for Swedish keyboards, you may need to combine keymaps:
>>>> @example
>>>> (console-keymap-service "se-ir209" "se-fi-ir209")
>>>
>>> Ideally with a few words to explain why this is useful on Swedish
>>> keyboards (Albin? :-)), but otherwise LGTM!
>>
>> I don't think it's necessary to explain exactly why it's useful here
>> because it's a simple fact that loading just the first "se-ir209"
>> doesn't enable a Swedish but some kind of US-Danish freak keymap :-),
>> which the user will soon discover.  If it doesn't cross your mind that
>> *two* keymaps may be necessary for using *one* keyboard (how obvious is
>> that, really?), then you might start to think that perhaps the Guix
>> folks simply forgot to include the one that you need.  IMHO upstream
>> should ditch the whole dual keymap thing if it's technically feasible to
>> do so.
> 
> It is definitely feasible.  I think it is done so because it is simple:
> instead of making a single map file for a Swedish keyboard, they just
> made a small "extension" to a general Scandinavian layout (If I
> understand it correctly).
> 
>> The formulation above looks good to me also, except I think it's clearer
>> with the formulation "a Swedish keyboard" in this context.
> 
> Fixed, thanks!
> 
> I think I'll change the example from "ir209" to "lat6", as "se-lat6.map"
> has the following line in the commentary:
> 
>   # Covers ISO 8859-10, 1993
> 
> Since it is the Standard¹, I think it is better to use it in the
> example.  WDYT?
> 
> ¹ https://en.wikipedia.org/wiki/ISO/IEC_8859-10
> 

Yes, I think you're right!  Thanks for fixing this Alex.

Albin

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] services: 'console-keymap-service' takes multiple files.
  2016-04-16 14:41           ` Albin
@ 2016-04-16 22:49             ` Ludovic Courtès
  2016-04-17  7:41             ` Alex Kost
  1 sibling, 0 replies; 12+ messages in thread
From: Ludovic Courtès @ 2016-04-16 22:49 UTC (permalink / raw)
  To: Albin; +Cc: guix-devel, Alex Kost

Albin <albin@fripost.org> skribis:

> Den 2016-04-16 kl. 10:24, skrev Alex Kost:
>> Albin (2016-04-16 05:47 +0300) wrote:
>> 
>>> Den 2016-04-15 kl. 23:17, skrev Ludovic Courtès:
>>>> Alex Kost <alezost@gmail.com> skribis:
>> [...]
>>>>> @deffn {Scheme Procedure} console-keymap-service @var{files} ...
>>>>> @cindex keyboard layout
>>>>> Return a service to load console keymaps from @var{files} using
>>>>> @command{loadkeys} command.  Most likely, you want to load some default
>>>>> keymap, which can be done like this:
>>>>>
>>>>> @example
>>>>> (console-keymap-service "dvorak")
>>>>> @end example
>>>>>
>>>>> Or, for example, for Swedish keyboards, you may need to combine keymaps:
>>>>> @example
>>>>> (console-keymap-service "se-ir209" "se-fi-ir209")
>>>>
>>>> Ideally with a few words to explain why this is useful on Swedish
>>>> keyboards (Albin? :-)), but otherwise LGTM!
>>>
>>> I don't think it's necessary to explain exactly why it's useful here
>>> because it's a simple fact that loading just the first "se-ir209"
>>> doesn't enable a Swedish but some kind of US-Danish freak keymap :-),
>>> which the user will soon discover.  If it doesn't cross your mind that
>>> *two* keymaps may be necessary for using *one* keyboard (how obvious is
>>> that, really?), then you might start to think that perhaps the Guix
>>> folks simply forgot to include the one that you need.  IMHO upstream
>>> should ditch the whole dual keymap thing if it's technically feasible to
>>> do so.
>> 
>> It is definitely feasible.  I think it is done so because it is simple:
>> instead of making a single map file for a Swedish keyboard, they just
>> made a small "extension" to a general Scandinavian layout (If I
>> understand it correctly).
>> 
>>> The formulation above looks good to me also, except I think it's clearer
>>> with the formulation "a Swedish keyboard" in this context.
>> 
>> Fixed, thanks!
>> 
>> I think I'll change the example from "ir209" to "lat6", as "se-lat6.map"
>> has the following line in the commentary:
>> 
>>   # Covers ISO 8859-10, 1993
>> 
>> Since it is the Standard¹, I think it is better to use it in the
>> example.  WDYT?
>> 
>> ¹ https://en.wikipedia.org/wiki/ISO/IEC_8859-10
>> 
>
> Yes, I think you're right!  Thanks for fixing this Alex.

OK for me, thanks for the insightful discussion.  :-)

Ludo’.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] services: 'console-keymap-service' takes multiple files.
  2016-04-16 14:41           ` Albin
  2016-04-16 22:49             ` Ludovic Courtès
@ 2016-04-17  7:41             ` Alex Kost
  1 sibling, 0 replies; 12+ messages in thread
From: Alex Kost @ 2016-04-17  7:41 UTC (permalink / raw)
  To: Albin; +Cc: guix-devel

Albin (2016-04-16 17:41 +0300) wrote:

> Den 2016-04-16 kl. 10:24, skrev Alex Kost:
>> Albin (2016-04-16 05:47 +0300) wrote:
>>
>>> Den 2016-04-15 kl. 23:17, skrev Ludovic Courtès:
>>>> Alex Kost <alezost@gmail.com> skribis:
>> [...]
>>>>> @deffn {Scheme Procedure} console-keymap-service @var{files} ...
>>>>> @cindex keyboard layout
>>>>> Return a service to load console keymaps from @var{files} using
>>>>> @command{loadkeys} command.  Most likely, you want to load some default
>>>>> keymap, which can be done like this:
>>>>>
>>>>> @example
>>>>> (console-keymap-service "dvorak")
>>>>> @end example
>>>>>
>>>>> Or, for example, for Swedish keyboards, you may need to combine keymaps:
>>>>> @example
>>>>> (console-keymap-service "se-ir209" "se-fi-ir209")
>>>>
>>>> Ideally with a few words to explain why this is useful on Swedish
>>>> keyboards (Albin? :-)), but otherwise LGTM!
>>>
>>> I don't think it's necessary to explain exactly why it's useful here
>>> because it's a simple fact that loading just the first "se-ir209"
>>> doesn't enable a Swedish but some kind of US-Danish freak keymap :-),
>>> which the user will soon discover.  If it doesn't cross your mind that
>>> *two* keymaps may be necessary for using *one* keyboard (how obvious is
>>> that, really?), then you might start to think that perhaps the Guix
>>> folks simply forgot to include the one that you need.  IMHO upstream
>>> should ditch the whole dual keymap thing if it's technically feasible to
>>> do so.
>>
>> It is definitely feasible.  I think it is done so because it is simple:
>> instead of making a single map file for a Swedish keyboard, they just
>> made a small "extension" to a general Scandinavian layout (If I
>> understand it correctly).
>>
>>> The formulation above looks good to me also, except I think it's clearer
>>> with the formulation "a Swedish keyboard" in this context.
>>
>> Fixed, thanks!
>>
>> I think I'll change the example from "ir209" to "lat6", as "se-lat6.map"
>> has the following line in the commentary:
>>
>>   # Covers ISO 8859-10, 1993
>>
>> Since it is the Standard¹, I think it is better to use it in the
>> example.  WDYT?
>>
>> ¹ https://en.wikipedia.org/wiki/ISO/IEC_8859-10
>
> Yes, I think you're right!  Thanks for fixing this Alex.

OK, committed¹, thanks!

¹ http://git.savannah.gnu.org/cgit/guix.git/commit/?id=b3d05f487014b1c34c45b8c693a974500e689603

-- 
Alex

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-04-17  7:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-08 21:32 [PATCH] services: 'console-keymap-service' takes multiple files Alex Kost
2016-04-09  8:16 ` Alex Kost
2016-04-13 21:23 ` Ludovic Courtès
2016-04-15 16:10   ` Alex Kost
2016-04-15 20:19     ` Albin
2016-04-16  8:24       ` Alex Kost
2016-04-15 21:17     ` Ludovic Courtès
2016-04-16  2:47       ` Albin
2016-04-16  8:24         ` Alex Kost
2016-04-16 14:41           ` Albin
2016-04-16 22:49             ` Ludovic Courtès
2016-04-17  7:41             ` Alex Kost

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).