From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] emacs: Support auto-updating after performing REPL operation. Date: Wed, 15 Oct 2014 10:30:16 +0400 Message-ID: <87zjcxalqf.fsf@gmail.com> References: <87wq825yuz.fsf@gmail.com> <87fveq4g1z.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]:50842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeI6X-0006dD-VL for guix-devel@gnu.org; Wed, 15 Oct 2014 02:30:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeI6O-0000j7-Lx for guix-devel@gnu.org; Wed, 15 Oct 2014 02:30:37 -0400 In-Reply-To: <87fveq4g1z.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 14 Oct 2014 21:17:12 +0200") 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 (2014-10-14 23:17 +0400) wrote: > Alex Kost skribis: > >> Currently when a user performs some REPL operation using Emacs UI =E2=80= =93 >> e.g. installs a package from *Guix Package Info* buffer, information in >> that buffer stays the same, and he needs to press "g" there to revert >> the buffer. > > By =E2=80=9Cinformation in the buffer=E2=80=9D, what do you have in mind?= There=E2=80=99s > highlighting of installed packages, and marks. Am I missing something? > > Pressing =E2=80=98g=E2=80=99 removes marks and updates highlighting. "Installed" column is also being changed. And in the list of installed packages, deleted packages disappear (I mean if you delete some packages and press "g" there). As for *Guix Package Info* buffer, there are many differences between installed and not-installed packages. I have in mind that all data will be updated. Here is what revert (pressing "g") does in a Guix buffer: - the existing data is erased (using =E2=80=98erase-buffer=E2=80=99); - information about packages/generations is received again; - it is inserted in the buffer. I used to update information manually (before this change) and I think that such auto-updating is natural and is exactly what a user expects. Don't you agree? >> The attached patches will add that missing feature: after finishing a >> REPL operation, a buffer from which this operation was performed will be >> automatically updated. > > What if the operation fails? For instance, you carefully select a bunch > of packages to install, and then the operation fails because of some > transient networking error, say. In such a case, the *Guix Package > Info* buffer should *not* be updated IMO, because that would mean losing > all the marks for no reason. Auto-updating happens only if a REPL operation was successful. When a debugger prompt is entered (for example when a user interrupts the process with "C-c C-c"), buffers are not updated, so the marks will not be lost. Thanks for asking, it led me to the idea that if a package operation was "dry-run", then auto-updating shouldn't be performed as no changes were made. I'll adjust the commit for this case (assuming that you agree with that :-)) --=20 Thanks, Alex