From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: How to use Guix.el from Git? Date: Mon, 23 Nov 2015 00:05:09 +0300 Message-ID: <8737vxpwxm.fsf@gmail.com> References: <87mvu62pue.fsf@gnu.org> <87d1v2otah.fsf@gmail.com> <87egfh3ngg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0boz-0008N6-Sa for guix-devel@gnu.org; Sun, 22 Nov 2015 16:05:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0bou-0003bx-TA for guix-devel@gnu.org; Sun, 22 Nov 2015 16:05:17 -0500 In-Reply-To: <87egfh3ngg.fsf@gnu.org> (Mathieu Lirzin's message of "Sun, 22 Nov 2015 19:20:47 +0100") 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: Mathieu Lirzin Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mathieu Lirzin (2015-11-22 21:20 +0300) wrote: [...] > guix-load-path is a variable defined in `guix-backend.el'. > Its value is "~/src/gnu/guix/emacs" > >> >> Also just in case, show the value of `guix-helper-file' variable. > > > guix-helper-file is a variable defined in `guix-backend.el'. > Its value is "/home/mthl/src/gnu/guix/emacs/guix-helper.scm" > > These two variables helped me figure out that the problem was the use of > =E2=80=9C~=E2=80=9D in: > > (let ((dir "~/src/gnu/guix/emacs")) > ... Ouch, my bad, sorry. Yes, IIUC Guile %load-path should contain absolute directories, and as Geiser does not expand the contents of `geiser-guile-load-path', this "~/..." string literally goes to %load-path. > When changing it with =E2=80=9C/home/mthl=E2=80=9D it works! To avoid th= is kind of > mistake in the future, a simple fix would be to change the example in > the documentation, with: > > (let ((dir "/absolute/path/to/your-guix-git-tree/emacs")) > ... > > But is there a way to change the implementation to let users use > relative path? Yes, the fix is easy. The patch is attached, could you confirm that it works? Thank you for finding the root of this bug! --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-emacs-Expand-guix-load-path.patch >From 9788f62b319392f261a73704135f36536b1560e0 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Sun, 22 Nov 2015 23:36:39 +0300 Subject: [PATCH] emacs: Expand 'guix-load-path'. Reported by Mathieu Lirzin at . * emacs/guix-backend.el (guix-start-repl): Expand 'guix-load-path' to avoid relative directory name in Guile %load-path. --- emacs/guix-backend.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/guix-backend.el b/emacs/guix-backend.el index e7c158b..82383e4 100644 --- a/emacs/guix-backend.el +++ b/emacs/guix-backend.el @@ -202,7 +202,7 @@ this address (it should be defined by ;; A mix of the code from `geiser-repl--start-repl' and ;; `geiser-repl--to-repl-buffer'. (let ((impl 'guile) - (geiser-guile-load-path (cons guix-load-path + (geiser-guile-load-path (cons (expand-file-name guix-load-path) geiser-guile-load-path)) (geiser-repl-startup-time guix-repl-startup-time)) (with-current-buffer buffer -- 2.6.1 --=-=-=--