[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] emacs: Add support for deleting generations.
From: |
Alex Kost |
Subject: |
Re: [PATCH] emacs: Add support for deleting generations. |
Date: |
Sun, 05 Oct 2014 22:23:19 +0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Ludovic Courtès (2014-10-05 17:14 +0400) wrote:
> Alex Kost <address@hidden> skribis:
>
>> Ludovic Courtès (2014-10-05 00:23 +0400) wrote:
>
> [...]
>
>>> To sum up, I would imagine two followups to this:
>>>
>>> 1. Move these procedures to (guix profiles).
>>> 2. Convert them to monadic style.
>>>
>>> WDYT?
>>
>> I like the idea of using monads there, but as I said I'm too week (I
>> mean "month" (I mean "weak")) for writing that.
>
> Heh. :-) No problem, that can come later.
>
>> Also those followups would make my commit totally redundant, no?
>> Wouldn't it be better to make a commit for adding the monadic functions
>> to (guix profiles) directly?
>
> I think it’s fine to make changes incrementally.
OK.
>> However if you still allow me to push this commit,
>
> Sure!
Done, thanks.
[...]
>> address@hidden x
>> +Execute actions on the marked generations (i.e.@: delete generations).
>
> I would make it:
>
> Execute actions on the marked generations---i.e., delete generations.
>
> Or possibly a comma before “i.e.”. Certainly a comma after it.
>
>> --- a/emacs/guix-main.scm
>> +++ b/emacs/guix-main.scm
>> @@ -815,3 +815,9 @@ OUTPUTS is a list of package outputs (may be an empty
>> list)."
>> "~a packages in profile~%"
>> count)
>> count)))))))))
>> +
>> +(define (delete-generations* profile generations)
>> + "Delete GENERATIONS from PROFILE.
>> +GENERATIONS is a list of generation numbers."
>> + (let ((store (open-connection)))
>> + (delete-generations store profile generations)))
>
> Rather:
>
> (with-store store
> (delete-generations store profile generations))
>
> That will take care of closing ‘store’ when the dynamic extent of the
> body is left.
Thanks for the comments, the updated patch is attached. I also fixed
another “i.e.” thing there and used ‘with-store’ in
‘process-package-actions’ procedure as well. Is it OK to make these
changes in this commit (the ‘with-store’ change is small but many lines
were changed because of the new indentation)?
0001-emacs-Add-support-for-deleting-generations.patch
Description: Text Data
[PATCH] guix package: Add '--switch-generation' option., Alex Kost, 2014/10/06
- Re: [PATCH] guix package: Add '--switch-generation' option., Ludovic Courtès, 2014/10/06
- Re: [PATCH] guix package: Add '--switch-generation' option., Alex Kost, 2014/10/07
- Re: [PATCH] guix package: Add '--switch-generation' option., Ludovic Courtès, 2014/10/07
- Re: [PATCH] guix package: Add '--switch-generation' option., Alex Kost, 2014/10/07
- Re: [PATCH] guix package: Add '--switch-generation' option., Ludovic Courtès, 2014/10/08
Re: [PATCH] guix package: Export generation procedures., Andreas Enge, 2014/10/05