branch: elpa/javelin
commit a3cd06c7bf60984305054dce68da100979a4ce2a
Author: Abin Simon <[email protected]>
Commit: Abin Simon <[email protected]>
Fix function to get project name for builtin project.el
The `project-current` function returns something like `(vc Git
"~/.config/emacs/elpaca/repos/harpoon/")` which if we just take `cdr`
does not return the project path. This errors out resulting in the
function returning nil. This fixes the issue by taking the last element.
---
harpoon.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/harpoon.el b/harpoon.el
index c0e159e741a..546fadba8a3 100644
--- a/harpoon.el
+++ b/harpoon.el
@@ -110,7 +110,7 @@
(defun harpoon--get-project-name-for-project ()
"Return projects name for project."
- (let* ((splitted-project-path (split-string (cdr (project-current)) "/"))
+ (let* ((splitted-project-path (split-string (car (last (project-current)))
"/"))
(splitted-length (length splitted-project-path))
(project-name (nth (- splitted-length 2) splitted-project-path)))
project-name))