   (interactive)
   (find-file (get-todays-journal-file-name)))
 
+;; This function is only needed because I can't figure
+;; out the right regex syntax to exclude unsaved file
+;; filenames (those starting with .#).  Will remove this
+;; once I figure that out.
+(defun get-agenda-files (directory)
+  (mapcar
+   (lambda (filename)
+	 (cond
+	  ((not (string-prefix-p ".#" filename))
+	   (expand-file-name filename directory))
+	  (t "")))
+   (directory-files directory nil ".org\\'")))
+
+;; Simple alternative: (file-expand-wildcards "~/Notes/*.org")
+
 (use-package org
   :ensure t
   :config

    (setq org-stuck-projects '("+LEVEL=2/TODO" ("NEXT") nil ""))
    (setq org-agenda-start-with-log-mode t)
    (setq org-agenda-files
	  `("~/Notes/Inbox.org" 
	    "~/Notes/Habits.org" 
	    "~/Notes/Personal.org" 
	    "~/Notes/Work.org" 
	    "~/Notes/Projects.org" 
	    "~/Notes/Workflow.org"
	    "~/Notes/Emacs.org"
	    ;; TODO: Select 3 months worth of journal files including next month
	    ,(get-todays-journal-file-name)))

    ;; Configure archive and refile
    (setq org-archive-location "~/Notes/Journal.org::datetree/* Completed Tasks")

	             (org-agenda-files '("~/Notes/Workflow.org"))))
	      (todo "ACTIVE"
		    ((org-agenda-overriding-header "Active Projects")
		     (org-agenda-files org-agenda-files)))
	      (todo "TODO"
		    ((org-agenda-overriding-header "Unprocessed Inbox Tasks")
		     (org-agenda-files '("~/Notes/Inbox.org"))
