unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: myglc2 <myglc2@gmail.com>
To: Alex Kost <alezost@gmail.com>
Cc: 22550@debbugs.gnu.org
Subject: bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
Date: Thu, 04 Feb 2016 10:16:46 -0500	[thread overview]
Message-ID: <87lh7033q9.fsf@gmail.com> (raw)
In-Reply-To: <87lh70vclr.fsf@gmail.com> (Alex Kost's message of "Thu, 04 Feb 2016 16:17:36 +0300")

Alex Kost <alezost@gmail.com> writes:

> myglc2 (2016-02-04 07:15 +0300) wrote:
>
>> with magit installed on guixSD following the config shown further below.
>>
>> With init.el containing ...
>>
>> VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
>> (add-to-list 'load-path "/run/current-system/profile/share/emacs/site-lisp")
>> (require 'guix-init nil t)
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> You don't need to add these lines to your init file.  On GuixSD this
> code is executed by "/etc/emacs/site-start.el" (it is a default value of
> EMACSLOADPATH which is honored by Emacs).
>

I added these lies because, without them, '(require 'magit)' produced ...

VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Debugger entered--Lisp error: (file-error "Cannot open load file" "no such file or directory" "magit")
  require(magit)
  eval((require (quote magit)) nil)
  eval-last-sexp-1(nil) eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

... my EMACSLOADPATH ...

glc4@g1 ~$ echo $EMACSLOADPATH
:/etc/emacs

If I set it to match what you say ...

glc4@g1 ~$ EMACSLOADPATH=/etc/emacs/site-start.el
glc4@g1 ~$ emacs

... produces *Messages* 
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Warning: Lisp directory `/etc/emacs/site-start.el': Not a directory

timer-set-idle-time: Cannot open load file: not a directory, time-date
Error in post-command-hook (global-font-lock-mode-check-buffers): (file-error "Cannot open load file" "not a directory" "time-date")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If I set it to match what I think you mean ...

glc4@g1 ~$ EMACSLOADPATH=:/etc/emacs/site-start.el
glc4@g1 ~$ emacs

... I get ...
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Warning: Lisp directory `/etc/emacs/site-start.el': Not a directory

Directory '/home/glc4/.guix-profile/share/emacs/site-lisp' does not exist.
For information about GNU Emacs and the GNU system, type C-h C-a.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

... If I look in /etc/emacs I see ...
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
  /etc/emacs:
  total used in directory 684 available 225716120
  dr-xr-xr-x   2 root root        4096 Dec 31  1969 .
  drwxrwxr-t 992 root guixbuild 692224 Feb  3 23:33 ..
  lrwxrwxrwx   2 root root          57 Dec 31  1969 site-start.el -> /gnu/store/3jkv4favm6q2vphkm3m4wmpr8p75d6vx-site-start.el
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Note: below, I have EMACSLOADPATH=:/etc/emacs

>> (require 'magit)
>>
>> ... generates this traceback ...
>>
>> VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
>> Debugger entered--Lisp error: (file-error "Cannot open load file" "no such file or directory" "dash")
>>   require(dash)
>>   byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\300\312\313\314#\207" [require cl-lib dash with-editor git-commit magit-core magit-diff magit-apply magit-log format-spec package nil t] 4)
>>   require(magit)
>>   eval((require (quote magit)) nil)
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> 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

>
> 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.

So, should I put ...

'(guix-emacs-load-autoloads "/run/current-system/profile")'

... in init.el, in which case guix INFO should say so.

Or, is there something wrong with EMACSLOADPATH?

  reply	other threads:[~2016-02-04 15:17 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04  4:15 bug#22550: (require 'magit) produces error: "no such file or directory" "dash" myglc2
2016-02-04 13:17 ` Alex Kost
2016-02-04 15:16   ` myglc2 [this message]
2016-02-04 20:00     ` Alex Kost
2016-02-04 23:40       ` myglc2
2016-02-05  8:43         ` Alex Kost
2016-02-05 14:52           ` myglc2
2016-02-05 21:54             ` Alex Kost
2016-02-06 12:38               ` Ludovic Courtès
2016-02-07  8:14                 ` Alex Kost
2016-02-08  9:22                   ` Ludovic Courtès
2016-02-10  7:46                     ` Alex Kost
2016-02-07  8:56       ` Alex Kost
2016-02-08  2:52         ` myglc2
2016-02-08  9:19           ` Alex Kost
2016-03-06 14:47       ` myglc2
2016-03-07  9:14         ` Alex Kost
2016-03-07 20:03           ` myglc2
2016-03-08  9:25             ` Alex Kost
2016-03-08 13:49               ` myglc2
2016-03-09 10:58                 ` Alex Kost
2016-03-09 14:47                   ` myglc2
2016-03-24 16:20           ` Alex Kost
2016-03-25 15:20             ` myglc2
2016-03-26  0:08               ` Alex Kost
2016-03-26  2:51                 ` myglc2
2016-02-08  9:55 ` bug#22550: Fixed Alex Kost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lh7033q9.fsf@gmail.com \
    --to=myglc2@gmail.com \
    --cc=22550@debbugs.gnu.org \
    --cc=alezost@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).