From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aCvKGk+zw2P6QQAAbAwnHQ (envelope-from ) for ; Sun, 15 Jan 2023 09:03:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id AGG2Gk+zw2OnwAAA9RJhRA (envelope-from ) for ; Sun, 15 Jan 2023 09:03:27 +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 E48AD9AC9 for ; Sun, 15 Jan 2023 09:03:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGxz3-0001B5-7L; Sun, 15 Jan 2023 03:03:17 -0500 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 1pGxyo-00018Y-Lk for guix-patches@gnu.org; Sun, 15 Jan 2023 03:03:05 -0500 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 1pGxyo-0001QR-9K for guix-patches@gnu.org; Sun, 15 Jan 2023 03:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pGxyn-0001YP-W5 for guix-patches@gnu.org; Sun, 15 Jan 2023 03:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60753] [PATCH] gnu: home: Add home-emacs-service-type. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 Jan 2023 08:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60753 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , David Wilson Cc: "\(" , 60753@debbugs.gnu.org Received: via spool by 60753-submit@debbugs.gnu.org id=B60753.16737697385922 (code B ref 60753); Sun, 15 Jan 2023 08:03:01 +0000 Received: (at 60753) by debbugs.gnu.org; 15 Jan 2023 08:02:18 +0000 Received: from localhost ([127.0.0.1]:56068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGxy6-0001XS-E6 for submit@debbugs.gnu.org; Sun, 15 Jan 2023 03:02:18 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:53071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGxy3-0001XD-9C for 60753@debbugs.gnu.org; Sun, 15 Jan 2023 03:02:16 -0500 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 4B92860002; Sun, 15 Jan 2023 08:02:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1673769729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4Ac7eYO7Ztg7VhOjIZD6EtvOslyjIQGjD0GcKsY5bi4=; b=WxH4FSW0XrtXCrG3IsPSvMJTZHRUUHZuaXC/3S6WFZ5LnHd5JYaN3UNy9R5JynTsggTjRK 7mycGnjyzB9rUqb4dJerLfGPSkR+D6lsDfF+ujRNd9DZV8uyDs2gFxODhawYiXDKOZp09Q D4VUnEHabHwjf0T34M2Ae6hyHPRPXd7J4kD3wNYjrwaRUVXRq5KA0yg0ybb4qttIP3OFrF n5I1LGmio4bPEkuLhJMWGptTgLk4xkX4LFH2Yj8qOqEupIkQQCE298PQDY3/jKTWHEwR+7 p5u8zeXsceKhgi1LElC2s/ALgBnlmZHhrf7DKeqlz0Jh1ns0m49ZLjHfVbTShA== From: Andrew Tropin In-Reply-To: <87k01p8086.fsf_-_@gnu.org> References: <87edrzzw9w.fsf@daviwil.com> <87v8lby7jq.fsf@daviwil.com> <87k01p8086.fsf_-_@gnu.org> Date: Sun, 15 Jan 2023 12:02:04 +0400 Message-ID: <87cz7g2pkz.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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: 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673769807; a=rsa-sha256; cv=none; b=rJ6sfN+GD6K/coXD5Sxsh8TKyVwHplOZ3Oxmo59Yqcpgf2f+I2Rmb0iczGlw2iAcDgnW8U iWGBwTSoOs5lEoRhMSgTJPhhW32ROeHadSAAHLR5B/aNmVwgFq+IV3x12XxzGQcT48gnuG Y/9FYxkmmVE5NoblBB32AO8oVFAgXtlY3WsuAgmDPl4VyLJnBlSwoXNv4aP4ilz16j9VBV ic60N8n8OtiTTSL9AGs7m+ZXlDi3Y1+vED4eBuVnQYgCTKj2yfIziK+PrEyxG+tt2stWEe EtzGNTEJBWq27DkRkL8hnv+iIblNYGLgVNFXzAHQaenlFmTb9lpt7vd1/ISOFw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=WxH4FSW0; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673769807; 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: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=4Ac7eYO7Ztg7VhOjIZD6EtvOslyjIQGjD0GcKsY5bi4=; b=V587izj/7Zl845aqhZlY1H6ulkd3gQ0oW56IjaN/qDOVSLc/vffXAxWdAfoqPKAg5nNo9f 0NDBCdv0/GQYFq2SmFh4s20hkfKkud6eTOrSUIrgDbYLvylWyOTTNRTb/IWPNZsSWaB73j fGBhwmIe8Ms+yOjjX0+T6sRRbeAnKZv3fMGcXQLG6b+M0NywlZUi8F7/gS7+dhWZYP5Wgg A90A06cOmt3eLyGfXIv5XVQGXBIyAXTa48F1lFPUFjoMgXXoqPHa+Kwr5xuEZGeebXwHvD DjcTaeDbDGEiisngiBxzTNOt+ForeNv1SS6TLH1Jebd73vEtctqqXFQKpLKbig== X-Migadu-Spam-Score: -2.82 X-Spam-Score: -2.82 X-Migadu-Queue-Id: E48AD9AC9 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=WxH4FSW0; 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"; dmarc=none X-TUID: 9HKgFxUVVnfN --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2023-01-14 19:00, Ludovic Court=C3=A8s wrote: > Hello! > > David Wilson skribis: > >> Yes, I saw that you meant to run Emacs as a daemon and I think it should >> be added to this service (or another daemon-specific service) in a >> future patch. I figured it would be easier to get a patch accepted >> without the daemon functionality just yet since there seemed to be more >> feedback about that aspect in your patch thread. > > Agree, I think we should add the daemon functionality in a subsequent > patch. > > Overall it looks nice to me! Some comments and suggestions: > >> +@node Emacs Home Services >> +@subsection Emacs Home Services >> + >> +@defvr {Scheme Variable} home-emacs-service-type > > It would be nice if you could start the section with a few sentences > explaining the rationale and what=E2=80=99s being described here. > >> +This is the service type for configuring the Emacs text editor. It >> +enables you to assemble @file{init.el} and @file{early-init.el} files >> +from snippets in your home configuration and other Emacs Lisp files you >> +have in your personal configuration folder. > > Maybe like so: > > =E2=80=A6 to assemble the @file{init.el} (@pxref{Init File,,, emacs, GN= U Emacs > Manual}) and @file{early-init.el} (@pxref{Early Init File,,, emacs, > GNU Emacs Manual}) files =E2=80=A6 > >> +@example >> +$ cp ~/.emacs.d $XDG_CONFIG_HOME/emacs >> +$ cp ~/.emacs $XDG_CONFIG_HOME/emacs/init.el >> +@end example > > I=E2=80=99d drop the prompt. > >> +@item @code{init-file} (default: @code{'()}) >> +Configuration text or files to include in @file{init.el}. >> + >> +@item @code{early-init-file} (default: @code{'()}) >> +Configuration text or files to include in @file{early-init.el}. > > What about accepting sexps (or gexps) instead of strings? As in: > > (init-file '((require 'whatever) (setq something t))) A quick minor note on this approach: it won't be possible to use #'elisp-function inside such configuration because it will be interpreted by guile reader, but actually rde lives without this functionality completely ok. Do we want something like this possible? (init-file `((require 'whatever) (setq something t) (load ,(local-file "old-init.el"))) > > Also I find it confusing that it=E2=80=99s either text or files. In the = code it > has type =E2=80=98text-config=E2=80=99, which means list of file-like obj= ects IIUC, no? > >> +@item @code{load-paths} (default: @code{'()}) >> +Additional load paths to add to Emacs' @code{load-path} variable. Lines >> +will be inserted at the beginning of @file{early-init.el}. > > Nitpick: I think this should be =E2=80=98load-path=E2=80=99 (singular), b= ecause it=E2=80=99s one > search path (i.e., a list of directories). > > And: s/Additional load paths/Additional directories/ > >> +@end table >> +@end deftp > > Would be nice to have a couple of commented examples here, like you had > in the first message in this thread. :-) > >> +@deftp {Data Type} home-emacs-extension >> +The extension record for @code{home-emacs-service-type}. > > Would be nice to have a sentence above, like =E2=80=9CThis service type c= an be > extended with @code{home-emacs-extension} records, described below:=E2=80= =9D. > >> +@table @asis >> +@item @code{packages} (default: @code{'()}) >> +Additional packages required by the Emacs configuration. >> + >> +@item @code{init-file} (default: @code{'()}) >> +Configuration text or files to include in @file{init.el}. >> + >> +@item @code{early-init-file} (default: @code{'()}) >> +Configuration text or files to include in @file{early-init.el}. >> + >> +@item @code{load-paths} (default: @code{'()}) > > Ditto. > >> +@end deftp > > Would be great to have an example of that too. :-) > > Thank you! > > Ludo=E2=80=99. > > > =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmPDsv0ACgkQIgjSCVjB 3rBSBA/8DXu4n7CvHgxDSaG01Yd8oZbT1I5AJdA1XPV8uXgha1t/47uTw00jNvmH Rf0Eexc7ulasQ0VSQcqS6KwoJWSAukdUOqDuPL/zb96+Yrdd2g2tt/II38BFbzuC 1DR5f2VwpHXnP1bRLseiSn1U4o3WQfUq0B3HGa2x7gbAPY1ve85eeb6w8fYjCL8M KoHNOrDTt4lmTUmgMAdqnzkBqvkOlHZV+SEKR5zKKqgSt9gENc4aSHf3zTT3TVGO jQagFvifZlSVAJD63huonNy/QXMMdwk4LXVfmNHzvvfCignMY5UN70hrNbYo/duR SwQlwUJF6s9v5tJT7vT4Nc1LbnS3iablDt6kcTCocovNI/J84qqZyjY5p+iebMjD vvF4X9vv1Bu7zlqEKVfQky1IS0CBCN6XyLfRqOwDKo0+sj8ldbvfWgQFmANNHkbO edB1wIapUjR784foOhGuSnPbJIf91s1JtNShoFN9CCBeT8qaT4dehZTvaY0hGc10 5ENJ+X8x50GfqxW2JbCDHc98CGmtNt5lgf0bS88dVFb5Ao0CH40NXYGAtoktRicl O4POJLC5ugxS5TzBXTXZ3QbpM/rPETgEf3B/YzcD3nEQGIkdGzx6asNu5ZfKIVuB +ZS+4kJNFaGcooJbWekB/gAE2d9VotYL5pjx+ujlv4mK1yDXOko= =+wbi -----END PGP SIGNATURE----- --=-=-=--