From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Cournoyer Subject: Re: Emacs in multiple profiles Date: Sun, 27 Oct 2019 23:45:31 -0400 Message-ID: <87sgndcz38.fsf@gmail.com> References: <9c395fd0-9458-7894-af8b-9294d212c60b@fastmail.net> <878tajzu03.fsf@gmail.com> <87a7uyd7qy.fsf@gmail.com> <874ll51mq3.fsf@gmail.com> <87zi2t4jgh.fsf@gmail.com> <877ep4z44b.fsf@gmail.com> <87tv88ihzc.fsf@ambrevar.xyz> <878spgo7ex.fsf@gmail.com> <87o8yccwtq.fsf@ambrevar.xyz> <871rv1ed8v.fsf@gmail.com> <87mudpm5nt.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:57581) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOvyK-00030F-Mx for help-guix@gnu.org; Sun, 27 Oct 2019 23:45:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOvyJ-0006Iz-8z for help-guix@gnu.org; Sun, 27 Oct 2019 23:45:36 -0400 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]:45248) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iOvyJ-0006IP-5N for help-guix@gnu.org; Sun, 27 Oct 2019 23:45:35 -0400 Received: by mail-qk1-x731.google.com with SMTP id q70so7237411qke.12 for ; Sun, 27 Oct 2019 20:45:34 -0700 (PDT) In-Reply-To: <87mudpm5nt.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Fri, 25 Oct 2019 13:21:58 +0200") 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: Pierre Neidhardt Cc: Alex Kost , myglc2@gmail.com, help-guix@gnu.org Hello Pierre, Pierre Neidhardt writes: > Looking good! > > I just tried to install Emacs to a dummy profile with your patch. > Here is the result (with ":" replaced by line breaks): > > ... > export EMACSLOADPATH=\ > "${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/site-lisp/ > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp/ > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//calc > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//calendar > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//cedet > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//cedet/ede > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//cedet/semantic > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//cedet/semantic/analyze > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//cedet/semantic/bovine > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//cedet/semantic/decorate > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//cedet/semantic/symref > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//cedet/semantic/wisent > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//cedet/srecode > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//emacs-lisp > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//emulation > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//erc > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//eshell > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//gnus > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//image > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//international > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//language > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//leim > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//leim/ja-dic > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//leim/quail > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//mail > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//mh-e > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//net > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//nxml > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//obsolete > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//org > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//play > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//progmodes > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//term > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//textmodes > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//url > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/26.3/lisp//vc > ${GUIX_PROFILE:-/gnu/store/g5371rkr7k5j6n5gmg0a8bhspsdfnjvy-profile}/share/emacs/site-lisp/${EMACSLOADPATH:+:}$EMACSLOADPATH" > export ... > > > Then I did > > /home/ambrevar/projects/guix/pre-inst-env guix environment --ad-hoc emacs emacs-expand-region -- emacs -q > > > And I get Emacs with expand region functions, but since GUIX_ENVIRONMENT > is still effective, it's unclear what loads it. I'm not sure I understand correctly, but perhaps you'd want to use --pure, so to make sure nothing from your current environment interferes? But that's still leave site-start.el to look into ~/.guix-profile, I believe. You could also try with emacs-minimal, which doesn't have any of the emacs-guix additions. > So it seems to be the right approach, let's keep testing! > > With regard to the "cleanups" you mentioned: > >> Various cleanups could be undertaken in both Guix (no longer need the >> set-emacsloadpath phase in the emacs-build-system) and Emacs-Guix (no >> need for custom logic looking into ~/.guix-profile) and perhaps other >> places should this get merged. > > Shall we keep guix-emacs.el (and site-start.el) at all? > > What guix-emacs.el does if I'm not mistaken: > > - Find autoloads: Would we still need this then? I'm not sure. If > not, then it would be great to remove this because finding-autoload > linearly increases Emacs loading time. > > - Find packages in GUIX_ENVIRONMENT: I suppose we don't need this since > EMACSLOADPATH should be in the `guix environment' as well. > > - Find packages in "/run/current-system/profile": The approach used by > other programs at the moment is to do this in /etc/profile, e.g. > > export MANPATH=\ > $HOME/.guix-profile/share/man\ > :/run/current-system/profile/share/man > > Seems to me that we can remove guix-emacs.el and site-start.el. > > Cheers! I also think we can do without these! I'm rebuilding Emacs with a new patch; will share for testing it if works okay. Alex: I think you'll want to adapt/remove the code in Emacs-Guix which is used to locate the Emacs libraries installed using Guix, since they'd now be available directly to Emacs (through EMACSLOADPATH). Of course, to be done only after discussed patch is merged :-). Thanks for testing! Maxim