From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <87o96w2cmm.fsf@roquette.mug.biscuolo.net> References: <20190228.192814.35659745992274650.kumagusu08@gmail.com> <87ef7sqjvz.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:50953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzMyr-0003sv-OV for help-guix@gnu.org; Thu, 28 Feb 2019 09:48:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzMyp-0003HG-QF for help-guix@gnu.org; Thu, 28 Feb 2019 09:48:13 -0500 Received: from ns13.heimat.it ([46.4.214.66]:58462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzMyo-0003GA-BD for help-guix@gnu.org; Thu, 28 Feb 2019 09:48:11 -0500 In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: zimoun Cc: help-guix --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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: =2D-8<---------------cut here---------------start------------->8--- (use-package magit :ensure t :pin "MELPA_Stable" :bind ("C-x g" . magit-status)) =2D-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 appreciate 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: =2D-8<---------------cut here---------------start------------->8--- (when (memq window-system '(mac ns)) (use-package exec-path-from-shell :ensure t :config (exec-path-from-shell-initialize))) =2D-8<---------------cut here---------------end--------------->8--- I've still not experimented moving the conditional _only_ around :ensure, like this =2D-8<---------------cut here---------------start------------->8--- (use-package exec-path-from-shell (when (memq window-system '(mac ns)) :ensure t :pin "MELPA_Stable") :config (exec-path-from-shell-initialize)) =2D-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 browser) zimoun 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! [...] Thanks Giovanni [1] https://jwiegley.github.io/use-package/ [2] https://jwiegley.github.io/use-package/keywords/#if-when-unless [3] https://github.com/jwiegley/use-package#conditional-loading =2D-=20 Giovanni Biscuolo Xelera IT Infrastructures --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEERcxjuFJYydVfNLI5030Op87MORIFAlx39JEACgkQ030Op87M ORL27xAAk6grBCvgqiWWT8uepFVxLqEbXHSUx06tu/ccrfUhRlLH2u0D+Cv3vDsL rmn6a7xnqEFplNoOgAuGS2TGFMc8pr0JgZrn0S4k40RaE3EtfN26n97oKhBagHqx OD+KsgDf/y0bfWHtIlhatkqH+0DkdwexoxtjkuxFYV6OzY+sGa7MEgeWozGIGEfG ypA4rmakCYAELaww+HDad96kxBDGc7zJx0CcHVsqoRjW7bjVjoPXFoOU2W1zhJHW IAf2QyV09sbF1+qb7tpRnfhCFweru96TlNXGxufd+qGg458t1JxksE49YZ9CayGA 7NSVVVbvoCm9HGwsoeHYAgdXrJ2E8L+736vl67QWBHJTLHvoYhBi1BLLvKZCSJlO M4eC6r5qvzVEJhV/Pe44jB4dZUPct52cAaGZEyRkyKQhg7zUZ6A3HfLgvWHRsEYh G4kxiJGqumxByaBD8iPtbCf8zgKXoBO6tKMImpIhBbMECQunxcmvTY/GPn5P+6U8 uh3GOTzADQP5dUxfvIdmbDhcjL8ubU9soiw0o0xBZ3kUPdxKKQepTEi/Xc3vFvW7 4tu2oIf3FrxgQ+roiqfEE9QAaxdNFwFjhGxh50yQxBK2jYqnWlnBAiwXwE9ZIdga Z4V9O03/KZ6hCYhlDMqRpP/PODZjq8B1+TGXAzaRbk4Cba/5byw= =K2rH -----END PGP SIGNATURE----- --=-=-=--