Check that newly created projects have not been archived before

Daniel Borchmann 2020-09-20 14:23:52 +02:00
parent 644d463260
commit 4dead43c36
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 4 additions and 1 deletions

View File

@ -2,7 +2,7 @@
;;; Commentary:
;; XXX: check that newly created projects arent name the same as archived projects
;; XXX: update org-agenda-text-search-extra-files when creating and removing projects
;;; Code:
@ -52,6 +52,9 @@ with some standard information like title and creation date."
(interactive "sShort Name: \nsLong Name: ")
(when (projects-project-exists-p short-name)
(user-error "Project %s already exists, exiting" short-name))
(when (file-exists-p (expand-file-name short-name
(user-error "Project %s already exists as archived project, exiting" short-name))
(let* ((project-directory (expand-file-name short-name
(default-directory project-directory))