unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
@ 2016-02-04  4:15 myglc2
  2016-02-04 13:17 ` Alex Kost
  2016-02-08  9:55 ` bug#22550: Fixed Alex Kost
  0 siblings, 2 replies; 27+ messages in thread
From: myglc2 @ 2016-02-04  4:15 UTC (permalink / raw)
  To: 22550

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@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@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@g1 ~# exit
exit

Process shell finished

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  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
  2016-02-08  9:55 ` bug#22550: Fixed Alex Kost
  1 sibling, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-02-04 13:17 UTC (permalink / raw)
  To: myglc2; +Cc: 22550

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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-04 13:17 ` Alex Kost
@ 2016-02-04 15:16   ` myglc2
  2016-02-04 20:00     ` Alex Kost
  0 siblings, 1 reply; 27+ messages in thread
From: myglc2 @ 2016-02-04 15:16 UTC (permalink / raw)
  To: Alex Kost; +Cc: 22550

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?

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-04 15:16   ` myglc2
@ 2016-02-04 20:00     ` Alex Kost
  2016-02-04 23:40       ` myglc2
                         ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Alex Kost @ 2016-02-04 20:00 UTC (permalink / raw)
  To: myglc2; +Cc: 22550

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=/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=:/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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-04 20:00     ` Alex Kost
@ 2016-02-04 23:40       ` myglc2
  2016-02-05  8:43         ` Alex Kost
  2016-02-07  8:56       ` Alex Kost
  2016-03-06 14:47       ` myglc2
  2 siblings, 1 reply; 27+ messages in thread
From: myglc2 @ 2016-02-04 23:40 UTC (permalink / raw)
  To: 22550

Alex Kost <alezost@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-04 23:40       ` myglc2
@ 2016-02-05  8:43         ` Alex Kost
  2016-02-05 14:52           ` myglc2
  0 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-02-05  8:43 UTC (permalink / raw)
  To: myglc2; +Cc: 22550

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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-05  8:43         ` Alex Kost
@ 2016-02-05 14:52           ` myglc2
  2016-02-05 21:54             ` Alex Kost
  0 siblings, 1 reply; 27+ messages in thread
From: myglc2 @ 2016-02-05 14:52 UTC (permalink / raw)
  To: 22550

Alex Kost <alezost@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".

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-05 14:52           ` myglc2
@ 2016-02-05 21:54             ` Alex Kost
  2016-02-06 12:38               ` Ludovic Courtès
  0 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-02-05 21:54 UTC (permalink / raw)
  To: myglc2; +Cc: 22550

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

> Alex Kost <alezost@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-05 21:54             ` Alex Kost
@ 2016-02-06 12:38               ` Ludovic Courtès
  2016-02-07  8:14                 ` Alex Kost
  0 siblings, 1 reply; 27+ messages in thread
From: Ludovic Courtès @ 2016-02-06 12:38 UTC (permalink / raw)
  To: Alex Kost; +Cc: myglc2, 22550

Alex Kost <alezost@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’.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-06 12:38               ` Ludovic Courtès
@ 2016-02-07  8:14                 ` Alex Kost
  2016-02-08  9:22                   ` Ludovic Courtès
  0 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-02-07  8:14 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: myglc2, 22550

[-- Attachment #1: Type: text/plain, Size: 812 bytes --]

Ludovic Courtès (2016-02-06 15:38 +0300) wrote:

> Alex Kost <alezost@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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-emacs-C-u-M-x-guix-edit-prompts-for-directory.patch --]
[-- Type: text/x-patch, Size: 2248 bytes --]

From 292c5f137f6cc3cf72e71e2dd5fa40f38fc7d7bb Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@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.
---
 emacs/guix-base.el | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/emacs/guix-base.el b/emacs/guix-base.el
index 9f9f258..8282f2d 100644
--- a/emacs/guix-base.el
+++ b/emacs/guix-base.el
@@ -63,17 +63,17 @@ This directory is used to define location of the packages.")
 
 (add-hook 'guix-after-start-repl-hook 'guix-set-directory)
 
-(defun guix-find-location (location)
+(defun guix-find-location (location &optional directory)
   "Go to LOCATION of a package.
 LOCATION is a string of the form:
 
   \"PATH:LINE:COLUMN\"
 
 If PATH is relative, it is considered to be relative to
-`guix-directory'."
+DIRECTORY (`guix-directory' by default)."
   (cl-multiple-value-bind (path line col)
       (split-string location ":")
-    (let ((file (expand-file-name path guix-directory))
+    (let ((file (expand-file-name path (or directory guix-directory)))
           (line (string-to-number line))
           (col  (string-to-number col)))
       (find-file file)
@@ -113,12 +113,19 @@ See `guix-packages-profile'."
                     (guix-packages-profile profile generation system?)))
 
 ;;;###autoload
