bug#22981: guix-edit does not find git checkout directory

2016-03-24 Thread myglc2
l...@gnu.org (Ludovic Courtès) writes:

> Alex Kost  skribis:
>
>> Ludovic Courtès (2016-03-14 01:01 +0300) wrote:
>>
>>> myglc2  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 . 
 "")
 (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





bug#22981: guix-edit does not find git checkout directory

2016-03-24 Thread Ludovic Courtès
Alex Kost  skribis:

> Ludovic Courtès (2016-03-14 01:01 +0300) wrote:
>
>> myglc2  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 . 
>>> "")
>>> (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’.





bug#22981: guix-edit does not find git checkout directory

2016-03-14 Thread Alex Kost
Ludovic Courtès (2016-03-14 01:01 +0300) wrote:

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

-- 
Alex





bug#22981: guix-edit does not find git checkout directory

2016-03-13 Thread Ludovic Courtès
myglc2  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 . 
> "")
> (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.

Ludo’.





bug#22981: guix-edit does not find git checkout directory

2016-03-13 Thread myglc2
Alex Kost  writes:

> 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 I
meant this way ...

"The output of a digital circuit or computer program at any time is
completely 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 . 
"")
(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"))

... in user.scm and do 'guix package -m user.scm' ;)






bug#22981: guix-edit does not find git checkout directory

2016-03-13 Thread Alex Kost
myglc2 (2016-03-13 05:00 +0300) wrote:

[...]
> 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 your
analogy. 

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

-- 
Alex





bug#22981: guix-edit does not find git checkout directory

2016-03-12 Thread Alex Kost
myglc2 (2016-03-11 17:45 +0300) wrote:

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

-- 
Alex





bug#22981: guix-edit does not find git checkout directory

2016-03-11 Thread myglc2
Alex Kost  writes:

> 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 6
weeks and learned an unpublished trick on #guix IRC channel.

> 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 glc5
is a simulated new user following the manual literally ;)

> 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 do
they find this information?

FWIW, I vote for method B.