Closed DarwinAwardWinner closed 12 years ago
Oh, cool; I didn't know about that hook. That's been tripping up a lot of people; thanks!
Make sure you test it. I haven't actually confirmed that the function works at init time.
The trick is that after-init-time
is nil during startup (M-x describe-variable after-init-time
), so that's how I tell if Emacs is already done initializing. If it's already done, I just eval the code immediately. So this should not break anything if for some reason esk is not loaded until after init.
It helps, but only after wrapping config autoloads to esk-eval-after-init this way:
--- starter-kit-autoloads.el 2011-11-25 00:41:24.000000000 +0400
+++ starter-kit-autoloads.el 2011-11-25 01:15:10.225880579 +0400
@@ -20,11 +20,13 @@
(global-set-key (kbd "M-x") 'smex)
-(when (file-exists-p esk-system-config) (load esk-system-config))
+(esk-eval-after-init
+ '(progn
+ (when (file-exists-p esk-system-config) (load esk-system-config))
-(when (file-exists-p esk-user-config) (load esk-user-config))
+ (when (file-exists-p esk-user-config) (load esk-user-config))
-(when (file-exists-p esk-user-dir) (mapc 'load (directory-files esk-user-dir nil "^[^#].*el$")))
+ (when (file-exists-p esk-user-dir) (mapc 'load (directory-files esk-user-dir nil "^[^#].*el$")))))
;;;***
I'm not sure how to provide appropriate fix for this issue, because autoloads are auto-generated. Also It is necessary to ensure that the esk-eval-after-init is exists at autoloads eval time. I've simply put It at the beginning of my ~/.emacs.d/init.el
Is is possible that the autoloads file was left over from an earlier version that didn't have my fix?
Yes. you have to regenerate autoloads after applying patch
Yes, I've patched already installed version.
25.11.2011, 08:48, "Ryan Thompson" reply@reply.github.com:
Is is possible that the autoloads file was left over from an earlier version that didn't have my fix?
Reply to this email directly or view it on GitHub: https://github.com/technomancy/emacs-starter-kit/pull/108#issuecomment-2871314
Best regards, Vladimir Protasov.
Yes, thanks. It worked for me.
25.11.2011, 14:08, "Maciej Mazur" reply@reply.github.com:
Yes. you have to regenerate autoloads after applying patch
Reply to this email directly or view it on GitHub: https://github.com/technomancy/emacs-starter-kit/pull/108#issuecomment-2873070
Best regards, Vladimir Protasov.
Thanks for merging this in, it should make things much easier. @technomancy, will this be released to marmalade soon?
Has anyone tested this? Does it work well? I don't use ESK myself; I just have an interest in it since it started depending on my ido-ubiquitous package.
To be honest it'll probably be a couple weeks before I get a chance to cut a release. I'll be sure to test it thoroughly before it's pushed out.
I've been using it and it has been working like a charm. :) I am on the latest version of the code and I haven't ran into any issues.
It works very well (no problem since 25.11.2011).
19.01.2012, 07:31, "Ryan Thompson" reply@reply.github.com:
Has anyone tested this? Does it work well? I don't use ESK myself; I just have an interest in it since it started depending on my ido-ubiquitous package.
Reply to this email directly or view it on GitHub: https://github.com/technomancy/emacs-starter-kit/pull/108#issuecomment-3557470
Best regards, Vladimir Protasov.
Glad to know it works.
If my code is correct, this pull request should result in the user and system config files being loaded after init, and hence after all other packages have been loaded.
This should fix #107, assuming that the code works.