GNU bug report logs - #22550
(require 'magit) produces error: "no such file or directory" "dash"

Previous Next

Package: guix;

Reported by: myglc2 <myglc2 <at> gmail.com>

Date: Thu, 4 Feb 2016 04:16:02 UTC

Severity: normal

Done: Alex Kost <alezost <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22550 in the body.
You can then email your comments to 22550 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Thu, 04 Feb 2016 04:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to myglc2 <myglc2 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 04 Feb 2016 04:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: (require 'magit) produces error: "no such file or directory" "dash"
Date: Wed, 03 Feb 2016 23:15:47 -0500
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)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

(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)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Adding emac-dash to config.h.scm does not change the behavior.


config.h.scm:
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
;; This is an operating system configuration template
;; for a "bare bones" setup, with no X11 display server.

(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules admin)
(use-package-modules disk) ;; parted
(use-package-modules ssh rsync wget screen)
(use-package-modules version-control) ;; git git-manpages
(use-package-modules emacs) ;; emacs magit

(operating-system
  (host-name "g1")
  (timezone "America/New_York")
  (locale "en_US.utf8")

  (bootloader (grub-configuration (device "/dev/sda")))
  (file-systems (cons (file-system
                        (device "g1sd")
                        (title 'label)
                        (mount-point "/")
                        (type "ext4"))
                      %base-file-systems))

  (users (cons* (user-account
                (name "glc")
                (comment "g l c")
                (group "users")
                (supplementary-groups '("wheel"))
		(home-directory "/home/glc"))

  	  (user-account
                (name "glc2")
                (comment "glc2")
                (group "users")
                (supplementary-groups '("wheel"))
                (home-directory "/home/glc2"))

	  (user-account
                (name "glc3")
                (comment "glc3")
                (group "users")
                (supplementary-groups '("wheel"))
                (home-directory "/home/glc3"))
	  
  	  (user-account
                (name "glc4")
                (comment "glc4")
                (group "users")
                (supplementary-groups '("wheel"))
                (home-directory "/home/glc4"))

	  %base-user-accounts))

  (packages (cons*
	     glibc-utf8-locales
	     parted
	     openssh
	     rsync
	     wget
	     screen
	     emacs
	     git git-manpages magit
	     %base-packages
	     )
	    )

  (services (cons* (dhcp-client-service)
                   (lsh-service #:port-number 22)
                   %base-services)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

root <at> g1 ~# guix pull

Starting download of /tmp/guix-file.hPsZb9
From http://git.savannah.gnu.org/cgit/guix.git/snapshot/master.tar.gz...
 master.tar.gz                               2.4MiB/s 00:04 | 9.8MiB transferred
unpacking '/gnu/store/dfil8xc2l55xs5zjvs5mvrji4m97vnn9-guix-latest.tar.gz'...
substitute: updating list of substitutes from 'http://hydra.gnu.org'... 100.0%
The following derivation will be built:
   /gnu/store/nmiak10q4fbax0n06qypgp0m1p7y084i-guix-latest.drv
building path(s) `/gnu/store/wsygn2xxms6fmqv2xwjqgmkr58466icr-guix-latest'
copying and compiling to '/gnu/store/wsygn2xxms6fmqv2xwjqgmkr58466icr-guix-latest'...
loading...	 23.3% of 481 filesrandom seed for tests: 1454557452
loading...	 99.8% of 481 files
compiling...	 98.3% of 481 files
updated GNU Guix successfully deployed under `/root/.config/guix/latest'
root <at> g1 ~# guix system reconfigure config.h.scm
substitute: updating list of substitutes from 'http://hydra.gnu.org'... 100.0%
The following derivations will be built:
   /gnu/store/wa37n1m89692sh17d5m1rpknkjbajh2r-system.drv
   /gnu/store/l2xhcir48mr0hbbn142lbbl45z3xnfnj-grub.cfg.drv
   /gnu/store/q993gpnzkfh00d56q5l57112nl127b99-shells.drv
   /gnu/store/nn89w1fcrnw10ikmqak3jnmflqv8z9ja-ca-certificate-bundle.drv
   /gnu/store/dxdxlq2x5pcnjx44cas2g3p4zh6569jz-gtk-icon-themes.drv
   /gnu/store/9qk8g4hcqks3lwyacy328zdhxmzmxnyq-info-dir.drv
   /gnu/store/jhbmd42vqb2jbvcxh3rli4xrzamlgdcd-profile.drv
   /gnu/store/xf6m2i96hrmw1hssjc71w4g2swqw587a-activate-service.drv
   /gnu/store/12bmphpb3skk6fn18mahza2dbh7chm8f-activate-service.drv
   /gnu/store/qghfckfm59s62y1y4imvlfvzacl7xg12-activate.drv
   /gnu/store/d74b89jil0aclla1yp6mm53x3yd8dprp-boot.drv
   /gnu/store/xgz9xh1r8ajzqrhd4dxks8dmrxqvazs3-etc.drv
/gnu/store/ddcfyn63vnkx78fw7jii92ndrvh1bf6w-system
/gnu/store/a1dn41j0bzy5sd66a69x0j67vcpyxgr3-grub.cfg
/gnu/store/83bx8wsdhh2adn03b10dm20j74gv0kyq-grub-2.00
activating system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/y008yk2vd41vgxfmbzs4xygmiwwx4n7p-etc...
usermod: no changes
usermod: no changes
adding user 'glc2'...
usermod: no changes
making '/gnu/store/ddcfyn63vnkx78fw7jii92ndrvh1bf6w-system' the current system...
Installation finished. No error reported.
root <at> g1 ~# exit
exit

Process shell finished





Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Thu, 04 Feb 2016 13:18:02 GMT) Full text and rfc822 format available.

Message #8 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: myglc2 <myglc2 <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Thu, 04 Feb 2016 16:17:36 +0300
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).

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

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?

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Thu, 04 Feb 2016 15:17:01 GMT) Full text and rfc822 format available.

Message #11 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: Alex Kost <alezost <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Thu, 04 Feb 2016 10:16:46 -0500
Alex Kost <alezost <at> 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 <at> g1 ~$ echo $EMACSLOADPATH
:/etc/emacs

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

glc4 <at> g1 ~$ EMACSLOADPATH=/etc/emacs/site-start.el
glc4 <at> 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 <at> g1 ~$ EMACSLOADPATH=:/etc/emacs/site-start.el
glc4 <at> 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?




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Thu, 04 Feb 2016 20:01:02 GMT) Full text and rfc822 format available.

Message #14 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: myglc2 <myglc2 <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Thu, 04 Feb 2016 23:00:36 +0300
myglc2 (2016-02-04 18:16 +0300) wrote:

[...]
> glc4 <at> g1 ~$ echo $EMACSLOADPATH
> :/etc/emacs
>
> If I set it to match what you say ...
>
> glc4 <at> g1 ~$ EMACSLOADPATH=/etc/emacs/site-start.el
> glc4 <at> g1 ~$ emacs

No, no, it is expected; I meant ":/etc/emacs" is the default value,
sorry for the confusion.

[...]
> Note: below, I have EMACSLOADPATH=:/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=/etc/emacs: emacs

you'll get "M-x guix-…" 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-…" commands are not autoloaded.

Both are easy to fix, thanks again for reporting!

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Thu, 04 Feb 2016 23:40:02 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Thu, 04 Feb 2016 18:40:06 -0500
Alex Kost <alezost <at> gmail.com> writes:

> myglc2 (2016-02-04 18:16 +0300) wrote:
>
>> 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 :-)

Not to worry... bugs must be made in the course of progress.

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

>
> 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-…" commands are not autoloaded.
>
> Both are easy to fix, thanks again for reporting!

My pleasure.

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

It seems that doing ... 'M-x guix-edit foo.scm' ... amounts to hacking
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.

TIA - George





Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Fri, 05 Feb 2016 08:44:01 GMT) Full text and rfc822 format available.

Message #20 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: myglc2 <myglc2 <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
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




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Fri, 05 Feb 2016 14:53:02 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Fri, 05 Feb 2016 09:52:14 -0500
Alex Kost <alezost <at> gmail.com> writes:

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

Thank you Alex. This really helps me. FWIW, Here are a couple thoughts:

It was confusing to me that 'guix-edit' shows "Note: file is write
protected". This behavior made me wonder what was wrong with my setup
and/or my understanding.

This might be improved by:

1) expanding one of the messages: "Note: file is write protected", or
   'command-execute: Buffer is read-only: #<buffer screen.scm>' to say,
   if you want to modify guix see "8.1 Building from Git".

- or -

a) rename the current 'guix-edit' function to guix-inspect',
   'guix-examine', or'guix-view'.

b) make a new/improved 'guix-edit' that prompts for guix-directory if it
   is not already not set, perhaps also refering the user to "8.1
   Building from Git".

