unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Package refresh and install/delete marks
@ 2015-05-27  1:49 Artur Malabarba
  2015-05-27 16:02 ` Dmitry Gutov
  0 siblings, 1 reply; 5+ messages in thread
From: Artur Malabarba @ 2015-05-27  1:49 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 844 bytes --]

> Async refreshing has grown on me too, but it still needs to implement
retaining the marks set by the user.

For the record, this is now done.
It was implemented by having tabulated-list only update the buffer, instead
of printing it anew.
As a bonus, the printing step is now blazing fast. So the small hang we get
after archives are downloaded is now barely noticeable.

Of note:
- if the user marks a package (for install/delete) and that package is gone
after the refresh, then the mark is gone too.
- if the user hits U while a refresh is in progress, the package menu will
wait until the refresh is done before actually marking the upgrades. This
is to avoid the scenario where the refresh could erase the install marks
and keep the delete marks.
- Hitting g will still revert the entire buffer and wipe all marks (this is
intentional).

[-- Attachment #2: Type: text/html, Size: 918 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Package refresh and install/delete marks
  2015-05-27  1:49 Package refresh and install/delete marks Artur Malabarba
@ 2015-05-27 16:02 ` Dmitry Gutov
  2015-05-27 16:19   ` Artur Malabarba
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Gutov @ 2015-05-27 16:02 UTC (permalink / raw)
  To: bruce.connor.am; +Cc: emacs-devel

On 05/27/2015 04:49 AM, Artur Malabarba wrote:

> For the record, this is now done.
> It was implemented by having tabulated-list only update the buffer,
> instead of printing it anew.
> As a bonus, the printing step is now blazing fast. So the small hang we
> get after archives are downloaded is now barely noticeable.

Thank you, it's indeed pretty fast.

> - if the user hits U while a refresh is in progress, the package menu
> will wait until the refresh is done before actually marking the
> upgrades. This is to avoid the scenario where the refresh could erase
> the install marks and keep the delete marks.

That's not what I see here: U adds the marks if there's something to 
upgrade before the refresh, and when the latter completes, it removes them.

But speaking of this scenario, maybe this could be handled even better? 
Since you intend to defer adding marks to until after the refresh, why 
not defer calculation as well? In all likelihood, after the refresh is 
done, more packages will have upgrades.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Package refresh and install/delete marks
  2015-05-27 16:02 ` Dmitry Gutov
@ 2015-05-27 16:19   ` Artur Malabarba
  2015-05-27 20:42     ` Artur Malabarba
  0 siblings, 1 reply; 5+ messages in thread
From: Artur Malabarba @ 2015-05-27 16:19 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

> That's not what I see here: U adds the marks if there's something to upgrade
> before the refresh, and when the latter completes, it removes them.

Ooops. I may have forgotten to push the commit. :-) Will push when I get home.

> But speaking of this scenario, maybe this could be handled even better?
> Since you intend to defer adding marks to until after the refresh, why not
> defer calculation as well? In all likelihood, after the refresh is done,
> more packages will have upgrades.

Yes, calculations are deferred as well. Basically, the entire command
is deferred. (This will be obvious when I actually push the commit
:-).



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Package refresh and install/delete marks
  2015-05-27 16:19   ` Artur Malabarba
@ 2015-05-27 20:42     ` Artur Malabarba
  2015-05-27 21:39       ` Dmitry Gutov
  0 siblings, 1 reply; 5+ messages in thread
From: Artur Malabarba @ 2015-05-27 20:42 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

2015-05-27 17:19 GMT+01:00 Artur Malabarba <bruce.connor.am@gmail.com>:
>> That's not what I see here: U adds the marks if there's something to upgrade
>> before the refresh, and when the latter completes, it removes them.
>
> Ooops. I may have forgotten to push the commit. :-) Will push when I get home.

Pushed.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Package refresh and install/delete marks
  2015-05-27 20:42     ` Artur Malabarba
@ 2015-05-27 21:39       ` Dmitry Gutov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Gutov @ 2015-05-27 21:39 UTC (permalink / raw)
  To: bruce.connor.am; +Cc: emacs-devel

On 05/27/2015 11:42 PM, Artur Malabarba wrote:

> Pushed.

Thanks. Looking good!



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-05-27 21:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27  1:49 Package refresh and install/delete marks Artur Malabarba
2015-05-27 16:02 ` Dmitry Gutov
2015-05-27 16:19   ` Artur Malabarba
2015-05-27 20:42     ` Artur Malabarba
2015-05-27 21:39       ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).