guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/6] emacs: Add interface for system generations.


From: Ludovic Courtès
Subject: Re: [PATCH 6/6] emacs: Add interface for system generations.
Date: Wed, 13 Jan 2016 23:44:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Alex Kost <address@hidden> skribis:

> Ludovic Courtès (2016-01-12 23:35 +0300) wrote:
>
>> Alex Kost <address@hidden> skribis:
>>
>>> * emacs/guix-main.scm (system-generation-boot-parameters)
>>> (system-generation-param-alist, system-generation-sexps): New procedures.
>>> (entries): Add 'system-generation' entry type.
>>> * emacs/guix-messages.el (guix-result-message): Use the same messages
>>>   for 'generation' and 'system-generation' entry types.
>>> * emacs/guix-ui-system-generation.el: New file.
>>> * emacs.am (ELFILES): Add it.
>>> * doc/emacs.texi (Emacs Commands): Document new commands.
>>> * NEWS: Mention new interface.
>>
>> [...]
>>
>>> +Analogously on GuixSD you can also display system generations:
>>> +
>>> address@hidden @kbd
>>> address@hidden M-x guix-system-generations
>>> address@hidden M-x guix-last-system-generations
>>> address@hidden M-x guix-system-generations-by-time
>>> address@hidden table
>>
>> As simple as this.  :-)
>>
>> And I guess it’s also possible to select generations, delete them, and
>> switch to a specific one, as with M-x guix-generations?
>
> Well yes, but only if emacs was started with root privileges.  At first
> I was going to remove support for deleting/switching system generations
> because of this, but then I left it, as I thought there might exist
> users who run emacs from "root" for some reason, and such manipulating
> system generations may be useful for them.

Sounds reasonable.

>> Though maybe it would have to use
>> “sudo:localhost:/run/current-system/profile” (via Tramp) to be able to
>> modify things.  Maybe it could somehow offer to gain root privileges
>> when performing an action?
>
> I don't see how it can be done, since we use a guile REPL to perform
> such actions (for example, ‘delete-generations’ procedure from (guix
> scripts package) module).  But the REPL is started with the same
> privileges as emacs.

Oh right.  We could use elisp code to delete the symlink (that would
allow us to use Tramp), but it’s probably not worth bothering.

Thanks!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]