From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MJiEK/GNE2Q4wwAASxT56A (envelope-from ) for ; Thu, 16 Mar 2023 22:45:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 4J6SKvGNE2SEJQAAG6o9tA (envelope-from ) for ; Thu, 16 Mar 2023 22:45:21 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 214983D4A4 for ; Thu, 16 Mar 2023 22:45:20 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=RhQDYF2E; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679003121; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=6nomxnrDxZ+/erlWfQp4Wz8Gex1/YR1mf6gcQuQhvUA=; b=XhqgyuIFmrvzGF5/5a2BUqrJyqAI9bRxWCbdp6JTK7htPdSnhn5s+At8v1n+zSW9NbCBwE duWAbWGtrWURaeXKJqBLetH2yFveu2bDSruJxjK4uLWgabQPd/qorFGgvXBEYFh/5Rxpqp 3zuORL2LqWhx0d1lWGOgxzqi+gBOoq4FoWmIwjSdZOM+Yc+SIpz4QuJIaDCSO5y9054x/q lbR7R8PNUtcG/8pcS1e1lsogdltl9XPoHU6ONfDpMVmFdkfLoVPGW8koXLnL6kC+cj+kDx /omSiLzyHWvWQHntrey8vKDfTKcYpkVeUdSZ0GtmaNdf4AKi0Zpr5s7TlRE2Wg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=RhQDYF2E; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679003121; a=rsa-sha256; cv=none; b=WRyw0Unrh1rnxrpHwmrWeXFgh9U3yF1jakwPG0veELVvZs4z37oZOCC3YXhkJTx0U5Wef6 Ct5RUExyFioFBU/qru0YPjKcFXeUAF7B1fbHpYDCxRMkkM939XbwN5bBTSJh4OPfprFi5j Eq6xmexNPhpBwdqtc/F+HgGyvx0oSHShkS6rcYw02NoxNrTpx2G+21p2bvnEEBAgoFKEMU Dp4wyUB7YakV3aPB8UAtwH7F61G4F3ii7mrWNZOk9pnnsiof6/HzZottWUhTr8oQn1Zc5U OQ8lc/51xEaQLFKhClzqQpkYIpMpQMUy6rbQgeSc72YD3kslMMnr4bd4uFOmdQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pcvPE-000376-B4; Thu, 16 Mar 2023 17:45:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcvPC-00036r-KI for guix-patches@gnu.org; Thu, 16 Mar 2023 17:45:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pcvPC-0005dD-BC for guix-patches@gnu.org; Thu, 16 Mar 2023 17:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pcvPB-0007UN-Ke for guix-patches@gnu.org; Thu, 16 Mar 2023 17:45:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62101] [PATCH] home: services: Add xmodmap. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Mar 2023 21:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62101 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: conses Cc: 62101@debbugs.gnu.org Received: via spool by 62101-submit@debbugs.gnu.org id=B62101.167900304628696 (code B ref 62101); Thu, 16 Mar 2023 21:45:01 +0000 Received: (at 62101) by debbugs.gnu.org; 16 Mar 2023 21:44:06 +0000 Received: from localhost ([127.0.0.1]:43226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcvOI-0007Sm-BS for submit@debbugs.gnu.org; Thu, 16 Mar 2023 17:44:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcvOG-0007S9-KF for 62101@debbugs.gnu.org; Thu, 16 Mar 2023 17:44:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcvO9-0005Mp-78; Thu, 16 Mar 2023 17:43:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=6nomxnrDxZ+/erlWfQp4Wz8Gex1/YR1mf6gcQuQhvUA=; b=RhQDYF2Eqiwr4nBaMhjw 0lP0WKvaEoZkthvvwnrCvKU58/ZQ24z5xsr90YbMukWVvCOcnKVSHukMg9zhbo7losMBQPPh+RFy3 KEQ1j2WKmVl545O4t9Ta4mo1PZLExjQJbsTKArI0Gy/AtDHMoO+e7S5CHTgAP4R9I3qfaiFYqrQC7 fVe7uwXQBSZpPoDI8uazJkDf5uow8L9lyyZM0HFrCaI1ISNPWgWvf+yC0wl9/J6pGY5se/1iSMNCC U/4/nbSALayAFLq8nCh/1/JDw6QUYXufx5swBx79bOFkCNv8Rny5kPqXf60SjF5NQFV1kbuQyzwO/ A8k5io/nqRPBXA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcvO6-0001cC-TJ; Thu, 16 Mar 2023 17:43:56 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <867cvo9y6b.fsf@conses.eu> <86edpox2zd.fsf@conses.eu> Date: Thu, 16 Mar 2023 22:43:52 +0100 In-Reply-To: <86edpox2zd.fsf@conses.eu> (conses's message of "Thu, 16 Mar 2023 14:03:34 +0100") Message-ID: <87r0to9xt3.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: 214983D4A4 X-Spam-Score: -5.24 X-Migadu-Spam-Score: -5.24 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: qyWLZBLq7Q1Z Hi, conses skribis: > * gnu/home/services/desktop.scm (home-xmodmap-service-type) > (home-xmodmap-configuration): New variables; > (xmodmap-shepherd-service) > (get-xmodmap-configuration) > (get-xmodmap-file) > (add-xmodmap-config-file) > (add-xmodmap-package): New procedures; > * doc/guix.texi (Desktop Services): Document it. Overall LGTM, with minor issues: > +The syntax for the expression grammar is quite straightforward. You can > +either provide a list of cons cells and strings like this: I=E2=80=99d suggest avoiding the first sentence, because what looks straightforward to someone might be intimidating to another. We also avoid jargon like =E2=80=9Ccons cell=E2=80=9D in the manual. What about something like this: The @code{key-map} field takes a list of objects, each of which is either a @dfn{statement} (a string) or an @dfn{assignment} (a pair of strings). As an example, the snippet below configures the @kbd{mod4} key (???) such that it does XYZ, FIXME: finish sentence :-) =E2=80=A6 where =E2=80=98key-map=E2=80=99 is IMO a better name for =E2=80= =98config=E2=80=99. > +Alternatively, there is a more Lisp-like configuration syntax via Scheme > +symbols, lists, and vectors, that you can use like this: > + > +@lisp > +(service home-xmodmap-service-type > + (home-xmodmap-configuration > + (config '((#(add mod4) . Print) > + (clear lock) I don=E2=80=99t find it very useful; I=E2=80=99d rather support only one sy= ntax, but clearly explained. So my suggestion would be to drop this. > +@item @code{config} (default: @code{config}) (type: list) So this would be renamed to @code{key-map} maybe. > +(define (get-xmodmap-configuration field-name val) As a rule of thumb, you can drop =E2=80=98get-=E2=80=99 from procedure name= s; procedures like this one are rarely called =E2=80=98get-SOMETHING=E2=80=99. > + (service-extension home-profile-service-type > + add-xmodmap-package) I believe this extension is unnecessary. Could you send an updated patch? Thank you! Ludo=E2=80=99.