jwiegley / use-package

A use-package declaration for simplifying your .emacs
https://jwiegley.github.io/use-package
GNU General Public License v3.0
4.37k stars 260 forks source link

Deferred package fetching #1040

Open dabrahams opened 1 year ago

dabrahams commented 1 year ago

When I arrive on a new machine and fire up emacs to, say, edit an Org file—or after I've made quite a few configuration updates—I don't want to have to wait for myriad packages to install.

What I'd like, for many packages, is to say :ensure, but do it async. https://github.com/conao3/feather.el could be useful for the async part, but with use-package, there seems to be no way to get the :config clause to be done as an eval-after-load.

skangas commented 11 months ago

I think this would be a useful feature. Patches welcome.

dabrahams commented 11 months ago

Now that I look, I wonder if this is the semantics provided by :defer 0?

skangas commented 11 months ago

Now that I look, I wonder if this is the semantics provided by :defer 0?

I don't think so, not unless I misunderstood your original feature request. On my machine, this is what (use-package foo :defer 0) expands to:

(progn
  (use-package-ensure-elpa 'foo '(t) 'nil)
  (run-with-idle-timer 0 nil (function require) 'foo nil t))

In other words, the package is still installed immediately.