c) possibly allow "warping" from "guix-inspect" to "guix-edit".





Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Fri, 05 Feb 2016 21:55:02 GMT) Full text and rfc822 format available.

Message #26 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: myglc2 <myglc2 <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Sat, 06 Feb 2016 00:54:42 +0300
myglc2 (2016-02-05 17:52 +0300) wrote:

> Alex Kost <alezost <at> gmail.com> writes:
[...]
>> 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.
>
> Thank you Alex. This really helps me. FWIW, Here are a couple thoughts:
>
> It was confusing to me that 'guix-edit' shows "Note: file is write
> protected". This behavior made me wonder what was wrong with my setup
> and/or my understanding.

Nothing is wrong.  What you describe is a common Emacs thing when you
open a read-only file.  Emacs displays this message because you open a
file from /gnu/store (which is read-only).  If you run:

  touch /tmp/foo ; chmod 444 /tmp/foo

and then open this /tmp/foo file in Emacs, you'll get the same message.

> This might be improved by:
>
> 1) expanding one of the messages: "Note: file is write protected", or
>    'command-execute: Buffer is read-only: #<buffer screen.scm>' to say,
>    if you want to modify guix see "8.1 Building from Git".

These messages come from Emacs itself, not from any guix code, so I
don't see how to change it (and I actually wouldn't like to do it, as I
think changing a default Emacs behaviour would be more confusing)

