unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Ricardo Wurmus <rekado@elephly.net>, help-guix@gnu.org
Subject: Re: Emacs use-package: Guix backend?
Date: Sun, 20 Dec 2020 08:24:46 +0100	[thread overview]
Message-ID: <86y2htq6rl.fsf@gmail.com> (raw)
In-Reply-To: <87h7oim8ro.fsf@elephly.net>

Hi Ricardo,

I have similar workflow as Fredrik.  Tiny more complement.

On Sat, 19 Dec 2020 at 10:42, Ricardo Wurmus <rekado@elephly.net> wrote:

> I recently moved all my Emacs packages to a separate profile, which is
> controlled by a manifest that’s generated from my init.org 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 <https://yhetil.org/guix/86d00evkmr.fsf@gmail.com>.)

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 init.org before I can configure the package
> somewhere at the bottom of the init.org.

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
it.

> 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. :-)

Cheers,
simon


  parent reply	other threads:[~2020-12-20  7:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-19  9:42 Emacs use-package: Guix backend? Ricardo Wurmus
2020-12-20  0:10 ` Fredrik Salomonsson
2020-12-20  7:24 ` zimoun [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-01  4:03 John Soo

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=86y2htq6rl.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=rekado@elephly.net \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).