Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defer load symbols when requested #351

Closed
magicdirac opened this issue Jun 9, 2016 · 4 comments
Closed

Defer load symbols when requested #351

magicdirac opened this issue Jun 9, 2016 · 4 comments
Labels

Comments

@magicdirac
Copy link

Currently we have :commands to defer load commands,
is it possible defer load symbols so that when I need them load the file.

The reason I come up with this is sometimes I want to change themes but I do not want load the theme file until I use load-theme to load them. However, load-theme itself mostly can not find the themes unless you initialize them. I was wondering can we define a autoload of symbols in use-package, so that load-theme knows where to load them.

@Trevoke
Copy link

Trevoke commented Oct 26, 2016

I am in a similar situation. Currently the best solution is to not use use-package for themes. It's not a huge deal but it's a little annoying.

@npostavs
Copy link
Contributor

Can't you do something like

(use-package the-theme 
  :init (add-to-list 'custom-theme-load-path "path/to/the-theme") 
  :defer t)

@jwiegley
Copy link
Owner

@magicdirac How would you write such deferral without use-package?

@jwiegley jwiegley changed the title Defer load symbols when reqeust Defer load symbols when requested Feb 16, 2017
@jwiegley
Copy link
Owner

I need more information to address this bug. Please reopen with an example of the form that doesn't work now, what you expected to do, and how you solved it without use-package. Perhaps special theme support is necessary, but I don't know yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants