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
Add feature "private bundles & private vendor dir" #153
Conversation
@@ -1,3 +1,5 @@ | |||
(require 'cl) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line necessary? I think we already require cl
at the top of cabbage.el
I think we need a function |
I keep cabbage-vendor-dir and cabbage-bundle-dir here, because some bundles Depends on your opinion, I will modify these code Thank you!
|
@weiqiyiji yes i think we should drop those variables and replace it with the function described above (at least for vendor-paths). In the case of bundle paths, please post the snippets of code you don't know how to replace. |
(defun cabbage-python-init-snippets () The above code snippet is taken from bundles/python/bundle.el. On Fri, Sep 14, 2012 at 2:27 PM, Yves Senn notifications@github.com wrote:
|
I think this functionality needs to be rewritten. In my opinion the snippet bundle should traverse all active bundles and check if a snippet directory is present. If you it should add that directory to the @jone what do you think? |
I agree. A general functionality for yas support in bundles would be aapreciated and would eliminate this code. |
Hi, senny, On Sat, Sep 15, 2012 at 2:23 AM, Jonas Baumann notifications@github.comwrote:
|
@weiqiyiji I see. I think I need to experiment with the code a little so that we can ship this feature. Could you update the pull request with your latest changes? (you can to this by just pushing on your branch, github automatically reflects the changes in the PR). Please post a comment when you put your latest source online, I'll then have a look at the issues at hand. |
@senny I haven't complete it yet. A little busy these days. I just wondering what's the return value of cabbage-vendor-library-path. I need to think more about this |
@weiqiyiji at the moment I'm not really sure. Thats why I would like you to push the latest code so that I can have a closer look at how things work out. This is a core functionality, which changes a lot of how the internals work and I can't see all the dependencies just thinking about it. It would be helpful to have the code to make some experiments and see what the best way is. I can't hint you in the right direction since at the moment I don't know which parts of cabbage need to change to support this feature in an ideal way. |
@senny I've push my code online. |
(defun cabbage-load-bundle-dependencies (dependencies) | ||
(let ((current-dir (file-name-directory load-file-name))) | ||
(dolist (dependency dependencies) | ||
(load (concat current-dir dependency))))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move this function into lib/bundles/framework.el
@senny please try this commit on your emacs, I just added check for both buffer-file-name and load-file-name, and I'm not sure this one works in your config |
Hi, @senny have you tried the newest commit? |
@weiqiyiji sorry, I did not get to it. I see that the branch also conflicts with the current master. Could you do a rebase? @jone do you have a few minutes to give this a spin? |
hmm, something is wrong, I think.
Somehow my initialization hooks are not executed. I'm gonna look later into it when I have more time. |
@senny @jone I think the problem is caused by (file-name-directory (or buffer-file-name load-file-name)) works fine. So I'm confusing about how to deal this situation, and I can't figure out why this happen. Should I test both |
@weiqiyiji I think we need a different strategy here. Using the bundle files relative path does not seem like a good option to tackle this problem. @jone any ideas? |
works for me. I think we should use the absolute cabbage paths as much as possible, although it does not work with in all situations (such as bundle snippets). |
@jone if it doesn't work in all situations, I think it will be less useful. The problem now is how to use the absolute paths as much as possible, I don't find a good solution for this, any advice? |
It is now automatically enabled since there is a snippets directory.
Use internal function cabbage--bundle-path for loading bundle dependencies, since using the default-directory does not work here. We also need to know in which bundle the lisp file is.
@weiqiyiji I didn't really get the problem before, I think. So I played around a little. I've done some changes and pushed it to senny/private-bundle. You may pull from this branch or cherry-pick for getting it in this pull request, if you want..
Thank you for your work, it looks nice 👍 Cheers |
Plone bundle: fix crashing when findings file in a plone package with `M-t`.
@weiqiyiji could you rebase before we review it? Currently Github tells me that the PR can't be merged. |
It is now automatically enabled since there is a snippets directory.
Use internal function cabbage--bundle-path for loading bundle dependencies, since using the default-directory does not work here. We also need to know in which bundle the lisp file is.
…ivate-bundle Conflicts: bundles/plone/bundle.el
@senny it's ok now, sorry for the conflicts... |
Works well for me :) @senny go ahead with merging if you want. |
Add feature "private bundles & private vendor dir"
HUGE PR and a big big thanks to @weiqiyiji for keep up the work. Thanks man! Hope to see you around the cabbage project. |
Hi, senny:
Please take a look at the code, I'm looking forward to your suggestion!