Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Conversation

@DarwinAwardWinner
Copy link
Contributor

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.

@technomancy
Copy link
Owner

Oh, cool; I didn't know about that hook. That's been tripping up a lot of people; thanks!

technomancy added a commit that referenced this pull request Nov 15, 2011
Load system and user config files after init. Should help with #107.
@technomancy technomancy merged commit 5efa136 into technomancy:v2 Nov 15, 2011
@DarwinAwardWinner
Copy link
Contributor Author

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.

@eoranged
Copy link

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

@DarwinAwardWinner
Copy link
Contributor Author

Is is possible that the autoloads file was left over from an earlier version that didn't have my fix?

@mamciek
Copy link

mamciek commented Nov 25, 2011

Yes. you have to regenerate autoloads after applying patch

@eoranged
Copy link

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:
#108 (comment)

Best regards,
Vladimir Protasov.

@eoranged
Copy link

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:
#108 (comment)

Best regards,
Vladimir Protasov.

@bmabey
Copy link

bmabey commented Jan 17, 2012

Thanks for merging this in, it should make things much easier. @technomancy, will this be released to marmalade soon?

@DarwinAwardWinner
Copy link
Contributor Author

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.

@technomancy
Copy link
Owner

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.

@bmabey
Copy link

bmabey commented Jan 19, 2012

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.

@eoranged
Copy link

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:
#108 (comment)

Best regards,
Vladimir Protasov.

@DarwinAwardWinner
Copy link
Contributor Author

Glad to know it works.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants