GNU bug report logs - #58652
Creating home-emacs-service-type

Previous Next

Package: guix-patches;

Reported by: Zain Jabbar <zaijab2000 <at> gmail.com>

Date: Thu, 20 Oct 2022 02:41:03 UTC

Severity: normal

Tags: moreinfo, patch

Merged with 58693

Done: "(" <paren <at> disroot.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 58652 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
To: Zain Jabbar <zaijab2000 <at> gmail.com>, 58652 <at> debbugs.gnu.org, 
 jbranso <at> dismail.de
Subject: Re: Creating home-emacs-service-type
Date: Thu, 20 Oct 2022 14:53:58 +0200
Am Mittwoch, dem 19.10.2022 um 15:59 -1000 schrieb Zain Jabbar:
> Aloha Guix Development Team,
> 
> First submission of a patch to this mail service. Hopefully this
> works. I welcome any and all feedback.
> 
> Attached is a patch which creates a new file
> =/gnu/home/services/emacs.scm= which defines a new service
> =home-emacs-service-type= and a configuration for said service
> =home-emacs-configuration=. The configuration contains a list of
> packages to add to the home-profile, and a list of expressions to add
> into Emacs' =init.el= and =early-init.el=.
Note that you reverted the patch direction.

> Here is an example of a home environment file which:
> 
> Adds the following packages:
> - =bash=
> - =emacs-next=
> - =emacs-debbugs=
> - =emacs-evil=
> - =emacs-paredit=
> - =emacs-anzu=
> 
> Overwrites the =.config/emacs/init.el= with:
> #+BEGIN_SRC emacs-lisp
> (evil-mode 1)
> #+END_SRC
> 
> Overwrites the =.config/emacs/early-init.el= with:
> #+BEGIN_SRC emacs-lisp
> (setq warning-suppress-log-types '((comp) (comp))) (setq
> warning-suppress-types '((comp) (comp)))
> #+END_SRC
> 
> #+BEGIN_SRC scheme
> (use-modules (gnu home services emacs)
>      (gnu home)
>      (gnu packages)
>      (ice-9 pretty-print)
>      (gnu services))
> 
> (define-public minimal-home-environment
>   (home-environment
>    (services
>     (list
>      (service home-emacs-service-type
>       (home-emacs-configuration
>        (packages
> (list
> (specification->package "bash")
> (specification->package "emacs-next")
> (specification->package "emacs-debbugs")
> (specification->package "emacs-evil")
> (specification->package "emacs-paredit")
> (specification->package "emacs-anzu")))
>        (init '((evil-mode 1)))
>        (early-init '((setq warning-suppress-log-types '((comp)
> (comp)))
>      (setq warning-suppress-types '((comp) (comp)))))))))))
> 
> minimal-home-environment
> #+END_SRC
You should also take an extra-files argument, e.g. to add custom.el or
other elisp files that init.el might refer to.

Also, I'm not certain if "scheme-file" is the right primitve here –
Emacs Lisp does differ from Scheme, e.g. in keyword syntax among
others.

Cheers




This bug report was last modified 2 years and 53 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.