[Top][All Lists]

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

emacs byte-compiled packages incompatibilities (was Re: emacs-guix inval

From: Giovanni Biscuolo
Subject: emacs byte-compiled packages incompatibilities (was Re: emacs-guix invalid byte opcode: op=183 ptr=25)
Date: Thu, 28 Feb 2019 15:47:45 +0100

Hi ziomun,

I'm planning to migrate from my "foreign distro managed" emacs (Debian)
to a "guix managed one" (on Debian), so I'm very interested in this
thread and related hints and solutions

since I wanted a declarative approach to package management, I'm using
"use-package" [1] to install and configure emacs packages; simple
example for my magit installation:

--8<---------------cut here---------------start------------->8---
(use-package magit
   :ensure t
   :pin "MELPA_Stable"
   :bind ("C-x g" . magit-status))
--8<---------------cut here---------------end--------------->8---

(MEPLA_Stable repository is defined in my init.el)

in a near future I'd like to let guix manage _all_ my emacs packages, so
I'm planning to remove all the ":ensure t" declarations (and pin): this
way my "guix installed emacs" will never try to install a package via
MELPA_Stable when loading my init.el (am I wrong?)

there could be a better option: use a conditional [2] so that ":ensure"
and ":pin" are evaluated _only_ when "not in guix"; this way I could
continue using my "stable emacs environment" without worklow
interruptions (in this case I should also find a way to completely
ignore ~/.emacs.d/elpa installed packages: how?) until I manage to
complete my "guix emacs environment"

I'd even be able to use my dotfolder on all my other machines, even
those still not "emacs-migrated" to guix: this is a plud I'd really

John Wiegley gives us an example [3] of conditional loading that will
stop :ensure (AFAIU the whole use-package) evaluation from happening on
Mac systems:

--8<---------------cut here---------------start------------->8---
(when (memq window-system '(mac ns))
  (use-package exec-path-from-shell
    :ensure t
--8<---------------cut here---------------end--------------->8---

I've still not experimented moving the conditional _only_ around
:ensure, like this

--8<---------------cut here---------------start------------->8---
(use-package exec-path-from-shell
  (when (memq window-system '(mac ns))
    :ensure t
    :pin "MELPA_Stable")
--8<---------------cut here---------------end--------------->8---

so don't know if the conditional can be *just* for :ensure (and :pin)

anyway, first and foremost: is there a way to check if I'm running a
"guix emacs" or the foreign distro one?
(memq packaging-system '(gnu guix)) ? :-)

any hint wellcome since this could potentially save me a lot of downtime
with emacs (I almost digitally live in emacs and a little bit of

zimoun <address@hidden> writes:


> Therefore, if one runs Emacs version 24 (the one coming with `apt-get
> install emacs` on Debian 9) and `guix package -i emacs-stuff`, then it
> leads to incompatibilities. Right?

AFAIU incompatibilies will arise only if you try to load the "Debian
emacs" compiled packages in the guix installed emacs; vice versa does
not apply since guix emacs packages are well isolated in the /gnu/store
and "debian emacs" doen even know they exists (unless you explicitly add
a load path in your init.el)

as I sayd above, I still don't know how to skip loading packages from
~/.emacs.d/elpa when in "guix emacs"


> My "advice" about Emacs and its packages on foreign distro is:
>  - install Emacs from Guix (guix package -i emacs) because the version
> is more up to date (than Debian for example)
>  - adapt the PATH or add `source ~/.guix-profile/etc/profile` to
> enable the correct Emacs (from Guix)
>  - choose only one way to install emacs packages: from ELPA/MELPA *or*
> from Guix *and* it is not recommanded to mix the both.

when using the "native" one, emacs could be started using a different
user-emacs-directory: this way emacs installed packages (from
ELPA/MELPA or manually) will be available only in that environment

but this solution is not good for me, since I should maintain two
different config trees: one for each emacs... no no no :-O

comments wellcome!






Giovanni Biscuolo

Xelera IT Infrastructures

Attachment: signature.asc
Description: PGP signature

reply via email to

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