Alexander-Miller / treemacs

GNU General Public License v3.0
2.12k stars 155 forks source link

project-root not defined in 26 & 27 #977

Closed seagle0128 closed 2 years ago

seagle0128 commented 2 years ago

https://github.com/Alexander-Miller/treemacs/blob/3b11154957e5eaa555f13c926c08caebf3af89ae/src/elisp/treemacs-workspaces.el#L113

Symbol’s function definition is void: project-root

project-root is introduced in 28, and not available in 26 & 27.

My solution in doom-modeline is

(when-let ((project (project-current)))
  (if (fboundp 'project-root)
     (project-root project)
   (cdr project)))