all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrew Tropin <andrew@trop.in>
To: "Ludovic Courtès" <ludo@gnu.org>, "David Wilson" <david@daviwil.com>
Cc: "\(" <paren@disroot.org>, 60753@debbugs.gnu.org
Subject: [bug#60753] [PATCH] gnu: home: Add home-emacs-service-type.
Date: Sun, 15 Jan 2023 12:02:04 +0400	[thread overview]
Message-ID: <87cz7g2pkz.fsf@trop.in> (raw)
In-Reply-To: <87k01p8086.fsf_-_@gnu.org>

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

On 2023-01-14 19:00, Ludovic Courtès wrote:

> Hello!
>
> David Wilson <david@daviwil.com> 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’s 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:
>
>   … 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 …
>
>> +@example
>> +$ cp ~/.emacs.d $XDG_CONFIG_HOME/emacs
>> +$ cp ~/.emacs $XDG_CONFIG_HOME/emacs/init.el
>> +@end example
>
> I’d 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’s either text or files.  In the code it
> has type ‘text-config’, which means list of file-like objects 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 ‘load-path’ (singular), because it’s 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 “This service type can be
> extended with @code{home-emacs-extension} records, described below:”.
>
>> +@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’.
>
>
>

-- 
Best regards,
Andrew Tropin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2023-01-15  8:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 14:01 [bug#60753] [PATCH] gnu: home: Add home-emacs-service-type David Wilson
2023-01-12 17:24 ` ( via Guix-patches via
2023-01-12 17:27   ` David Wilson
2023-01-14 18:00     ` Ludovic Courtès
2023-01-15  8:02       ` Andrew Tropin [this message]
2023-01-17  9:02         ` Ludovic Courtès
2023-01-17 14:46           ` Andrew Tropin
2023-01-23 10:18             ` Ludovic Courtès
2023-01-26  5:06               ` Andrew Tropin
2023-01-31 16:26                 ` Ludovic Courtès
2023-02-01 14:06                   ` Andrew Tropin
2023-02-10  7:50                   ` David Wilson
2023-02-20 11:10                     ` Ludovic Courtès
2023-02-01 12:59                 ` Jelle Licht
2023-02-01 13:46                   ` Andrew Tropin
2023-01-26 18:50           ` Reily Siegel
2023-01-16  9:25       ` David Wilson
2023-01-15  0:21 ` [bug#60753] file like parameters not working benoit
2023-01-15  2:07 ` [bug#60753] issue with file-like init file benoit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cz7g2pkz.fsf@trop.in \
    --to=andrew@trop.in \
    --cc=60753@debbugs.gnu.org \
    --cc=david@daviwil.com \
    --cc=ludo@gnu.org \
    --cc=paren@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.