-(defun guix-edit (id-or-name)
-  "Edit (go to location of) package with ID-OR-NAME."
-  (interactive (list (guix-read-package-name)))
+(defun guix-edit (id-or-name &optional directory)
+  "Edit (go to location of) package with ID-OR-NAME.
+See `guix-find-location' for the meaning of package location and
+DIRECTORY.
+Interactively, with prefix argument, prompt for DIRECTORY."
+  (interactive
+   (list (guix-read-package-name)
+         (when current-prefix-arg
+           (read-directory-name "Directory with Guix modules: "
+                                guix-directory))))
   (let ((loc (guix-package-location id-or-name)))
     (if loc
-        (guix-find-location loc)
+        (guix-find-location loc directory)
       (message "Couldn't find package location."))))
 
 \f
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-04 20:00     ` Alex Kost
  2016-02-04 23:40       ` myglc2
@ 2016-02-07  8:56       ` Alex Kost
  2016-02-08  2:52         ` myglc2
  2016-03-06 14:47       ` myglc2
  2 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-02-07  8:56 UTC (permalink / raw)
  To: myglc2; +Cc: 22550

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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-07  8:56       ` Alex Kost
@ 2016-02-08  2:52         ` myglc2
  2016-02-08  9:19           ` Alex Kost
  0 siblings, 1 reply; 27+ messages in thread
From: myglc2 @ 2016-02-08  2:52 UTC (permalink / raw)
  To: 22550

Alex Kost <alezost@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.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-08  2:52         ` myglc2
@ 2016-02-08  9:19           ` Alex Kost
  0 siblings, 0 replies; 27+ messages in thread
From: Alex Kost @ 2016-02-08  9:19 UTC (permalink / raw)
  To: myglc2; +Cc: 22550

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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-07  8:14                 ` Alex Kost
@ 2016-02-08  9:22                   ` Ludovic Courtès
  2016-02-10  7:46                     ` Alex Kost
  0 siblings, 1 reply; 27+ messages in thread
From: Ludovic Courtès @ 2016-02-08  9:22 UTC (permalink / raw)
  To: Alex Kost; +Cc: myglc2, 22550

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2016-02-06 15:38 +0300) wrote:
>
>> Alex Kost <alezost@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@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’.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: Fixed
  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-08  9:55 ` Alex Kost
  1 sibling, 0 replies; 27+ messages in thread
From: Alex Kost @ 2016-02-08  9:55 UTC (permalink / raw)
  To: 22550-done

The original problem is solved (though the conversation continues)

-- 
Alex

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-08  9:22                   ` Ludovic Courtès
@ 2016-02-10  7:46                     ` Alex Kost
  0 siblings, 0 replies; 27+ messages in thread
From: Alex Kost @ 2016-02-10  7:46 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: myglc2, 22550

Ludovic Courtès (2016-02-08 12:22 +0300) wrote:

>> From 292c5f137f6cc3cf72e71e2dd5fa40f38fc7d7bb Mon Sep 17 00:00:00 2001
>> From: Alex Kost <alezost@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-02-04 20:00     ` Alex Kost
  2016-02-04 23:40       ` myglc2
  2016-02-07  8:56       ` Alex Kost
@ 2016-03-06 14:47       ` myglc2
  2016-03-07  9:14         ` Alex Kost
  2 siblings, 1 reply; 27+ messages in thread
From: myglc2 @ 2016-03-06 14:47 UTC (permalink / raw)
  To: Alex Kost; +Cc: 22550

[-- Attachment #1: Type: text/plain, Size: 999 bytes --]

Alex Kost <alezost@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@g1 ~/dev/guix$ git branch -av | head -n 1
* master                                  59a4dd5 doc: Explain how to check whether security updates are used.

glc@g1 ~/dev/guix$ env | grep EMACSLOADPATH
EMACSLOADPATH=/etc/emacs:

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

glc@g1 ~/dev/guix$ guix package --list-installed
glc@g1 ~/dev/guix$

system config.q.scm (attached)


[-- Attachment #2: config.q.scm --]
[-- Type: application/octet-stream, Size: 2125 bytes --]

;; see if tmux supports 256 colors
;; add curl for lpaste
;; add xauth for X11
;; switch to (use-package-modules ...)
(use-modules (gnu))
(use-service-modules networking ssh)
;; tidy up
(use-package-modules admin
		     disk ;; parted
		     ssh rsync wget screen
		     ssh tmux
		     version-control ;; git git-manpages
		     emacs ;; emacs magit
		     curl ;; lpaste
		     xorg ;; xauth
		     certs ;; for HTTPS TLS for git, wget, w3m
		     ) 


(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 tmux
	     emacs
	     git git-manpages magit
	     curl ;; lpaste
	     xauth ;; X11
	     nss-certs ;; for HTTPS TLS for git, wget, w3m)
	     %base-packages
	     )
	    )

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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-03-06 14:47       ` myglc2
@ 2016-03-07  9:14         ` Alex Kost
  2016-03-07 20:03           ` myglc2
  2016-03-24 16:20           ` Alex Kost
  0 siblings, 2 replies; 27+ messages in thread
From: Alex Kost @ 2016-03-07  9:14 UTC (permalink / raw)
  To: myglc2; +Cc: 22550

myglc2 (2016-03-06 17:47 +0300) wrote:

> Alex Kost <alezost@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-03-07  9:14         ` Alex Kost
@ 2016-03-07 20:03           ` myglc2
  2016-03-08  9:25             ` Alex Kost
  2016-03-24 16:20           ` Alex Kost
  1 sibling, 1 reply; 27+ messages in thread
From: myglc2 @ 2016-03-07 20:03 UTC (permalink / raw)
  To: 22550

Alex Kost <alezost@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") ? 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-03-07 20:03           ` myglc2
@ 2016-03-08  9:25             ` Alex Kost
  2016-03-08 13:49               ` myglc2
  0 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-03-08  9:25 UTC (permalink / raw)
  To: myglc2; +Cc: 22550

myglc2 (2016-03-07 23:03 +0300) wrote:

> Alex Kost <alezost@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-03-08  9:25             ` Alex Kost
@ 2016-03-08 13:49               ` myglc2
  2016-03-09 10:58                 ` Alex Kost
  0 siblings, 1 reply; 27+ messages in thread
From: myglc2 @ 2016-03-08 13:49 UTC (permalink / raw)
  To: 22550

Alex Kost <alezost@gmail.com> writes:

> myglc2 (2016-03-07 23:03 +0300) wrote:
>
>> Alex Kost <alezost@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.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-03-08 13:49               ` myglc2
@ 2016-03-09 10:58                 ` Alex Kost
  2016-03-09 14:47                   ` myglc2
  0 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-03-09 10:58 UTC (permalink / raw)
  To: myglc2; +Cc: 22550

myglc2 (2016-03-08 16:49 +0300) wrote:

> Alex Kost <alezost@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-03-09 10:58                 ` Alex Kost
@ 2016-03-09 14:47                   ` myglc2
  0 siblings, 0 replies; 27+ messages in thread
From: myglc2 @ 2016-03-09 14:47 UTC (permalink / raw)
  To: 22550

Alex Kost <alezost@gmail.com> writes:

> myglc2 (2016-03-08 16:49 +0300) wrote:
>
>> Alex Kost <alezost@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-03-07  9:14         ` Alex Kost
  2016-03-07 20:03           ` myglc2
@ 2016-03-24 16:20           ` Alex Kost
  2016-03-25 15:20             ` myglc2
  1 sibling, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-03-24 16:20 UTC (permalink / raw)
  To: myglc2; +Cc: 22550

Alex Kost (2016-03-07 12:14 +0300) wrote:

> myglc2 (2016-03-06 17:47 +0300) wrote:
>
>> Alex Kost <alezost@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-03-24 16:20           ` Alex Kost
@ 2016-03-25 15:20             ` myglc2
  2016-03-26  0:08               ` Alex Kost
  0 siblings, 1 reply; 27+ messages in thread
From: myglc2 @ 2016-03-25 15:20 UTC (permalink / raw)
  To: Alex Kost; +Cc: 22550

Alex Kost <alezost@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-03-25 15:20             ` myglc2
@ 2016-03-26  0:08               ` Alex Kost
  2016-03-26  2:51                 ` myglc2
  0 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-03-26  0:08 UTC (permalink / raw)
  To: myglc2; +Cc: 22550

myglc2 (2016-03-25 18:20 +0300) wrote:

> Alex Kost <alezost@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#22550: (require 'magit) produces error: "no such file or directory" "dash"
  2016-03-26  0:08               ` Alex Kost
@ 2016-03-26  2:51                 ` myglc2
  0 siblings, 0 replies; 27+ messages in thread
From: myglc2 @ 2016-03-26  2:51 UTC (permalink / raw)
  To: 22550

Alex Kost <alezost@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2016-03-26  2:52 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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