senny / cabbage

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

Improved project API #184

Closed senny closed 11 years ago

senny commented 11 years ago

1.) bugfix if default-directory is "~/"

This resulted in an endless loop. We now expand the path to git rid of this edge-case.

2.) (cabbage-project-p) checks if a project is found

This is a simple function to check if cabbage can detect a project or not. It must be used as a guard to prevent calls into the project API when no root can be found.

3.) (cabbage-project-expand-path) builds relative project paths.

This function is similar to Emacs expand-path with the difference that it builds relative paths to the current (cabbage-project-root). Note that this function throws an error when no (cabbage-project-root) can be found.

senny commented 11 years ago

@jone could you review this one?

jone commented 11 years ago

yeah :+1: