Closed sudish closed 12 years ago
As a quick clarification: eval-after-load
allows for safe handling of init order problems and #573 would make this even easier by referring to packages by el-get :name. The above is to simplify all of this to a simple declaration in el-get-sources.
The example I just ran into: I just discovered and started using package init files (el-get-user-package-directory
). My haskellmode-emacs setup code references filladapt-token-table
. :depends filladapt
doesn't work since that's install time. Wrapping the appropriate code in a (eval-after-load 'filladapt ...)
solves the load ordering problem.
The :depends filladapt
solution for init order is appealing because it's more declarative and also because it permits referring to the dependency by el-get package name rather than file name. el-get-eval-after-load
as mentioned in #573 would have the latter property as well.
There's no real need for either bit of func, though, given that eval-after-load is always available.
I'm surprised, because we already apply the dependency ordering to packages to initialize. Care to provide a test case?
Are you saying that your personal haskell mode customizations depend on filladapt, but adding :depends filladapt
to your haskell mode recipe fails to initialize filladapt first?
That was what I was saying, but I seem to have omitted a :features filladapt
from my el-get-sources
stanza. I just tested again with that and a :depends filladapt
in the haskellmode-emacs init and all is well.
Apologies for the false report. Closing this now.
el-get-sources' :depends is for installation-time dependencies, not init-time. There's no way to specify initialization order for el-get-sources right now, unless I'm overlooking something.
Do we want to have :depends influence init order as well? Init order may not need all the dependencies of install-time, but since it's guaranteed all packages in :depends are installed, there's no problem with using :depends to guide init order.
-Sudish