senny / cabbage

get the maximum out of emacs
http://senny.github.com/cabbage/
156 stars 21 forks source link

support for local bundles in .emacs.d #150

Closed senny closed 11 years ago

senny commented 12 years ago

As pointed out in this google groups discussion it would be nice to allow cabbage users to create local bundles in ~/.emacs.d

I think the bundle framework should allow the following things:

senny commented 12 years ago

@weiqiyiji, @jone, @tonini: thoughts? additions?

tonini commented 12 years ago

I really like this idea about private bundles. At the moment I run a bundle like configuration with just files under ~/.emacs.d/private and the packages as submodules in the ~/.emacs.d/vendor directory.

I like the ~/.emacs.d/cabbage-bundles idea more, because having all emacs specified configuration under the ~/.emacs.d directory it's more the way I would take, instead having things outside of the default emacs setup directory. And have bundles just as single files would be in my favor to, it's like I handle my private setup files atm with cabbage.

+1 for it

jone commented 12 years ago

Sounds great. Maybe do the same thing for cabbage-vendor accordingly? Many bundles tepend on a vendor lib..

weiqiyiji commented 12 years ago

Several questions:

  1. If the local bundle has the same name with global bundle?
  2. Should local bundle and global bundle configured in the same cabbage-bundle file?
  3. Shoud we treat local and global bundle the same? That means for end users, they don't need to know where the actual bundle settles.

On Tue, Sep 11, 2012 at 5:06 AM, Jonas Baumann notifications@github.comwrote:

Sounds great. Maybe do the same thing for cabbage-vendor accordingly? Many bundles tepend on a vendor lib..

— Reply to this email directly or view it on GitHubhttps://github.com/senny/cabbage/issues/150#issuecomment-8438383.

senny commented 12 years ago

I think when cabbage loads a bundle we should load all bundles with that name. The load order is specified by the directory list. This way you could extend core bundles with your own functionality. If you don't want to extend a bundle you can simple "namespace" it like: "senny-git" for example.

I think we should configure all bundles in the same cabbage file. As I see it: ~/.cabbage should not be touched by the user and ~/.emacs.d is owned by the user. This way you can check your personal ~/.emacs.d into source-control and have a dotfiles like repository with your cabbage configuration.

I would treat local and global bundles the same. As described in the ticket header, at the moment I think a directory list would be sufficient to support local bundles.

@weiqiyiji what do you think? @jone opinion?

weiqiyiji commented 12 years ago

@senny I've already completed private bundle & vendor dir feature, partially. I defined a new variable "cabbage-vendor-dirs", but I found several bundles rely on "cabbage-bundle-dir", it points directly to $cabbage-repository/vendor, also the same problem with cabbage-bundle-dir. I don't know how to deal with these bundles. Now I just keep these bundles the way they were.

Any suggestions?

On Tue, Sep 11, 2012 at 9:01 PM, Yves Senn notifications@github.com wrote:

I think when cabbage loads a bundle we should load all bundles with that name. The load order is specified by the directory list. This way you could extend core bundles with your own functionality. If you don't want to extend a bundle you can simple "namespace" it like: "senny-git" for example.

I think we should configure all bundles in the same cabbage file. As I see it: ~/.cabbage should not be touched by the user and ~/.emacs.d is owned by the user. This way you can check your personal ~/.emacs.d into source-control and have a dotfiles like repository with your cabbage configuration.

I would treat local and global bundles the same. As described in the ticket header, at the moment I think a directory list would be sufficient to support local bundles.

@weiqiyiji https://github.com/weiqiyiji what do you think? @jone https://github.com/jone opinion?

— Reply to this email directly or view it on GitHubhttps://github.com/senny/cabbage/issues/150#issuecomment-8458665.

senny commented 12 years ago

@weiqiyiji can you open a PR with your current solution?

weiqiyiji commented 12 years ago

PR done! Please check it

On Thu, Sep 13, 2012 at 3:19 PM, Yves Senn notifications@github.com wrote:

@weiqiyiji https://github.com/weiqiyiji can you open a PR with your current solution?

— Reply to this email directly or view it on GitHubhttps://github.com/senny/cabbage/issues/150#issuecomment-8520121.

jone commented 11 years ago

Implemented in #153.