Alex Kost <alez...@gmail.com> skribis: > Ludovic Courtès (2016-01-12 23:35 +0300) wrote: > >> Alex Kost <alez...@gmail.com> 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: >>> + >>> +@table @kbd >>> +@item M-x guix-system-generations >>> +@item M-x guix-last-system-generations >>> +@item M-x guix-system-generations-by-time >>> +@end 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’.