> - or -
>
> a) rename the current 'guix-edit' function to guix-inspect',
>    'guix-examine', or'guix-view'.

"M-x guix-edit" Emacs command was named so after "guix edit" shell
command.  I think having "M-x guix-view" which will do the same as "guix
edit" in shell and "M-x guix-edit" which will do something else will be
confusing.

> b) make a new/improved 'guix-edit' that prompts for guix-directory if it
>    is not already not set, perhaps also refering the user to "8.1
>    Building from Git".

As I see it, 'M-x guix-edit' should do the same as 'guix edit' in shell,
i.e. it should open a package file without additional prompting.  OTOH I
think it would be good to improve 'guix-edit' so that with C-u it will
prompt for a directory with guix packages.

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Sat, 06 Feb 2016 12:40:02 GMT) Full text and rfc822 format available.

Message #29 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Alex Kost <alezost <at> gmail.com>
Cc: myglc2 <myglc2 <at> gmail.com>, 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Sat, 06 Feb 2016 13:38:49 +0100
Alex Kost <alezost <at> gmail.com> skribis:

> myglc2 (2016-02-05 17:52 +0300) wrote:

[...]

>> b) make a new/improved 'guix-edit' that prompts for guix-directory if it
>>    is not already not set, perhaps also refering the user to "8.1
>>    Building from Git".
>
> As I see it, 'M-x guix-edit' should do the same as 'guix edit' in shell,
> i.e. it should open a package file without additional prompting.  OTOH I
> think it would be good to improve 'guix-edit' so that with C-u it will
> prompt for a directory with guix packages.

Yes, that would be nice.  However, AIUI, it would require spawning a new
Guix REPL for this specific ‘guix-directory’ value, no?

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Sun, 07 Feb 2016 08:15:01 GMT) Full text and rfc822 format available.

Message #32 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: myglc2 <myglc2 <at> gmail.com>, 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Sun, 07 Feb 2016 11:14:01 +0300
[Message part 1 (text/plain, inline)]
Ludovic Courtès (2016-02-06 15:38 +0300) wrote:

> Alex Kost <alezost <at> gmail.com> skribis:
>
>> myglc2 (2016-02-05 17:52 +0300) wrote:
>
> [...]
>
>>> b) make a new/improved 'guix-edit' that prompts for guix-directory if it
>>>    is not already not set, perhaps also refering the user to "8.1
>>>    Building from Git".
>>
>> As I see it, 'M-x guix-edit' should do the same as 'guix edit' in shell,
>> i.e. it should open a package file without additional prompting.  OTOH I
>> think it would be good to improve 'guix-edit' so that with C-u it will
>> prompt for a directory with guix packages.
>
> Yes, that would be nice.  However, AIUI, it would require spawning a new
> Guix REPL for this specific ‘guix-directory’ value, no?

No, not at all.  The attached patch implements this.

