guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] emacs: Support auto-updating after performing REPL operation


From: Ludovic Courtès
Subject: Re: [PATCH] emacs: Support auto-updating after performing REPL operation.
Date: Wed, 15 Oct 2014 21:32:31 +0200
User-agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux)

Alex Kost <address@hidden> skribis:

> Ludovic Courtès (2014-10-14 23:17 +0400) wrote:
>
>> Alex Kost <address@hidden> skribis:
>>
>>> Currently when a user performs some REPL operation using Emacs UI –
>>> 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 “information in the buffer”, what do you have in mind?  There’s
>> highlighting of installed packages, and marks.  Am I missing something?
>>
>> Pressing ‘g’ 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 ‘erase-buffer’);
> - 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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]