From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 14 13:01:10 2023 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: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: David Wilson Subject: Re: bug#60753: [PATCH] gnu: home: Add home-emacs-service-type. 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60753 Cc: "\(" , 60753@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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.