[Projects] Simple projectile integration

This commit is contained in:
Daniel - 2018-08-05 16:29:19 +02:00
parent 141ed2c4bc
commit 2c0b0db45e
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 6 additions and 3 deletions

View File

@ -2,7 +2,6 @@
;;; Commentary:
;; XXX: add projectile integration
;; XXX: check that newly created projects arent name the same as archived projects
;;; Code:
@ -49,7 +48,9 @@
(write-file (expand-file-name "projekttagebuch.org" project-directory))
(bookmark-set (format "Projekttagebuch %s" short-name)))
(write-region (format "%s" long-name) nil
(expand-file-name ".projectile" project-directory))))
(expand-file-name ".projectile" project-directory))
(when (require 'projectile nil 'no-error)
(projectile-add-known-project project-directory))))
(defun projects-archive-project (short-name)
"Archive existing project."
@ -62,7 +63,9 @@
(rename-file (expand-file-name short-name projects-main-project-directory)
(expand-file-name short-name projects-archive-directory)
nil)
(bookmark-delete (format "Projekttagebuch %s" short-name)))
(bookmark-delete (format "Projekttagebuch %s" short-name))
(when (require 'projectile nil 'no-error)
(projectile-cleanup-known-projects)))
(provide 'db-projects)