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.
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.
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 foundThis 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.