 
     (when (file-exists-p archive-path)
       (user-error "Archived project named %s already exists, aborting" short-name))
-
-    ;; Remove bookmarks first
-    (mapc #'bookmark-delete (projects--find-bookmarks-for-path project-path))
 
     ;; Move project directory into archive
     (unless (file-exists-p projects-archive-directory)

                      (gethash (file-truename org-file) extra-files nil))
                  (projects--org-files))))

(defun projects-check-project-diary-bookmarks ()
  "Check that all known projects have a bookmark to their diary.
Return list of short names of projects whose project diaries do
not have a corresponding bookmark."
  ;; Make hash table of all diary paths to all known projects; as values we
  ;; keep the short names, because these are the ones we want to return in the
  ;; end
  (let ((projects (make-hash-table :test #'equal)))

    (dolist (project (projects-existing-projects))
      (let ((project-diary-path (expand-file-name (concat (file-name-as-directory project)
                                                          "projekttagebuch.org")
                                                  projects-main-project-directory)))
        (when (file-exists-p project-diary-path)
          (puthash (file-truename project-diary-path) project projects))))

    ;; Delete all those diary links that have a bookmark
    (dolist (bmkn (bookmark-all-names))
      (unless (file-remote-p (bookmark-get-filename bmkn))
        (remhash (file-truename (bookmark-get-filename bmkn)) projects)))

    ;; Return remaining short names; those are the ones that do not have a
    ;; bookmark yet
    (hash-table-values projects)))

;;;###autoload
(defun projects-lint-projects ()
  "Check all known projects for proper configuration.

        (insert "\n  " file))
      (insert "\n\n"))

    (display-buffer (current-buffer))))

(provide 'db-projects)
