From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] emacs: Support auto-updating after performing REPL operation. Date: Wed, 15 Oct 2014 21:32:31 +0200 Message-ID: <871tq9yvqo.fsf@gnu.org> References: <87wq825yuz.fsf@gmail.com> <87fveq4g1z.fsf@gnu.org> <87zjcxalqf.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]:52188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeUJG-00022x-Ld for guix-devel@gnu.org; Wed, 15 Oct 2014 15:32:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeUJ7-0000Px-KV for guix-devel@gnu.org; Wed, 15 Oct 2014 15:32:34 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:60847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeUJ7-0000Pn-Ds for guix-devel@gnu.org; Wed, 15 Oct 2014 15:32:25 -0400 In-Reply-To: <87zjcxalqf.fsf@gmail.com> (Alex Kost's message of "Wed, 15 Oct 2014 10:30:16 +0400") 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 (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. OK. > 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? I do! (I even wondered if the Boolean to turn it off was necessary.) >> 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. Perfect. > 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 :-)) Yes, agreed. Ludo=E2=80=99.