Re: [ANN] Emacs-Guix 0.4

2018-05-25 Thread Alex Kost
myg...@gmail.com (2018-05-24 21:02 -0400) wrote:

> Hi Alex,
>
> Thank you for this new release. I am enjoying the cool new features!
>
> On 05/24/2018 at 20:21 Alex Kost writes:
>
> [...]
>
>> I recalled that C-u prefix is already occupied by specifying an
>> arbitrary profile for the package commands.  So, I'm afraid instead of
>> "C-u M-x guix-dependent-packages" there will be "M-x
>> guix-direct-dependent-packages".
>>
>> Or maybe I should just break this dull "convention" (I mean "C-u" for
>> profiles) as probably no one uses it anyway :-)
>
> +1
>
> FWIW, ISTM this use of "C-u" is more global than typical and thus feels
> a bit counter-intuitive. Since you have made it very easy to jump
> between profiles in *Guix Profiles* I think it would be good to switch
> to using "C-u" for more command-specific modifications. This might also
> help avoid "function bloat in emacs-guix."

I agree.  Although I decided to make another solution for this case:
"M-x guix-dependent-packages" will ask you for the "dependent type" in
the minibuffer: "all" (default) or "direct".

-- 
Alex



Re: [ANN] Emacs-Guix 0.4

2018-05-24 Thread myglc2

Hi Alex,

Thank you for this new release. I am enjoying the cool new features!

On 05/24/2018 at 20:21 Alex Kost writes:

[...]

> I recalled that C-u prefix is already occupied by specifying an
> arbitrary profile for the package commands.  So, I'm afraid instead of
> "C-u M-x guix-dependent-packages" there will be "M-x
> guix-direct-dependent-packages".
>
> Or maybe I should just break this dull "convention" (I mean "C-u" for
> profiles) as probably no one uses it anyway :-)

+1

FWIW, ISTM this use of "C-u" is more global than typical and thus feels
a bit counter-intuitive. Since you have made it very easy to jump
between profiles in *Guix Profiles* I think it would be good to switch
to using "C-u" for more command-specific modifications. This might also
help avoid "function bloat in emacs-guix."

HTH - George



Re: [ANN] Emacs-Guix 0.4

2018-05-24 Thread Alex Kost
Ludovic Courtès (2018-05-24 14:16 +0200) wrote:

> Hello!
>
> Alex Kost  skribis:
>
>> Ludovic Courtès (2018-05-23 17:30 +0200) wrote:
>
> [...]
>
>>> I think ‘guix-dependent-packages’ is going to be very useful.  I wonder
>>> if we could have ‘C-u guix-dependent-packages’ list only packages that
>>> are direct dependents?  That would be helpful in some situations.
>>
>> I agree!  Is there a shell command for this?  I mean I'd like to know
>> what Guile code can do this :-)
>
> No, there’s no such command.  Perhaps something to add to ‘guix refresh
> -l’, say ‘guix refresh -l direct’?

It would be good!

>> Currently, the following code is used to get dependent packages:
>>
>> (with-store store
>>   (run-with-store store
>> (mlet %store-monad ((edges (node-back-edges %bag-node-type
>> (all-packages
>>   (return (node-transitive-edges packages edges)
>
> ‘node-transitive-edges’ traverses the whole DAG, so you should simply
> call ‘edges’ instead.
>
> HTH!

Yes, now it's clear, thanks!

I recalled that C-u prefix is already occupied by specifying an
arbitrary profile for the package commands.  So, I'm afraid instead of
"C-u M-x guix-dependent-packages" there will be "M-x
guix-direct-dependent-packages".

Or maybe I should just break this dull "convention" (I mean "C-u" for
profiles) as probably no one uses it anyway :-)

-- 
Alex



Re: [ANN] Emacs-Guix 0.4

2018-05-24 Thread Ludovic Courtès
Hello!

Alex Kost  skribis:

> Ludovic Courtès (2018-05-23 17:30 +0200) wrote:

[...]

>> I think ‘guix-dependent-packages’ is going to be very useful.  I wonder
>> if we could have ‘C-u guix-dependent-packages’ list only packages that
>> are direct dependents?  That would be helpful in some situations.
>
> I agree!  Is there a shell command for this?  I mean I'd like to know
> what Guile code can do this :-)

No, there’s no such command.  Perhaps something to add to ‘guix refresh
-l’, say ‘guix refresh -l direct’?

> Currently, the following code is used to get dependent packages:
>
> (with-store store
>   (run-with-store store
> (mlet %store-monad ((edges (node-back-edges %bag-node-type
> (all-packages
>   (return (node-transitive-edges packages edges)

‘node-transitive-edges’ traverses the whole DAG, so you should simply
call ‘edges’ instead.

HTH!

Ludo’.



Re: [ANN] Emacs-Guix 0.4

2018-05-23 Thread Alex Kost
Ludovic Courtès (2018-05-23 17:30 +0200) wrote:

> Hello!
>
> Maxim Cournoyer  skribis:
>
>> Alex Kost  writes:
>>
>>> Hello, Emacs-Guix (Emacs interface for GNU Guix) version 0.4 has been
>>> released.  If you are not familiar with it yet, you may start with:
>>> ‘guix package -i emacs-guix’ and "M-x guix-about".
>>
>> Just wanted to say thank you for this new feature packed release! I look
>> forward to trying it out :)
>
> +1  I just tried it out and these new features are awesome, as usual!
>
> ‘guix-all-services’ is very cool!  (It shows that we lack descriptions
> for roughly a third of the services; if you’re reading along, consider
> helping out.  :-))
>
> I think ‘guix-dependent-packages’ is going to be very useful.  I wonder
> if we could have ‘C-u guix-dependent-packages’ list only packages that
> are direct dependents?  That would be helpful in some situations.

I agree!  Is there a shell command for this?  I mean I'd like to know
what Guile code can do this :-)

Currently, the following code is used to get dependent packages:

(with-store store
  (run-with-store store
(mlet %store-monad ((edges (node-back-edges %bag-node-type
(all-packages
  (return (node-transitive-edges packages edges)

-- 
Alex



Re: [ANN] Emacs-Guix 0.4

2018-05-23 Thread Ludovic Courtès
Hello!

Maxim Cournoyer  skribis:

> Alex Kost  writes:
>
>> Hello, Emacs-Guix (Emacs interface for GNU Guix) version 0.4 has been
>> released.  If you are not familiar with it yet, you may start with:
>> ‘guix package -i emacs-guix’ and "M-x guix-about".
>
> Just wanted to say thank you for this new feature packed release! I look
> forward to trying it out :)

+1  I just tried it out and these new features are awesome, as usual!

‘guix-all-services’ is very cool!  (It shows that we lack descriptions
for roughly a third of the services; if you’re reading along, consider
helping out.  :-))

I think ‘guix-dependent-packages’ is going to be very useful.  I wonder
if we could have ‘C-u guix-dependent-packages’ list only packages that
are direct dependents?  That would be helpful in some situations.

Thank you!

Ludo’.



Re: [ANN] Emacs-Guix 0.4

2018-05-20 Thread Maxim Cournoyer
Hi Alex,

Alex Kost  writes:

> Hello, Emacs-Guix (Emacs interface for GNU Guix) version 0.4 has been
> released.  If you are not familiar with it yet, you may start with:
> ‘guix package -i emacs-guix’ and "M-x guix-about".

Just wanted to say thank you for this new feature packed release! I look
forward to trying it out :)

Maxim