From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 6/6] emacs: Add interface for system generations. Date: Wed, 13 Jan 2016 23:44:22 +0100 Message-ID: <87twmhyu9l.fsf@gnu.org> References: <1452419630-4399-1-git-send-email-alezost@gmail.com> <1452419630-4399-7-git-send-email-alezost@gmail.com> <87si22a64b.fsf@gnu.org> <87lh7t9p1h.fsf@gmail.com> 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]:43653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJU9T-0002js-U6 for guix-devel@gnu.org; Wed, 13 Jan 2016 17:44:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJU9Q-0006c0-O5 for guix-devel@gnu.org; Wed, 13 Jan 2016 17:44:27 -0500 In-Reply-To: <87lh7t9p1h.fsf@gmail.com> (Alex Kost's message of "Wed, 13 Jan 2016 23:56:26 +0300") 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: Alex Kost Cc: guix-devel@gnu.org Alex Kost skribis: > 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 procedure= s. >>> (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 the= m, 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 >> =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= 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=E2=80=99s probably not worth bothering. Thanks! Ludo=E2=80=99.