Subject: Re: bug#22550: (require 'magit) produces error: "no such file or directory" "dash"

From: Alex Kost <[email-masked]>
Date: Fri, 05 Feb 2016 11:43:32 +0300

myglc2 (2016-02-05 02:40 +0300) wrote:

[...]
>> Right now I can't check it, but I think if you start emacs like this:
>>
>>   EMACSLOADPATH=/etc/emacs: emacs
>>
>> you'll get "M-x guix-…" commands.  Could you confirm?
>
> Yes that works.
>
> ... and then if I do
>
> '(guix-emacs-load-autoloads "/run/current-system/profile")'
>
> 'M-x magit-status' works.

Thanks for confirming.  It will be fixed soon.

> I am a little confused (not your fault). May I ask an off-topic
> question?

Sure.

> It seems that doing ... 'M-x guix-edit foo.scm' ... amounts to hacking

just "foo" without ".scm" ---------------^^^^^^^
(BTW package names are completed if you press TAB)

> guix.
>
> However '8.1 Building from Git' says, "If you want to hack Guix itself,
> it is recommended to use the latest version from the Git repository."
> ... and goes on to describe a different approach.
>
> Can you comment on which approach is best for which situation.

The purpose of "M-x guix-edit" Emacs command (and "guix edit" shell
command) is just to show you the source code of the package.  This
source is usually placed in the store, and you shouldn't edit it.  If
you are going to contribute to guix, (info "(guix) Building from Git")
is the right way.

For "M-x guix-edit", there is a trick that allows to point to any place
with packages — setting 'guix-directory' variable.  For example, if you
cloned guix to "~/src" directory, after:

  (setq guix-directory "~/src/guix")

"M-x guix-edit magit" will open "~/src/guix/gnu/packages/emacs.scm" file.

-- 
Alex