all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] emacs: Support auto-updating after performing REPL operation.
Date: Wed, 15 Oct 2014 10:30:16 +0400	[thread overview]
Message-ID: <87zjcxalqf.fsf@gmail.com> (raw)
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")

Ludovic Courtès (2014-10-14 23:17 +0400) wrote:

> Alex Kost <alezost@gmail.com> 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.

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 :-))

-- 
Thanks,
Alex

  reply	other threads:[~2014-10-15  6:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-14 17:45 [PATCH] emacs: Support auto-updating after performing REPL operation Alex Kost
2014-10-14 19:17 ` Ludovic Courtès
2014-10-15  6:30   ` Alex Kost [this message]
2014-10-15 19:32     ` Ludovic Courtès
2014-10-15 19:34     ` Ludovic Courtès
2014-10-14 19:22 ` Ludovic Courtès
2014-10-15  6:30   ` Alex Kost
2014-10-15 19:33     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zjcxalqf.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.