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 ms5.migadu.com with LMTPS id mHzzKSfuwmOVXwEAbAwnHQ (envelope-from ) for ; Sat, 14 Jan 2023 19:02:15 +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 aNwUKSfuwmNwVQAAG6o9tA (envelope-from ) for ; Sat, 14 Jan 2023 19:02:15 +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 D05753A851 for ; Sat, 14 Jan 2023 19:02:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGkqx-0007nI-CQ; Sat, 14 Jan 2023 13:02:03 -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 1pGkqw-0007n9-Gk for guix-patches@gnu.org; Sat, 14 Jan 2023 13:02:02 -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 1pGkqw-0006fF-4v for guix-patches@gnu.org; Sat, 14 Jan 2023 13:02:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pGkqv-0004mv-Vq for guix-patches@gnu.org; Sat, 14 Jan 2023 13:02:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60753] [PATCH] gnu: home: Add home-emacs-service-type. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 14 Jan 2023 18:02: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: David Wilson Cc: "\(" , 60753@debbugs.gnu.org Received: via spool by 60753-submit@debbugs.gnu.org id=B60753.167371927118344 (code B ref 60753); Sat, 14 Jan 2023 18:02:01 +0000 Received: (at 60753) by debbugs.gnu.org; 14 Jan 2023 18:01:11 +0000 Received: from localhost ([127.0.0.1]:55504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGkq6-0004lo-F0 for submit@debbugs.gnu.org; Sat, 14 Jan 2023 13:01:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGkq1-0004l8-AQ for 60753@debbugs.gnu.org; Sat, 14 Jan 2023 13:01:08 -0500 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 1pGkpv-0006RS-TQ; Sat, 14 Jan 2023 13:00:59 -0500 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=YDAk3TmUww5xj0WRbb4j9aovuy0pAgOI+QWGb3Fkn/M=; b=YquLaCZaJwDM93TaEJFB QJxHdZCkjNmZVZh19eGLKnbZMQmVdJmUetvdfe1Tzh8DLN3lRUXOGAOkxchyxeXtRGIDRofVFUQfx rOmUiUdIUdgxmEG75tDk8j3IVzBp2+l567SbmYbzjfFT1nyp+IOvcqGyuwD0sb/h7jGmqE6ffSos5 bfNP9UWqA8TC9cqxXEcUFmk7j7aycWzJtc6v6JP8w4LMcVglxVr1TRpgurUV8HMeCxxE414joAtEl AK3NU380tkl0p0k3XLQJddIAUCFOTb04MG+3d8EHEfDVzDvY6CpWMhFTcW3jW+0EOS2J8VLxkd/90 uy+EZ1+6iTzXAg==; 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 1pGkpv-0003jk-GK; Sat, 14 Jan 2023 13:00:59 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87edrzzw9w.fsf@daviwil.com> <87v8lby7jq.fsf@daviwil.com> Date: Sat, 14 Jan 2023 19:00:57 +0100 In-Reply-To: <87v8lby7jq.fsf@daviwil.com> (David Wilson's message of "Thu, 12 Jan 2023 19:27:02 +0200") Message-ID: <87k01p8086.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: 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=1673719335; a=rsa-sha256; cv=none; b=RnG/KDmjRagKsiBjgfnF0x0mxjaMH0mAot9Zn07QbjFH/zsyluH/gJjfkXnoru8Sxw5Dc8 mSH7QsaLg0nqM+iSWIuEbaEyxUYmBaXQSKgc4hAisVQ831ANj4rRMQslTo27N+lU/JdEn1 NMs/kXzrKwFg6ZX7eKM5Q/DrQ4OQnUwvdiPtDWOmLO5bQgEdI+9tjna61uR/uTm0TgHuRI MnDZogzg32ZDEBmX+moIctbfPgVbuQWNdWv529HVWbb9QaJID5K9vP2XnsOPh95iwcw1R8 CxBYAa4hdIcD6oEK+6WX0/VFAQkeVq9RoBR7fyFWb2U6lSkcJTLahDCokO9hgg== 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=YquLaCZa; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673719335; 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=YDAk3TmUww5xj0WRbb4j9aovuy0pAgOI+QWGb3Fkn/M=; b=jN5YMZuLaW2qtOkUaOgftzH3qGfLOPHe8jvtATA7/OY0Tfve5lEaQ/Jm7SE3BTJhy6wjNO JzgZ6K+qkpKt6iwwDJEh7Wb6/Evj7CUbqEe1lsHV0+NA0KMPBM47a9M2rlXHY7NB3iv0fT sXBrRTlkhwv4QoYPB8zY47cFUJbDmhHNZ6Y6Dl18XaBd63SdaGlTPCp7VPXHQe1a89PRDa AFlFzgk/Lx4z+eggQ2KMsDVY+38sSLWZCb+paIHj0gXLTZZJ2ywKSWmVH2e7iXYEEHlTgQ NGfB/aC0tAxYydIQoi0pIrUWlKMaHlOhN5HozKLEysA+jLAWVL7fgtaSMe8uWw== X-Migadu-Spam-Score: -4.01 X-Spam-Score: -4.01 X-Migadu-Queue-Id: D05753A851 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=YquLaCZa; 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=pass (policy=none) header.from=gnu.org X-TUID: UgkH0treOtFV 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, GNU = 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))) Also I find it confusing that it=E2=80=99s either text or files. In the co= de it has type =E2=80=98text-config=E2=80=99, which means list of file-like objec= ts 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), bec= ause 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 can= 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.