-
Notifications
You must be signed in to change notification settings - Fork 261
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
Calling use-package multiple times on the same package #662
Comments
The old (use-package 'foo
:defer t
:config (message "configuring foo"))
(use-package 'foo
:defer t
:config (message "configuring foo again"))
(require 'foo) would print both |
I'm currently in the process of migrating my configuration into an Within the bootstrap file I would like to define core features I'll need (things like a tiny I assume the chained |
Yes, I think so. |
@wagk FWIW, you can also use org-mode's noweb features to bring together multiple snippets into the corresponding section of the If you look at the raw org file, you'll see that many of the src blocks are labeled with the |
@zzamboni holy hell. now that's cool. Been using org for my config for a while now, hadn't seen that usage before. |
Glad you found it neat! My first attempt at literate programming was in fact using noweb many years ago, so I found it nice that org-mode supports it too. I think it's nice, although I wish there were better support to indicate the block name/noweb-ref when exporting. As it stands, I think the unnamed blocks can be confusing. There was a question about this recently in the org-mode mailing list, and I learned that you can customize |
Just to provide another use case; I like setting up built-in packages with use-package. When setting up gnus, I want to add another mail source on my work machine in a block somewhat like this: (cond ((string-equal (system-name) "work")
(progn
(add-to-list 'gnus-secondary-select-methods '(nnimap "Work"...))) With multiple use-package declarations I can do that without breaking the whole load timing chain :D |
I've run into an issue with multiple calls to If package I'm going to solve this by having only one |
It seems like all questions here were resolved, so I'm closing this issue now. Please report back if I missed something. |
After some testing, I'm currently running under the assumption that yes, you can call
use-package
multiple times on a single package.However, it would be nice to get some confirmation as well; Is it possible to call
use-package
multiple times on a single package? Are there any caveats that I should be looking out for when doing this?The text was updated successfully, but these errors were encountered: