[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs use-package: Guix backend?

From: zimoun
Subject: Re: Emacs use-package: Guix backend?
Date: Sun, 20 Dec 2020 08:24:46 +0100

Hi Ricardo,

I have similar workflow as Fredrik.  Tiny more complement.

On Sat, 19 Dec 2020 at 10:42, Ricardo Wurmus <> wrote:

> I recently moved all my Emacs packages to a separate profile, which is
> controlled by a manifest that’s generated from my configuration
> file.  I like this, because I can separately upgrade packages from my
> main profile and keep my Emacs configuration self-contained.

I have a manifest file containing the Emacs packages and related ones
(notmuch, aspell, aspell-dict-, etc.) and a tiny/dumb Bash script to
install/upgrade from this manifest.  One key point is to also track the
channels.scm (guix describe -f channels) to be able to reproduce
elsewhere easily.

(I would like to replace this Bash helper by “guix repl -- script.scm”
but have not find the time to implement it.  Even, I am still annoying
by “guix repl -- ~/.config/guix/scripts/foo.scm” instead of “guix foo”;
see <>.)

The manifest file is usable with all the Guix commands–guix weather,
build, pack to name the ones I use the most with my Emacs packages.
This appears to me a big advantage.

> What still annoys me, though, is that package installation is separate
> from configuration.  I don’t really want to be forced to update the
> manifest at the top of my before I can configure the package
> somewhere at the bottom of the

Before, I used ’use-package’ but then switched to
’with-eval-after-load’.  My main use of ’use-package’ was because of
:ensure which was not relevant.

Since it is more important for me to check the availability or build or
pack my Emacs profile than lost the sync between install and
configuration, I am fine with this separation.

What still annoys me, though, is the usual Guix UI which is not handy,
for instance, I use this:

  guix time-machine -C ~/.config/guix/channels-emacs.scm \
       -- install \
          -m ~/.config/guix/manifests/emacs.scm \
          -p ~/.cache/guix/profiles/emacs/emacs
and it would be easier to deal with multiple profile if default
locations for manifest files and profile symlink (and channel file)
would be known by Guix.

On the other hand, I also have manifest+channels files and profile
inside all the folders about my projects.  It has already been discussed
some time ago; something about UI is missing to deal with multiple
profiles, IMHO.  Maybe your proposal about Emacs could also lead to
discussions on how to add this missing part: I do now remember if we
have not reached a consensus or if we did but no one then implemented

> The “use-package” macro was designed to allow for both installation and
> configuration in the same place.  By default it uses package.el to
> install packages when they aren’t available yet.  I’d like to use
> “use-package”, but I’d like it to install packages with Guix and also
> install to a separate Guix profile, preferably via a manifest.
> Package managers are supposed to override “use-package-ensure-function”
> and/or “use-package-pre-ensure-function” to use something other than
> package.el.

Yeah a story similar to straight.el could be nice. :-)

> Before I embark on this journey, do any of you have travel reports to
> share?  Do you think this is worth doing?  If so, where could we add
> this feature so that all Guix users benefit from it?  Emacs-Guix?

I switched from ’use-package’ to ’with-eval-after-load’ at the previous
French lockdown and nothing is missing me.  Even if :ensure would be
provided by Guix, I do not think I would switch back.  That’s my travel
report. :-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]