* Emacs config for "traditional" or Guix environment?
[not found] ` <86o8ljeb3g.fsf@gmail.com>
@ 2020-10-06 9:46 ` Giovanni Biscuolo
0 siblings, 0 replies; only message in thread
From: Giovanni Biscuolo @ 2020-10-06 9:46 UTC (permalink / raw)
To: zimoun; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 4301 bytes --]
Hello Simon,
thank you for your patience and tips!
This is a follow-up of things discussed in bug#43243 (now resolved). I'm
posting this to help-guix in case someone finds it useful.
This is a *very* quick summary of my bug report: I had a strange error
with elfeed-org and after some investigation I realized I was still
using old packages loaded from my ~/.emacs.d/elpa directory, installed
using "use-package" before migrating to Guix's Emacs; I removed that
directory and all is running as before.
During the investigation I sent my redacted init.el, Simon commented
it. The following is my follow-up.
zimoun <zimon.toutoune@gmail.com> writes:
> Dear,
>
> On Fri, 02 Oct 2020 at 20:08, Giovanni Biscuolo <g@xelera.eu> wrote:
[...]
>> ;; -*- mode: emacs-lisp -*-
>> (unless (require 'guix-emacs nil 'noerror)
>> (package-initialize))
>> (unless (require 'guix-emacs nil 'noerror)
>> ;; package archives
>> (when (>= emacs-major-version 24)
>> (require 'package)
>> (setq package-archives
>> '(("GNU_ELPA" . "https://elpa.gnu.org/packages/")
>> ("org" . "https://orgmode.org/elpa/")
>> ("MELPA_Stable" . "https://stable.melpa.org/packages/")
>> ("MELPA" . "https://melpa.org/packages/"))
>> package-archive-priorities
>> '(("GNU_ELPA" . 15)
>> ("org" . 10)
>> ("MELPA_Stable" . 5)
>> ("MELPA" . 0)))))
>
> From my experience, I do not mix packages from Emacs archives and from
> Guix because it often leads to weirdness –– unexpected behaviour at
> least…
Yes I perfectly understand that: *never* mix packages.
What you see (and still I am using) is my attempt for a smooth migration
from my "Debian+use-package" Emacs installation to a pure Guix one;
since I'm using the same environment (packages+config) on all my
machines *and* I'm quite conservative I wanted a configuration that
"Just Worked" in all my environments (via git controlled dotfolder).
This "multi enviroment" trick was suggested by a smart Emacs user:
--8<---------------cut here---------------start------------->8---
(if (require 'guix-emacs nil 'noerror)
; Code for Guix Emacs
; Code for non-Guix Emacs
)
--8<---------------cut here---------------end--------------->8---
and I adapted it to my needs without actually fully understand how it
works :-O
...and it actually worked during my transition to a full Guix Emacs
install, being a transition from a Debian+use-package 26.3 to the same
version on Guix.
Anyway, as far as I see, my current usage of "(unless (require
'guix-emacs nil 'noerror)..." actually prevents any code to be evaluated
in my Guix Emacs environment.
> Personally, I have removed the use of all the ‘package.el’
> functions and only use packages ’emacs-*’ from Guix and then configure
> them using ’with-eval-after-load’.
I'm considering this, also, since now I do not need my old "multi env"
config anymore and I like simple and clean solutions, easier to
debug. Guix is the solution to package management, I migrated, forget
the past. Full stop. :-D
[...]
> (Note I do not know about TRAMP, so maybe ’tramp-remote-path’ should be
> evaluated at init time and not at use time. Aside the fact that TRAMP
> is part of vanilla Emacs, AFAICT.)
Yes it is part of vanilla Emacs but the upstream author suggested me to
install the upstream version, that solved an issue I had with /adb:/ on
26.3 vanilla Emacs from Guix.
[...]
> From my understanding, you are misusing ’use-package’. Or you could
> rewrite:
>
> (with-eval-after-load 'org
> (require 'org-tempo))
>
> (And I am personally doing that.)
[...]
> Last, your starting time should be pretty long, right? Hum? IMHO, it
> could be really faster if you use ’with-eval-after-load’ or
> ’(use-package foo :defer t …)’ and so enjoy the speedup by “lazy”
> evaluation.
Thank you, I'll study with-eval-after-load.
Fast starting time is absolutely not a priority for me, I usually use
Emacs in daemon mode for several days... but it surely helps.
[...]
Thanks a lot! Giovanni.
--
Giovanni Biscuolo
Xelera IT Infrastructures
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-06 9:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <877dt7vuc8.fsf@roquette.i-did-not-set--mail-host-address--so-tickle-me>
[not found] ` <87k0x652pb.fsf@roquette.i-did-not-set--mail-host-address--so-tickle-me>
[not found] ` <874knir44a.fsf@gmail.com>
[not found] ` <87sgb25n66.fsf@roquette.i-did-not-set--mail-host-address--so-tickle-me>
[not found] ` <877dscpud6.fsf@gmail.com>
[not found] ` <87lfgs310x.fsf@roquette.i-did-not-set--mail-host-address--so-tickle-me>
[not found] ` <86sgb0s6ys.fsf@gmail.com>
[not found] ` <87sgawv6ur.fsf@roquette.i-did-not-set--mail-host-address--so-tickle-me>
[not found] ` <86o8ljeb3g.fsf@gmail.com>
2020-10-06 9:46 ` Emacs config for "traditional" or Guix environment? Giovanni Biscuolo
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).