From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH 6/6] emacs: Add interface for system generations. Date: Wed, 13 Jan 2016 23:56:26 +0300 Message-ID: <87lh7t9p1h.fsf@gmail.com> References: <1452419630-4399-1-git-send-email-alezost@gmail.com> <1452419630-4399-7-git-send-email-alezost@gmail.com> <87si22a64b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJSSz-0006cm-P6 for guix-devel@gnu.org; Wed, 13 Jan 2016 15:56:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJSSw-00037y-J2 for guix-devel@gnu.org; Wed, 13 Jan 2016 15:56:29 -0500 In-Reply-To: <87si22a64b.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 12 Jan 2016 21:35:16 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s (2016-01-12 23:35 +0300) wrote: > Alex Kost 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=E2=80=99s 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. > Though maybe it would have to use > =E2=80=9Csudo:localhost:/run/current-system/profile=E2=80=9D (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, =E2=80=98delete-generations=E2=80=99 procedure f= rom (guix scripts package) module). But the REPL is started with the same privileges as emacs. --=20 Alex