guix-edit does not find git checkout directory

DoneSubmitted by myglc2.
Details
3 participants
  • Alex Kost
  • Ludovic Courtès
  • myglc2
Owner
unassigned
Severity
normal
M
M
myglc2 wrote on 10 Mar 2016 22:56
(address . bug-guix@gnu.org)
871t7iov3n.fsf@gmail.com
Situation: GuixSD sysetm managaed by user glc using a git checkout in/home/glc/sre/guix.
Problem: When I follow the manual to set up a vanila user (glc5) with aseparate git checkout in /home/glc5/src/guix, guix-edit does not findthe checkout source.
Note: I followed comments from the #guix irc channel to set links in glcand root that point to the glc checkout:
glc@g1 ~/src/guix [env]$ stat ~/.config/guix/latest File: ‘/home/glc/.config/guix/latest’ -> ‘../../src/guix’
glc@g1 ~/src/guix [env]$ stat /root/.config/guix/latest File: ‘/root/.config/guix/latest’ -> ‘/home/glc/src/guix’

CREATE USER glc5================
glc@g1 ~/src/guix$ guix environment guixglc@g1 ~/src/guix [env]$ ./bootstrapglc@g1 ~/src/guix [env]$ ./configure --localstatedir=/var && make
glc@g1 ~/src/guix [env]$ git branch -v* master ff22f01 gnu: dropbear: Update to 2016.72 [fixes CVE-2016-3116].
glc@g1 ~/src/guix [env]$ which guix/run/current-system/profile/bin/guix
glc@g1 ~/src/guix [env]$ stat /run/current-system/profile/bin/guix File: ‘/run/current-system/profile/bin/guix’ -> ‘/gnu/store/3lg5c1nidbj0kjdz5b63hn3vp29kzf0s-guix-0.9.0.c3f29bc/bin/guix’
glc@g1 ~/src/guix [env]$ sudo guix system reconfigure ../configs/c05system.scm
USER glc5 test==============
glc5@g1 ~/src$ which guix/run/current-system/profile/bin/guix
glc5@g1 ~/src$ stat /run/current-system/profile/bin/guix File: ‘/run/current-system/profile/bin/guix’ -> ‘/gnu/store/3lg5c1nidbj0kjdz5b63hn3vp29kzf0s-guix-0.9.0.c3f29bc/bin/guix’
glc5@g1 ~/src$ stat ~/.config/guix/lateststat: cannot stat ‘/home/glc5/.config/guix/latest’: No such file or directory
## set up glc5's environmentglc5@g1 ~/src$ guix package -m glc5.scm
## customize emacs following "8.3 The Perfect Setup"
glc5@g1 ~/src$ cat ~/.emacs.d/init.el | head -n4;; from "8.3 The Perfect Setup";; Assuming the Guix checkout is in ~/src/guix.(with-eval-after-load 'geiser-guile (add-to-list 'geiser-guile-load-path "~/src/guix"))
## clone guixglc5@g1 ~/src$ git clone t://git.savannah.gnu.org/guix.git
### run emacsemacs
M-x guix-edit screen
Problem: This finds read-only screen.src in store rather than in ~/src/guix/...
Attachment: c05system.scm
Attachment: glc5.scm
A
A
Alex Kost wrote on 11 Mar 2016 12:03
(name . myglc2)(address . myglc2@gmail.com)(address . 22981@debbugs.gnu.org)
87io0tnunt.fsf@gmail.com
myglc2 (2016-03-11 00:56 +0300) wrote:
Toggle quote (18 lines)> Situation: GuixSD sysetm managaed by user glc using a git checkout in> /home/glc/sre/guix.>> Problem: When I follow the manual to set up a vanila user (glc5) with a> separate git checkout in /home/glc5/src/guix, guix-edit does not find> the checkout source.>> Note: I followed comments from the #guix irc channel to set links in glc> and root that point to the glc checkout:>> glc@g1 ~/src/guix [env]$ stat ~/.config/guix/latest> File: ‘/home/glc/.config/guix/latest’ -> ‘../../src/guix’>> glc@g1 ~/src/guix [env]$ stat /root/.config/guix/latest> File: ‘/root/.config/guix/latest’ -> ‘/home/glc/src/guix’>>> CREATE USER glc5
[...]
Toggle quote (3 lines)> glc5@g1 ~/src$ stat ~/.config/guix/latest> stat: cannot stat ‘/home/glc5/.config/guix/latest’: No such file or directory
I don't understand, so you made the links for user 'glc', but then youcheck another user 'glc5'. If you run emacs under glc, and try "M-xguix-edit" there, you should be pointed to "~/.config/guix/latest".Since you didn't make such a link for 'glc5', you are pointed to thestore.
Anyway, you can configure any directory for "M-x guix-edit" by setting'guix-directory' variable. See (info "(guix) Emacs Commands"). It isnot in the hmtl manual yet.
-- Alex
M
M
myglc2 wrote on 11 Mar 2016 15:45
(address . bug-guix@gnu.org)
874mcdf4z1.fsf@gmail.com
Alex Kost <alezost@gmail.com> writes:
Toggle quote (28 lines)> myglc2 (2016-03-11 00:56 +0300) wrote:>>> Situation: GuixSD sysetm managaed by user glc using a git checkout in>> /home/glc/sre/guix.>>>> Problem: When I follow the manual to set up a vanila user (glc5) with a>> separate git checkout in /home/glc5/src/guix, guix-edit does not find>> the checkout source.>>>> Note: I followed comments from the #guix irc channel to set links in glc>> and root that point to the glc checkout:>>>> glc@g1 ~/src/guix [env]$ stat ~/.config/guix/latest>> File: ‘/home/glc/.config/guix/latest’ -> ‘../../src/guix’>>>> glc@g1 ~/src/guix [env]$ stat /root/.config/guix/latest>> File: ‘/root/.config/guix/latest’ -> ‘/home/glc/src/guix’>>>>>> CREATE USER glc5> [...]>> glc5@g1 ~/src$ stat ~/.config/guix/latest>> stat: cannot stat ‘/home/glc5/.config/guix/latest’: No such file or directory>> I don't understand, so you made the links for user 'glc', but then you> check another user 'glc5'. If you run emacs under glc, and try "M-x> guix-edit" there, you should be pointed to "~/.config/guix/latest".
Yes, but it only it works for me (glc) because I studied guix for 6weeks and learned an unpublished trick on #guix IRC channel.
Toggle quote (3 lines)> Since you didn't make such a link for 'glc5', you are pointed to the> store.
Yes because I am trying to help you improve the user experience. So glc5is a simulated new user following the manual literally ;)
Toggle quote (4 lines)> Anyway, you can configure any directory for "M-x guix-edit" by setting> 'guix-directory' variable. See (info "(guix) Emacs Commands"). It is> not in the hmtl manual yet.
But what is the _recommended_ way to do this?
A) set 'guix-directory' variable in emacs init file?
B) make symbolic link to ~/src/guix from ~/.config/guix/latest?
C) something else?
And if a _new_ user starts reading in "8.1 Building from Git", how dothey find this information?
FWIW, I vote for method B.
A
A
Alex Kost wrote on 12 Mar 2016 10:15
(name . myglc2)(address . myglc2@gmail.com)(address . 22981@debbugs.gnu.org)
87egbg12gs.fsf@gmail.com
myglc2 (2016-03-11 17:45 +0300) wrote:
Toggle quote (1 lines)> Alex Kost <alezost@gmail.com> writes:
[...]
Toggle quote (6 lines)>> Anyway, you can configure any directory for "M-x guix-edit" by setting>> 'guix-directory' variable. See (info "(guix) Emacs Commands"). It is>> not in the hmtl manual yet.>> But what is the _recommended_ way to do this?
I would say the recommended way is A, as it only effects this particulartask (sets a default directory with guix packages for emacs), but thisis free software(!), you can use whatever you like and the way you want.
Toggle quote (2 lines)> A) set 'guix-directory' variable in emacs init file?
I set this var in my emacs config.
Toggle quote (2 lines)> B) make symbolic link to ~/src/guix from ~/.config/guix/latest?
Actually, I use this too, because this is one of the general solutionsto use guix from a git checkout.
Toggle quote (2 lines)> C) something else?
Christopher Allan Webber invented another interesting way of using guixemacs stuff with guix from git¹:
(setq guix-guile-program '(".../guix/pre-inst-env" "guile"))
Toggle quote (3 lines)> And if a _new_ user starts reading in "8.1 Building from Git", how do> they find this information?
Since you want to use "M-x guix-edit" command, you are supposed to readits docstring (C-h f guix-edit) or a part of the manual where it isdescribed. You can learn about 'guix-directory' variable from bothplaces.
¹ http://dustycloud.org/blog/guix-package-manager-without-make-install
-- Alex
M
M
myglc2 wrote on 13 Mar 2016 03:00
(address . bug-guix@gnu.org)
8737rv2l36.fsf@gmail.com
Alex Kost <alezost@gmail.com> writes:
Toggle quote (40 lines)> myglc2 (2016-03-11 17:45 +0300) wrote:>>> Alex Kost <alezost@gmail.com> writes:> [...]>>> Anyway, you can configure any directory for "M-x guix-edit" by setting>>> 'guix-directory' variable. See (info "(guix) Emacs Commands"). It is>>> not in the hmtl manual yet.>>>> But what is the _recommended_ way to do this?>> I would say the recommended way is A, as it only effects this particular> task (sets a default directory with guix packages for emacs), but this> is free software(!), you can use whatever you like and the way you want.>>> A) set 'guix-directory' variable in emacs init file?>> I set this var in my emacs config.>>> B) make symbolic link to ~/src/guix from ~/.config/guix/latest?>> Actually, I use this too, because this is one of the general solutions> to use guix from a git checkout.>>> C) something else?>> Christopher Allan Webber invented another interesting way of using guix> emacs stuff with guix from git¹:>> (setq guix-guile-program '(".../guix/pre-inst-env" "guile"))>>> And if a _new_ user starts reading in "8.1 Building from Git", how do>> they find this information?>> Since you want to use "M-x guix-edit" command, you are supposed to read> its docstring (C-h f guix-edit) or a part of the manual where it is> described. You can learn about 'guix-directory' variable from both> places.>> ¹ http://dustycloud.org/blog/guix-package-manager-without-make-install
Thank you for this great summary. This list + the post you referencedmake me feel better that I am taking so long to figure Guix out ;)
OTOH, guix as more state-full than I had hoped ;(
I suggest that you think of it this way: You are running an easter egghunt (I hope this is an OK analogy). You have awesome eggs (No kidding,I can attest that the Guix eggs are truly awesome). When the childrenfind the eggs they will be truly happy. But the eggs are hard tofind. If the children don't find the eggs they will not be happy! Worseyet, your eggs will be wasted! So ... make it easy for children to findyour eggs.
You probably already thought of this: Can guix be made easier to use byconverting some of the state-full guix configuration into guix recipeinputs?
A
A
Alex Kost wrote on 13 Mar 2016 10:38
(name . myglc2)(address . myglc2@gmail.com)(address . 22981@debbugs.gnu.org)
87k2l6yaxg.fsf@gmail.com
myglc2 (2016-03-13 05:00 +0300) wrote:
[...]
Toggle quote (13 lines)> Thank you for this great summary. This list + the post you referenced> make me feel better that I am taking so long to figure Guix out ;)>> OTOH, guix as more state-full than I had hoped ;(>> I suggest that you think of it this way: You are running an easter egg> hunt (I hope this is an OK analogy). You have awesome eggs (No kidding,> I can attest that the Guix eggs are truly awesome). When the children> find the eggs they will be truly happy. But the eggs are hard to> find. If the children don't find the eggs they will not be happy! Worse> yet, your eggs will be wasted! So ... make it easy for children to find> your eggs.
I don't know what an "easter egg hunt" is, but I think I get youranalogy.
Toggle quote (4 lines)> You probably already thought of this: Can guix be made easier to use by> converting some of the state-full guix configuration into guix recipe> inputs?
Sorry, my knowledge in English language is not enough to understand thisquestion. Could you explain what "state-full" means?
-- Alex
M
M
myglc2 wrote on 13 Mar 2016 16:42
(address . bug-guix@gnu.org)
87r3fetmen.fsf@gmail.com
Alex Kost <alezost@gmail.com> writes:
Toggle quote (10 lines)> myglc2 (2016-03-13 05:00 +0300) wrote:>> [...]>> You probably already thought of this: Can guix be made easier to use by>> converting some of the state-full guix configuration into guix recipe>> inputs?>> Sorry, my knowledge in English language is not enough to understand this> question. Could you explain what "state-full" means?
NP. I may have caused a problem by miss-spelling "stateful", which Imeant this way ...
"The output of a digital circuit or computer program at any time iscompletely determined by its current inputs and its state."
Ref: https://en.wikipedia.org/wiki/State_(computer_science)

Guix is "stateful" because, to use a git checkout, I have to set "state"variables like ...
(setq guix-directory "/home/glc/src/guix")
(let ((dir "~/dev/guix/emacs")) (add-to-list 'load-path dir) (setq guix-load-path dir) (require 'guix-init nil t))
'(safe-local-variable-values (quote ((bug-reference-bug-regexp . "<https?://\\(debbugs\\|bugs\\)\\.gnu\\.org/\\([0-9]+\\)>"))))) (custom-set-faces
/home/glc/.config/guix/latest’ -> ‘../../src/guix' /root/.config/guix/latest’ -> ‘/home/glc/src/GUI’

Guix would be less stateful (AKA more "stateless") if instead I couldput something like ...
(guix (#:use-git #t) (#:git-directory:"~/src/guix"))
... in user.scm and do 'guix package -m user.scm' ;)
L
L
Ludovic Courtès wrote on 13 Mar 2016 23:01
(name . myglc2)(address . myglc2@gmail.com)(address . 22981@debbugs.gnu.org)
87lh5muje0.fsf@gnu.org
myglc2 <myglc2@gmail.com> skribis:
Toggle quote (26 lines)> Guix is "stateful" because, to use a git checkout, I have to set "state"> variables like ...>> (setq guix-directory "/home/glc/src/guix")>> (let ((dir "~/dev/guix/emacs"))> (add-to-list 'load-path dir)> (setq guix-load-path dir)> (require 'guix-init nil t))>> '(safe-local-variable-values> (quote> ((bug-reference-bug-regexp . "<https?://\\(debbugs\\|bugs\\)\\.gnu\\.org/\\([0-9]+\\)>")))))> (custom-set-faces>> /home/glc/.config/guix/latest’ -> ‘../../src/guix'> /root/.config/guix/latest’ -> ‘/home/glc/src/GUI’>>> Guix would be less stateful (AKA more "stateless") if instead I could> put something like ...>> (guix> (#:use-git #t)> (#:git-directory:"~/src/guix"))
It seems to me that it’s not a question of “statefulness”, but rather aquestion of how much configuration is needed to have guix.el use theGuix that you want.
Ludo’.
A
A
Alex Kost wrote on 14 Mar 2016 09:02
(name . Ludovic Courtès)(address . ludo@gnu.org)
874mc9trkk.fsf@gmail.com
Ludovic Courtès (2016-03-14 01:01 +0300) wrote:
Toggle quote (32 lines)> myglc2 <myglc2@gmail.com> skribis:>>> Guix is "stateful" because, to use a git checkout, I have to set "state">> variables like ...>>>> (setq guix-directory "/home/glc/src/guix")>>>> (let ((dir "~/dev/guix/emacs"))>> (add-to-list 'load-path dir)>> (setq guix-load-path dir)>> (require 'guix-init nil t))>>>> '(safe-local-variable-values>> (quote>> ((bug-reference-bug-regexp . "<https?://\\(debbugs\\|bugs\\)\\.gnu\\.org/\\([0-9]+\\)>")))))>> (custom-set-faces>>>> /home/glc/.config/guix/latest’ -> ‘../../src/guix'>> /root/.config/guix/latest’ -> ‘/home/glc/src/GUI’>>>>>> Guix would be less stateful (AKA more "stateless") if instead I could>> put something like ...>>>> (guix>> (#:use-git #t)>> (#:git-directory:"~/src/guix"))>> It seems to me that it’s not a question of “statefulness”, but rather a> question of how much configuration is needed to have guix.el use the> Guix that you want.
I agree. If someone want to use a "non-installed" software, (s)he hasto do some additional configuration. I don't see how to reduce sucha configuration to set up emacs code from a guix git checkout.
-- Alex
L
L
Ludovic Courtès wrote on 24 Mar 2016 21:02
(name . Alex Kost)(address . alezost@gmail.com)
87a8lnzlst.fsf@gnu.org
Alex Kost <alezost@gmail.com> skribis:
Toggle quote (38 lines)> Ludovic Courtès (2016-03-14 01:01 +0300) wrote:>>> myglc2 <myglc2@gmail.com> skribis:>>>>> Guix is "stateful" because, to use a git checkout, I have to set "state">>> variables like ...>>>>>> (setq guix-directory "/home/glc/src/guix")>>>>>> (let ((dir "~/dev/guix/emacs"))>>> (add-to-list 'load-path dir)>>> (setq guix-load-path dir)>>> (require 'guix-init nil t))>>>>>> '(safe-local-variable-values>>> (quote>>> ((bug-reference-bug-regexp . "<https?://\\(debbugs\\|bugs\\)\\.gnu\\.org/\\([0-9]+\\)>")))))>>> (custom-set-faces>>>>>> /home/glc/.config/guix/latest’ -> ‘../../src/guix'>>> /root/.config/guix/latest’ -> ‘/home/glc/src/GUI’>>>>>>>>> Guix would be less stateful (AKA more "stateless") if instead I could>>> put something like ...>>>>>> (guix>>> (#:use-git #t)>>> (#:git-directory:"~/src/guix"))>>>> It seems to me that it’s not a question of “statefulness”, but rather a>> question of how much configuration is needed to have guix.el use the>> Guix that you want.>> I agree. If someone want to use a "non-installed" software, (s)he has> to do some additional configuration. I don't see how to reduce such> a configuration to set up emacs code from a guix git checkout.
Should this issue be closed?
Ludo’.
M
M
myglc2 wrote on 25 Mar 2016 02:18
(name . Ludovic Courtès)(address . ludo@gnu.org)
868u174aoq.fsf@gmail.com
ludo@gnu.org (Ludovic Courtès) writes:
Toggle quote (43 lines)> Alex Kost <alezost@gmail.com> skribis:>>> Ludovic Courtès (2016-03-14 01:01 +0300) wrote:>>>>> myglc2 <myglc2@gmail.com> skribis:>>>>>>> Guix is "stateful" because, to use a git checkout, I have to set "state">>>> variables like ...>>>>>>>> (setq guix-directory "/home/glc/src/guix")>>>>>>>> (let ((dir "~/dev/guix/emacs"))>>>> (add-to-list 'load-path dir)>>>> (setq guix-load-path dir)>>>> (require 'guix-init nil t))>>>>>>>> '(safe-local-variable-values>>>> (quote>>>> ((bug-reference-bug-regexp . "<https?://\\(debbugs\\|bugs\\)\\.gnu\\.org/\\([0-9]+\\)>")))))>>>> (custom-set-faces>>>>>>>> /home/glc/.config/guix/latest’ -> ‘../../src/guix'>>>> /root/.config/guix/latest’ -> ‘/home/glc/src/GUI’>>>>>>>>>>>> Guix would be less stateful (AKA more "stateless") if instead I could>>>> put something like ...>>>>>>>> (guix>>>> (#:use-git #t)>>>> (#:git-directory:"~/src/guix"))>>>>>> It seems to me that it’s not a question of “statefulness”, but rather a>>> question of how much configuration is needed to have guix.el use the>>> Guix that you want.>>>> I agree. If someone want to use a "non-installed" software, (s)he has>> to do some additional configuration. I don't see how to reduce such>> a configuration to set up emacs code from a guix git checkout.>> Should this issue be closed?>> Ludo’.
Sure! Thanks! - George
L
L
Ludovic Courtès wrote on 25 Mar 2016 09:26
control message for bug #22981
(address . control@debbugs.gnu.org)
874mbvufnj.fsf@gnu.org
tags 22981 notabugclose 22981
?
Your comment

This issue is archived.

To comment on this conversation send email to 22981@debbugs.gnu.org