From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Howto run guix.el correctly? Date: Wed, 26 Nov 2014 23:14:17 +0300 Message-ID: <87lhmxu3c6.fsf@gmail.com> References: <87d28fgjfn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtiyq-0001tU-1T for guix-devel@gnu.org; Wed, 26 Nov 2014 15:14:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xtiyk-0000NM-Jt for guix-devel@gnu.org; Wed, 26 Nov 2014 15:14:27 -0500 Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:48591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtiyk-0000MY-CU for guix-devel@gnu.org; Wed, 26 Nov 2014 15:14:22 -0500 Received: by mail-lb0-f169.google.com with SMTP id p9so3107349lbv.28 for ; Wed, 26 Nov 2014 12:14:20 -0800 (PST) In-Reply-To: (Adam Pribyl's message of "Sat, 22 Nov 2014 22:04:44 +0100 (CET)") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Adam Pribyl (2014-11-23 00:04 +0300) wrote: > On Sat, 22 Nov 2014, Alex Kost wrote: > >> Adam Pribyl (2014-11-22 01:28 +0300) wrote: >> >>> I have folloed the instruction in >>> http://www.gnu.org/software/guix/manual/guix.html#Emacs-Interface >>> to get the emacs interface for guix, but there is something missing >>> probably. >>> >>> Installation of emacs and geiser was OK, I changed the path to guix.el >>> (there is no /usr/share/ in my guix installation, I had to find guix.el >>> in the /gnu/store), after that I can start emacs and "M-x guix-..." but >>> every action says "Cannot open load file: no such file or directory >>> geiser-mode". >> >> If you mean you did (add-to-list 'load-path "/gnu/store/..."), then it's >> definitely not right. >> >>> There should probably be also the geiser path in the emacs init file or >>> something? >> >> I assume you use a Guix (or GNU or whatever it should be called) >> system. I must admit I have not tried it yet, and all I know about >> setting "guix.el" there I learnt from a chat with davexunit on #guix >> today. >> >> So I think the following should be added to your emacs config: >> >> - Add dirs with "guix.el" and "geiser" to load-path (I'm absolutely >> not sure about the correctness of the paths, so double check please): >> >> (add-to-list 'load-path "/run/current-system/profile/share/emacs/site-l= isp/") >> (add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp") >> >> - Initial setup of geiser: >> >> (require 'geiser-install) >> >> - Initial setup of guix: >> >> (require 'guix-init) > > Right, I am testing it under GNU system (USB installed image with guix > 0.8). Thanks for the point regarding geiser. This is now my ~/.emacs > > (add-to-list 'load-path > "/gnu/store/ysh4fvnxr0p8xrphcikivpafgvf6g18m-guix-0.8/share/emacs/site-li= sp/") > (add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp") > (require 'geiser-install) > (require 'guix-init) > > Reason for the /gnu/store path is, that guix.el is a part of guix and I > did not found it in any profile. I've added my profile path, where the > geiser is (as it is installed by this user), but the /run/current-system > has no share/emacs at all. I do not know why. Did you check the right path? It's "/run/current-system/profile/share/emacs...", not "/run/current-system/share/emacs/..." > While I got further, it is still somewhat confused as invoking > guix-all-available-packages results in error in process sentinel: Text > is read-only > No prompt found! Thanks Adam and David for reporting. You encouraged me to install the system (at last). So the problem was that a default directory with guix scheme files was not added to the %load-path (it is fixed with commit cbbc877). As a workaround you may perform "guix pull" =E2=80=93 after that= the REPL should start without errors. So to recap, to make "guix.el" work in the current system one should do the following: 1. "guix pull" to populate "~/.config/guix/latest" (this step will not be required for the future releases) 2. Install geiser: "guix package -i geiser" 3. Setup geiser (hopefully this step will not be required soon) Put in your emacs config: (add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp") (require 'geiser-install) 4. Setup "guix.el". Put in your emacs config: (add-to-list 'load-path "") (require 'guix-init) I appreciate if someone confirm that the above works (or doesn't work :-)). --=20 Alex