From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: bug#22550: (require 'magit) produces error: "no such file or directory" "dash" Date: Thu, 04 Feb 2016 23:00:36 +0300 Message-ID: <87y4b0tfdn.fsf@gmail.com> References: <87egctdsb0.fsf@gmail.com> <87lh70vclr.fsf@gmail.com> <87lh7033q9.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]:39732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRQ5R-0001lO-LT for bug-guix@gnu.org; Thu, 04 Feb 2016 15:01:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRQ5O-000261-Eq for bug-guix@gnu.org; Thu, 04 Feb 2016 15:01:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:52063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRQ5O-00025x-B6 for bug-guix@gnu.org; Thu, 04 Feb 2016 15:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aRQ5O-0001T8-54 for bug-guix@gnu.org; Thu, 04 Feb 2016 15:01:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87lh7033q9.fsf@gmail.com> (myglc2@gmail.com's message of "Thu, 04 Feb 2016 10:16:46 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: myglc2 Cc: 22550@debbugs.gnu.org myglc2 (2016-02-04 18:16 +0300) wrote: [...] > glc4@g1 ~$ echo $EMACSLOADPATH > :/etc/emacs > > If I set it to match what you say ... > > glc4@g1 ~$ EMACSLOADPATH=3D/etc/emacs/site-start.el > glc4@g1 ~$ emacs No, no, it is expected; I meant ":/etc/emacs" is the default value, sorry for the confusion. [...] > Note: below, I have EMACSLOADPATH=3D:/etc/emacs > >>> (require 'magit) >>> >>> ... generates this traceback ... [...] >> Yes, the problem is: currently only a user profile is "inspected" for >> emacs packages, but not a system profile. I didn't realize people could >> install emacs packages globally, but apparently we should also check the >> system profile as well. Thanks for reporting! >> >>> Adding emac-dash to config.h.scm does not change the behavior. >> >> There is no need to install emacs-dash explicitly, as magit "propagates" >> this library. You can do "M-x guix-edit magit" to see that "dash" is in >> "propagated-inputs". > > When I do "M-x guix-edit" I get ... > > M-x guix-edit [No match] > > ... which is what lead me to believe I needed to fix load-path No, there is no need to fix load-path; on GuixSD it should work out-of-the-box; it doesn't work currently because there is a bug introduced several days ago (see below). >> Now could you try this after starting Emacs: >> >> M-: (guix-emacs-load-autoloads "/run/current-system/profile") >> >> and check that "M-x magit-status" works after that? > > YES! That makes everything work. Thanks for confirmation! > So, should I put ... > > '(guix-emacs-load-autoloads "/run/current-system/profile")' > > ... in init.el, in which case guix INFO should say so. Well, you can do it as a temporary workaround, but we'll fix it soon (I mean the system profile will also be inspected for emacs packages), so it will not be necessary in the closest future. > Or, is there something wrong with EMACSLOADPATH? Yes, I mean it's not a problem on your side, but it's bug in GuixSD. I think we should change this value from ":/etc/emacs" to "/etc/emacs:". The problem with the current EMACSLOADPATH is that "/etc/emacs" value is appended to 'load-path' variable, but it should be prepended to it, so that the proper "site-lisp.el" will be found. Sorry, this bug was introduced recently and you are the first who faced it :-) Right now I can't check it, but I think if you start emacs like this: EMACSLOADPATH=3D/etc/emacs: emacs you'll get "M-x guix-=E2=80=A6" commands. Could you confirm? So to recap, you found 2 issues: 1. Emacs packages installed in a system profile are not automatically added to 'load-path'. 2. With the current EMACSLOADPATH, a wrong "site-lisp.el" is loaded, so "M-x guix-=E2=80=A6" commands are not autoloaded. Both are easy to fix, thanks again for reporting! --=20 Alex