Only add ~/doc/org if exists.
authorJames Richardson <james@jamestechnotes.com>
Sat, 8 Oct 2016 23:20:13 +0000 (19:20 -0400)
committerJames Richardson <james@jamestechnotes.com>
Sat, 8 Oct 2016 23:20:13 +0000 (19:20 -0400)
.emacs.d/config/org.el

index 333f885b2f2f866c1a9d917c7162ff5f82f04997..a4cc4c1706efd6c0380d288748ed08d501c147b6 100644 (file)
        (when (file-directory-p file)
          (jr/load-org-agenda-files-recursively file))))))
 
-(jr/load-org-agenda-files-recursively "~/doc/org/" ) ; trailing slash required
-(add-to-list 'org-agenda-files '"~/")
-(jr/load-org-agenda-files-recursively "~/.etc/")
+(when (file-directory-p "~/doc/org")
+  (jr/load-org-agenda-files-recursively "~/doc/org/" )) ; trailing slash required
+;;(add-to-list 'org-agenda-files '"~/")
+;;(jr/load-org-agenda-files-recursively "~/.etc/")
 ;;(jr/load-org-agenda-files-recursively "~/src/" ) ; trailing slash required
 ;;(jr/load-org-agenda-files-recursively "~/src01/" ) ; trailing slash required
-(setq org-directory "~/doc/org")
+(when (file-directory-p "~/doc/org")
+  (setq org-directory "~/doc/org"))
 
 ;; (if (file-exists-p "~/doc/org")
 ;;     (if (boundp 'org-agenda-files)