[0001-emacs-C-u-M-x-guix-edit-prompts-for-directory.patch (text/x-patch, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Sun, 07 Feb 2016 08:57:01 GMT) Full text and rfc822 format available.

Message #35 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: myglc2 <myglc2 <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Sun, 07 Feb 2016 11:56:00 +0300
Alex Kost (2016-02-04 23:00 +0300) wrote:

[...]
> So to recap, you found 2 issues:
>
> 1. Emacs packages installed in a system profile are not automatically
>    added to 'load-path'.

Fixed in commit 004ea62¹.  However, it will take effect when the new
source of "guix-emacs.el" will be used.  It will happen only after we'll
update our guix-devel snapshot (last time it was in commit 2c77615).

> 2. With the current EMACSLOADPATH, a wrong "site-lisp.el" is loaded, so
>    "M-x guix-…" commands are not autoloaded.

This one is fixed in commit b3fee14² (it will take effect when
EMACSLOADPATH will be changed, i.e. after "guix pull", "guix system
reconfigure" and rebooting).

¹ http://git.savannah.gnu.org/cgit/guix.git/commit/?id=004ea62955a92f69efeaa90debde4e626acb6143
² http://git.savannah.gnu.org/cgit/guix.git/commit/?id=b3fee145df2a2cb310ced2e7f34e0a2b6083e661

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Mon, 08 Feb 2016 02:53:01 GMT) Full text and rfc822 format available.

Message #38 received at submit <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Sun, 07 Feb 2016 21:52:58 -0500
Alex Kost <alezost <at> gmail.com> writes:

> Alex Kost (2016-02-04 23:00 +0300) wrote:
>
> [...]
>> So to recap, you found 2 issues:
>>
>> 1. Emacs packages installed in a system profile are not automatically
>>    added to 'load-path'.
>
> Fixed in commit 004ea62¹.  However, it will take effect when the new
> source of "guix-emacs.el" will be used.  It will happen only after we'll
> update our guix-devel snapshot (last time it was in commit 2c77615).
>

Thanks. Given that I am using git pull, is it feasible to for me test
this change now?

>> 2. With the current EMACSLOADPATH, a wrong "site-lisp.el" is loaded, so
>>    "M-x guix-…" commands are not autoloaded.
>
> This one is fixed in commit b3fee14² (it will take effect when
> EMACSLOADPATH will be changed, i.e. after "guix pull", "guix system
> reconfigure" and rebooting).

Thanks, I can confirm this works for me.





Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Mon, 08 Feb 2016 09:20:01 GMT) Full text and rfc822 format available.

Message #41 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: myglc2 <myglc2 <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Mon, 08 Feb 2016 12:19:51 +0300
myglc2 (2016-02-08 05:52 +0300) wrote:

>> Alex Kost (2016-02-04 23:00 +0300) wrote:
>>
>> [...]
>>> So to recap, you found 2 issues:
>>>
>>> 1. Emacs packages installed in a system profile are not automatically
>>>    added to 'load-path'.
>>
>> Fixed in commit 004ea62¹.  However, it will take effect when the new
>> source of "guix-emacs.el" will be used.  It will happen only after we'll
>> update our guix-devel snapshot (last time it was in commit 2c77615).
>
> Thanks. Given that I am using git pull, is it feasible to for me test
> this change now?

Yes, at first you need to "unset EMACSLOADPATH" to prevent Emacs from
loading "/run/current-system/profile/share/emacs/site-lisp/guix-emacs.el"
(it is required by "guix-init" which is in turn required by
"/etc/emacs/site-start.el").  Then you need to configure Emacs interface
from git checkout as described in the manual (info "(guix) Emacs Initial
Setup"), like this:

(let ((dir "~/src/guix/emacs"))
  (add-to-list 'load-path dir)
  (setq guix-load-path dir)
  (require 'guix-init nil t))


A side note: 'guix-init' is a wrapper which is used to perform 2 tasks:

1. To load autoloads for guix commands, so that you can run any "M-x guix-…"
   command without requiring all these "guix-….el" modules.

2. To find and autoload Emacs packages installed with Guix in a user
   profile (and now [thanks to you] in a system profile as well).

Not so long ago¹ our Emacs package was "patched" to take care of the
second task, so technically there is no need in "guix-init" anymore.  It
will be removed soon (or maybe stayed for some time for backward
compatibility), and instead 'guix-autoloads' should be required to
configure various Emacs modes for Guix.

↑ (It was a draft of announce about the future change) ↑

¹ http://git.savannah.gnu.org/cgit/guix.git/commit/?id=13fe4891fa247d306e203ee14c6886513bd86b52

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Mon, 08 Feb 2016 09:23:01 GMT) Full text and rfc822 format available.

Message #44 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Alex Kost <alezost <at> gmail.com>
Cc: myglc2 <myglc2 <at> gmail.com>, 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Mon, 08 Feb 2016 10:22:38 +0100
Alex Kost <alezost <at> gmail.com> skribis:

> Ludovic Courtès (2016-02-06 15:38 +0300) wrote:
>
>> Alex Kost <alezost <at> gmail.com> skribis:
>>
>>> myglc2 (2016-02-05 17:52 +0300) wrote:
>>
>> [...]
>>
>>>> b) make a new/improved 'guix-edit' that prompts for guix-directory if it
>>>>    is not already not set, perhaps also refering the user to "8.1
>>>>    Building from Git".
>>>
>>> As I see it, 'M-x guix-edit' should do the same as 'guix edit' in shell,
>>> i.e. it should open a package file without additional prompting.  OTOH I
>>> think it would be good to improve 'guix-edit' so that with C-u it will
>>> prompt for a directory with guix packages.
>>
>> Yes, that would be nice.  However, AIUI, it would require spawning a new
>> Guix REPL for this specific ‘guix-directory’ value, no?
>
> No, not at all.  The attached patch implements this.

Oh right, for guix-edit that can work.

> From 292c5f137f6cc3cf72e71e2dd5fa40f38fc7d7bb Mon Sep 17 00:00:00 2001
> From: Alex Kost <alezost <at> gmail.com>
> Date: Sun, 7 Feb 2016 11:08:57 +0300
> Subject: [PATCH] emacs: 'C-u M-x guix-edit' prompts for directory.
>
> * emacs/guix-base.el (guix-find-location, guix-edit): Add optional
>   'directory' argument.

LGTM!

Perhaps the manual should also mention C-u M-x guix-edit?

Thank you!

Ludo’.




Reply sent to Alex Kost <alezost <at> gmail.com>:
You have taken responsibility. (Mon, 08 Feb 2016 09:56:01 GMT) Full text and rfc822 format available.

Notification sent to myglc2 <myglc2 <at> gmail.com>:
bug acknowledged by developer. (Mon, 08 Feb 2016 09:56:02 GMT) Full text and rfc822 format available.

Message #49 received at 22550-done <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: 22550-done <at> debbugs.gnu.org
Subject: Fixed
Date: Mon, 08 Feb 2016 12:55:41 +0300
The original problem is solved (though the conversation continues)

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Wed, 10 Feb 2016 07:47:01 GMT) Full text and rfc822 format available.

Message #52 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: myglc2 <myglc2 <at> gmail.com>, 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Wed, 10 Feb 2016 10:46:12 +0300
Ludovic Courtès (2016-02-08 12:22 +0300) wrote:

>> From 292c5f137f6cc3cf72e71e2dd5fa40f38fc7d7bb Mon Sep 17 00:00:00 2001
>> From: Alex Kost <alezost <at> gmail.com>
>> Date: Sun, 7 Feb 2016 11:08:57 +0300
>> Subject: [PATCH] emacs: 'C-u M-x guix-edit' prompts for directory.
>>
>> * emacs/guix-base.el (guix-find-location, guix-edit): Add optional
>>   'directory' argument.
>
> LGTM!
>
> Perhaps the manual should also mention C-u M-x guix-edit?

I added a mention about C-u to the manual and committed it, thanks!

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Sun, 06 Mar 2016 14:46:02 GMT) Full text and rfc822 format available.

Message #55 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: Alex Kost <alezost <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Sun, 06 Mar 2016 09:47:58 -0500
[Message part 1 (text/plain, inline)]
Alex Kost <alezost <at> gmail.com> writes:
[...]
>> 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.

Hi Alex. Tried removing this and got 'command-execute: Symbol's function
definition is void: magit-status'  Shouldn't it be fixed by now?

TIA - george

glc <at> g1 ~/dev/guix$ git branch -av | head -n 1
* master                                  59a4dd5 doc: Explain how to check whether security updates are used.

glc <at> g1 ~/dev/guix$ env | grep EMACSLOADPATH
EMACSLOADPATH=/etc/emacs:

glc <at> g1 ~/dev/guix$ cat ~/.emacs.d/init.el | grep autoloads
;; (guix-emacs-load-autoloads "/run/current-system/profile")

glc <at> g1 ~/dev/guix$ guix package --list-installed
glc <at> g1 ~/dev/guix$

system config.q.scm (attached)

[config.q.scm (application/octet-stream, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Mon, 07 Mar 2016 09:15:02 GMT) Full text and rfc822 format available.

Message #58 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: myglc2 <myglc2 <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Mon, 07 Mar 2016 12:14:19 +0300
myglc2 (2016-03-06 17:47 +0300) wrote:

> Alex Kost <alezost <at> gmail.com> writes:
> [...]
>>> 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.
>
> Hi Alex. Tried removing this and got 'command-execute: Symbol's function
> definition is void: magit-status'  Shouldn't it be fixed by now?

No, I mean it is fixed in the current master, but as I wrote¹ it will
take effect only after we update our "guix" package.  Currently it is
"guix-devel" package at commit c3f29bc², which is older then commit
004ea62 (that fixed this issue).

After we update "guix" package (either via updating "guix-devel"
snapshot or via pointing "guix" to "guix-0.9.1" after the new release),
this will be finally fixed.

¹ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22550#38
² http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/package-management.scm#n198

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Mon, 07 Mar 2016 20:03:02 GMT) Full text and rfc822 format available.

Message #61 received at submit <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Mon, 07 Mar 2016 15:03:38 -0500
Alex Kost <alezost <at> gmail.com> writes:

[...]

> No, I mean it is fixed in the current master, but as I wrote¹ it will
> take effect only after we update our "guix" package.  Currently it is
> "guix-devel" package at commit c3f29bc², which is older then commit
> 004ea62 (that fixed this issue).
>
> After we update "guix" package (either via updating "guix-devel"
> snapshot or via pointing "guix" to "guix-0.9.1" after the new release),
> this will be finally fixed.
>
> ¹ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22550#38
> ² http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/package-management.scm#n198

Thank you. Sorry you had to explain this twice :(

I re-read your earlier posts. AIUI now, in order to use the latest guix
emacs features from 'git checkout master' one must add to emacs init:

(let ((dir "~/src/guix/emacs"))
  (add-to-list 'load-path dir)
  (setq guix-load-path dir)
  (require 'guix-init nil t))

Do you think we should we add that to (info "(guix) Building from Git") ? 





Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Tue, 08 Mar 2016 09:26:01 GMT) Full text and rfc822 format available.

Message #64 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: myglc2 <myglc2 <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Tue, 08 Mar 2016 12:25:50 +0300
myglc2 (2016-03-07 23:03 +0300) wrote:

> Alex Kost <alezost <at> gmail.com> writes:
>
> [...]
>
>> No, I mean it is fixed in the current master, but as I wrote¹ it will
>> take effect only after we update our "guix" package.  Currently it is
>> "guix-devel" package at commit c3f29bc², which is older then commit
>> 004ea62 (that fixed this issue).
>>
>> After we update "guix" package (either via updating "guix-devel"
>> snapshot or via pointing "guix" to "guix-0.9.1" after the new release),
>> this will be finally fixed.
>>
>> ¹ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22550#38
>> ²
>> http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/package-management.scm#n198
>
> Thank you. Sorry you had to explain this twice :(
>
> I re-read your earlier posts. AIUI now, in order to use the latest guix
> emacs features from 'git checkout master' one must add to emacs init:
>
> (let ((dir "~/src/guix/emacs"))
>   (add-to-list 'load-path dir)
>   (setq guix-load-path dir)
>   (require 'guix-init nil t))

Yes, this is the recommended way of setting it up.  It is described in
(info "(guix) Emacs Initial Setup").

> Do you think we should we add that to (info "(guix) Building from Git") ? 

Since it is already described in the other section, it shouldn't be
duplicated, but we can add a cross reference, not into "Building from
Git" though, maybe to (info "(guix) The Perfect Setup")

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Tue, 08 Mar 2016 13:48:02 GMT) Full text and rfc822 format available.

Message #67 received at submit <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Tue, 08 Mar 2016 08:49:10 -0500
Alex Kost <alezost <at> gmail.com> writes:

> myglc2 (2016-03-07 23:03 +0300) wrote:
>
>> Alex Kost <alezost <at> gmail.com> writes:
>>
>> [...]
>>
>>> No, I mean it is fixed in the current master, but as I wrote¹ it will
>>> take effect only after we update our "guix" package.  Currently it is
>>> "guix-devel" package at commit c3f29bc², which is older then commit
>>> 004ea62 (that fixed this issue).
>>>
>>> After we update "guix" package (either via updating "guix-devel"
>>> snapshot or via pointing "guix" to "guix-0.9.1" after the new release),
>>> this will be finally fixed.
>>>
>>> ¹ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22550#38
>>> ²
>>> http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/package-management.scm#n198
>>
>> Thank you. Sorry you had to explain this twice :(
>>
>> I re-read your earlier posts. AIUI now, in order to use the latest guix
>> emacs features from 'git checkout master' one must add to emacs init:
>>
>> (let ((dir "~/src/guix/emacs"))
>>   (add-to-list 'load-path dir)
>>   (setq guix-load-path dir)
>>   (require 'guix-init nil t))
>
> Yes, this is the recommended way of setting it up.  It is described in
> (info "(guix) Emacs Initial Setup").
>
>> Do you think we should we add that to (info "(guix) Building from Git") ? 
>
> Since it is already described in the other section, it shouldn't be
> duplicated, but we can add a cross reference, not into "Building from
> Git" though, maybe to (info "(guix) The Perfect Setup")

Then you need to also fix the intro paragraph which says (emphasis
added):

"On the Guix System Distribution (*note GNU Distribution::), “guix.el”
is ready to use [...] So [...] you can happily SKIP THIS SECTION [...]"

Since I am using GuixSD I have always skipped this section.  That is why
you have had to explain this twice to me.





Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Wed, 09 Mar 2016 10:59:01 GMT) Full text and rfc822 format available.

Message #70 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: myglc2 <myglc2 <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Wed, 09 Mar 2016 13:58:21 +0300
myglc2 (2016-03-08 16:49 +0300) wrote:

> Alex Kost <alezost <at> gmail.com> writes:
>
>> myglc2 (2016-03-07 23:03 +0300) wrote:
>>
[...]
>>> I re-read your earlier posts. AIUI now, in order to use the latest guix
>>> emacs features from 'git checkout master' one must add to emacs init:
>>>
>>> (let ((dir "~/src/guix/emacs"))
>>>   (add-to-list 'load-path dir)
>>>   (setq guix-load-path dir)
>>>   (require 'guix-init nil t))
>>
>> Yes, this is the recommended way of setting it up.  It is described in
>> (info "(guix) Emacs Initial Setup").
>>
>>> Do you think we should we add that to (info "(guix) Building from Git") ? 
>>
>> Since it is already described in the other section, it shouldn't be
>> duplicated, but we can add a cross reference, not into "Building from
>> Git" though, maybe to (info "(guix) The Perfect Setup")
>
> Then you need to also fix the intro paragraph which says (emphasis
> added):

I don't agree, this intro paragraph is (should be in theory) correct.

> "On the Guix System Distribution (*note GNU Distribution::), “guix.el”
> is ready to use [...] So [...] you can happily SKIP THIS SECTION [...]"
>
> Since I am using GuixSD I have always skipped this section.  That is why
> you have had to explain this twice to me.

It's just that no one tried to use system profile for adding emacs
packages before you, but this case will be handled in the next release,
so I think this part of the manual shouldn't be changed.

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Wed, 09 Mar 2016 14:46:02 GMT) Full text and rfc822 format available.

Message #73 received at submit <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Wed, 09 Mar 2016 09:47:11 -0500
Alex Kost <alezost <at> gmail.com> writes:

> myglc2 (2016-03-08 16:49 +0300) wrote:
>
>> Alex Kost <alezost <at> gmail.com> writes:
>>
>>> myglc2 (2016-03-07 23:03 +0300) wrote:
>>>
> [...]
>>>> I re-read your earlier posts. AIUI now, in order to use the latest guix
>>>> emacs features from 'git checkout master' one must add to emacs init:
>>>>
>>>> (let ((dir "~/src/guix/emacs"))
>>>>   (add-to-list 'load-path dir)
>>>>   (setq guix-load-path dir)
>>>>   (require 'guix-init nil t))
>>>
>>> Yes, this is the recommended way of setting it up.  It is described in
>>> (info "(guix) Emacs Initial Setup").
>>>
>>>> Do you think we should we add that to (info "(guix) Building from Git") ? 
>>>
>>> Since it is already described in the other section, it shouldn't be
>>> duplicated, but we can add a cross reference, not into "Building from
>>> Git" though, maybe to (info "(guix) The Perfect Setup")
>>
>> Then you need to also fix the intro paragraph which says (emphasis
>> added):
>
> I don't agree, this intro paragraph is (should be in theory) correct.
>
>> "On the Guix System Distribution (*note GNU Distribution::), “guix.el”
>> is ready to use [...] So [...] you can happily SKIP THIS SECTION [...]"
>>
>> Since I am using GuixSD I have always skipped this section.  That is why
>> you have had to explain this twice to me.
>
> It's just that no one tried to use system profile for adding emacs
> packages before you, but this case will be handled in the next release,
> so I think this part of the manual shouldn't be changed.

You are are assuming that I am running emacs in the system
profile. Meanwhile "tricky george" stopped trying to swim upstream and
installed emacs in the user profile :O. Based on running both ways I
still believe this needs attention.  But I am badly off the topic of the
original bug so I will put it in a new post.

I do apologize for the run-around. Many thanks! - George





Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Thu, 24 Mar 2016 16:21:02 GMT) Full text and rfc822 format available.

Message #76 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: myglc2 <myglc2 <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Thu, 24 Mar 2016 19:20:48 +0300
Alex Kost (2016-03-07 12:14 +0300) wrote:

> myglc2 (2016-03-06 17:47 +0300) wrote:
>
>> Alex Kost <alezost <at> gmail.com> writes:
>> [...]
>>>> 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.
>>
>> Hi Alex. Tried removing this and got 'command-execute: Symbol's function
>> definition is void: magit-status'  Shouldn't it be fixed by now?
>
> No, I mean it is fixed in the current master, but as I wrote¹ it will
> take effect only after we update our "guix" package.  Currently it is
> "guix-devel" package at commit c3f29bc², which is older then commit
> 004ea62 (that fixed this issue).
>
> After we update "guix" package (either via updating "guix-devel"
> snapshot or via pointing "guix" to "guix-0.9.1" after the new release),
> this will be finally fixed.
>
> ¹ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22550#38
> ² http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/package-management.scm#n198

This issue should be completely fixed now (after commit 092dd65¹).
(Just to remind) the original issue is a request for auto-finding emacs
packages installed globally (in a system profile).

So, if you update your Emacs, it should automatically find emacs
packages (magit, etc.) installed both in user and system profiles.

To update Emacs, one need to:

1. If emacs is installed in a user profile:

  $ guix pull
  $ guix package --upgrade=emacs

2. If emacs is installed in a system profile:

  # guix pull
  # guix system reconfigure

¹ http://git.savannah.gnu.org/cgit/guix.git/commit/?id=092dd6541fc75ed19ebbb1f9d8e6f32a88cb3445

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Fri, 25 Mar 2016 15:21:01 GMT) Full text and rfc822 format available.

Message #79 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: Alex Kost <alezost <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Fri, 25 Mar 2016 11:20:39 -0400
Alex Kost <alezost <at> gmail.com> writes:

> Alex Kost (2016-03-07 12:14 +0300) wrote:
>
>> myglc2 (2016-03-06 17:47 +0300) wrote:
>>
[...]
>>
>> No, I mean it is fixed in the current master, but as I wrote¹ it will
>> take effect only after we update our "guix" package.  Currently it is
>> "guix-devel" package at commit c3f29bc², which is older then commit
>> 004ea62 (that fixed this issue).
>>
>> After we update "guix" package (either via updating "guix-devel"
>> snapshot or via pointing "guix" to "guix-0.9.1" after the new release),
>> this will be finally fixed.
>>
>> ¹ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22550#38
>> ² http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/package-management.scm#n198
>
> This issue should be completely fixed now (after commit 092dd65¹).
> (Just to remind) the original issue is a request for auto-finding emacs
> packages installed globally (in a system profile).
>
> So, if you update your Emacs, it should automatically find emacs
> packages (magit, etc.) installed both in user and system profiles.
>
> To update Emacs, one need to:
>
> 1. If emacs is installed in a user profile:
>
>   $ guix pull
>   $ guix package --upgrade=emacs
>
> 2. If emacs is installed in a system profile:
>
>   # guix pull
>   # guix system reconfigure
>
> ¹ http://git.savannah.gnu.org/cgit/guix.git/commit/?id=092dd6541fc75ed19ebbb1f9d8e6f32a88cb3445

Hi Alex, Thank you for the followup.

I can't test on GuixSD right now, but '2.' looks good here.

If you have a moment, Is there a way to set up my git checkout guix
environment to use changes like this as they are made in the development
version?

My current 'Guix checkout' config (on a Guix/Debian install) looks like
this ...

  /home/g1/.config/guix:
  lrwxrwxrwx 1 g1 g1   14 Mar 24 13:49 latest -> ../../src/guix

... in ~/.profile I have ...

# guix
export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
GUIX_PROFILE="$HOME/.guix-profile"
source "$HOME/.guix-profile/etc/profile"

... and in ~/.emacs.d/init.el I have ...

;; start: guix emacs setup

;; to run emacs interface from git checkout and have guix-edit operate
;; on git checkout files
(let ((dir "/home/g1/src/guix/emacs"))
  (add-to-list 'load-path dir)
  (setq guix-load-path dir))
(require 'guix-init nil t)

 ;; to read the guix manual from git checkout
(with-eval-after-load 'info
  (info-initialize)
  (add-to-list 'Info-directory-list
	       "/home/g1/src/guix/doc"))

;; from #guix for guix compatible diffs
(setq ediff-patch-options "-b -f")

;; end: guix emacs setup

Many thanks, - George









Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Sat, 26 Mar 2016 00:09:01 GMT) Full text and rfc822 format available.

Message #82 received at 22550 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: myglc2 <myglc2 <at> gmail.com>
Cc: 22550 <at> debbugs.gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Sat, 26 Mar 2016 03:08:14 +0300
myglc2 (2016-03-25 18:20 +0300) wrote:

> Alex Kost <alezost <at> gmail.com> writes:
[...]
>> This issue should be completely fixed now (after commit 092dd65¹).
>> (Just to remind) the original issue is a request for auto-finding emacs
>> packages installed globally (in a system profile).
>>
>> So, if you update your Emacs, it should automatically find emacs
>> packages (magit, etc.) installed both in user and system profiles.
>>
>> To update Emacs, one need to:
>>
>> 1. If emacs is installed in a user profile:
>>
>>   $ guix pull
>>   $ guix package --upgrade=emacs
>>
>> 2. If emacs is installed in a system profile:
>>
>>   # guix pull
>>   # guix system reconfigure
>>
>> ¹ http://git.savannah.gnu.org/cgit/guix.git/commit/?id=092dd6541fc75ed19ebbb1f9d8e6f32a88cb3445
>
> Hi Alex, Thank you for the followup.
>
> I can't test on GuixSD right now, but '2.' looks good here.
>
> If you have a moment, Is there a way to set up my git checkout guix
> environment to use changes like this as they are made in the development
> version?
>
> My current 'Guix checkout' config (on a Guix/Debian install) looks like
> this ...
>
>   /home/g1/.config/guix:
>   lrwxrwxrwx 1 g1 g1   14 Mar 24 13:49 latest -> ../../src/guix
>
> ... in ~/.profile I have ...
>
> # guix
> export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
> GUIX_PROFILE="$HOME/.guix-profile"
> source "$HOME/.guix-profile/etc/profile"
>
> ... and in ~/.emacs.d/init.el I have ...
>
> ;; start: guix emacs setup
>
> ;; to run emacs interface from git checkout and have guix-edit operate
> ;; on git checkout files
> (let ((dir "/home/g1/src/guix/emacs"))
>   (add-to-list 'load-path dir)
>   (setq guix-load-path dir))
> (require 'guix-init nil t)

Use (require 'guix-autoloads nil t) instead.  Nowadays, the only thing
'guix-init' does is it requires 'guix-autoloads'.

>  ;; to read the guix manual from git checkout
> (with-eval-after-load 'info
>   (info-initialize)
>   (add-to-list 'Info-directory-list
> 	       "/home/g1/src/guix/doc"))
>
> ;; from #guix for guix compatible diffs
> (setq ediff-patch-options "-b -f")

I have no idea what it is used for (I don't have this setting in my
emacs config), but "-b" is probably should not be specified here.  If
you do:

1. M-: (require 'ediff-ptch)
2. C-h v ediff-patch-options

you'll see a note about "-b" option.

The rest looks good to me, I use pretty much the same configurations to
set up Guix (and emacs stuff) from git.

-- 
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#22550; Package guix. (Sat, 26 Mar 2016 02:52:01 GMT) Full text and rfc822 format available.

Message #85 received at submit <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Re: bug#22550: (require 'magit) produces error: "no such file or
 directory" "dash"
Date: Fri, 25 Mar 2016 22:51:20 -0400
Alex Kost <alezost <at> gmail.com> writes:

> myglc2 (2016-03-25 18:20 +0300) wrote:
>
[...]
>
> Use (require 'guix-autoloads nil t) instead.  Nowadays, the only thing
> 'guix-init' does is it requires 'guix-autoloads'.
>
[...]
>
> The rest looks good to me, I use pretty much the same configurations to
> set up Guix (and emacs stuff) from git.

Thank you Alex. I promise not to post any more on this bug ;)

Best, George





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 23 Apr 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.