                                                           "projekttagebuch.org")
                                                   projects-main-project-directory)))
         (when (file-exists-p project-diary-path)
-          (puthash project-diary-path project projects))))
+          (puthash (file-truename project-diary-path) project projects))))
 
     ;; Delete all those diary links that have a bookmark
     (dolist (bmkn (bookmark-all-names))

  (unless (projects-project-exists-p short-name)
    (user-error "Project %s does not exist, exiting" short-name))

  ;; Remove bookmarks first
  (mapc #'bookmark-delete (projects--find-bookmarks-for-path
                           (expand-file-name short-name projects-main-project-directory)))

  ;; Move project directory into archive
  (unless (file-exists-p projects-archive-directory)
    (make-directory projects-archive-directory))
  (rename-file (expand-file-name short-name projects-main-project-directory)
               (expand-file-name short-name projects-archive-directory)
               nil)

  ;; Update projectile’s cache
  (projectile-remove-known-project
   (expand-file-name short-name
                     projects-main-project-directory)))

(defun projects--org-files ()
  "Return all Org Mode files in all known projects, recursively."
  (mapcan #'(lambda (dir)
              (directory-files-recursively (expand-file-name dir projects-main-project-directory)
                                           ".*\\.org" nil))

    (if-let ((git-executable (executable-find "git")))
        (call-process git-executable nil nil nil "init")
      (write-region "" nil (expand-file-name ".projectile")))
    (projectile-add-known-project project-directory)))

(defun projects--find-bookmarks-for-path (path)
  "Find all bookmark names that point into PATH."
