Drop support for ORG_DIRECTORY in envrc

When Emacs starts it's called from xsessionrc.shared, which is called outside of
direnv's .envrc scope. Because of this variables defined therein, like
ORG_DIRECTORY, are undefined and prevent Emacs from initializing.

I'm hard-coding the `org-directory` variable for now and removing references to
`(getenv "ORG_DIRECTORY")`.
This commit is contained in:
William Carroll 2020-01-20 10:13:02 +00:00
parent 8a657fff7f
commit ddd5d3a7a0
3 changed files with 9 additions and 14 deletions

1
.envrc
View file

@ -1,2 +1 @@
export DOTFILES=~/dotfiles export DOTFILES=~/dotfiles
export ORG_DIRECTORY=~/Dropbox/org

View file

@ -47,7 +47,6 @@ Otherwise, open with `counsel-find-file'."
(defconst bookmark/whitelist (defconst bookmark/whitelist
(list (list
;; TODO: Consider using (getenv "ORG_DIRECTORY")
(make-bookmark :label "org" (make-bookmark :label "org"
:path "~/Dropbox/org" :path "~/Dropbox/org"
:kbd "o") :kbd "o")

View file

@ -10,33 +10,30 @@
;; Dependencies ;; Dependencies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'prelude)
(require 'f) (require 'f)
(require 'maybe)
(prelude/assert (and (maybe/some? (getenv "ORG_DIRECTORY"))
(f-exists? (getenv "ORG_DIRECTORY"))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Configuration ;; Configuration
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq org-directory "~/Dropbox/org")
;; TODO: figure out how to nest this in (use-package org ...) ;; TODO: figure out how to nest this in (use-package org ...)
(setq org-capture-templates (setq org-capture-templates
`(("w" "work" entry (file+headline `(("w" "work" entry (file+headline
,(f-join (getenv "ORG_DIRECTORY") "work.org") ,(f-join org-directory "work.org")
"Tasks") "Tasks")
"* TODO %?") "* TODO %?")
("p" "personal" entry (file+headline ("p" "personal" entry (file+headline
,(f-join (getenv "ORG_DIRECTORY") "personal.org") ,(f-join org-directory "personal.org")
"Tasks") "Tasks")
"* TODO %? ") "* TODO %? ")
("i" "ideas" entry (file+headline ("i" "ideas" entry (file+headline
,(f-join (getenv "ORG_DIRECTORY") "ideas.org") ,(f-join org-directory "ideas.org")
"Tasks") "Tasks")
"* %? ") "* %? ")
("s" "shopping list" entry (file+headline ("s" "shopping list" entry (file+headline
,(f-join (getenv "ORG_DIRECTORY") "shopping.org") ,(f-join org-directory "shopping.org")
"Items") "Items")
"* TODO %? "))) "* TODO %? ")))
@ -55,9 +52,9 @@
(setq org-startup-folded nil) (setq org-startup-folded nil)
(setq org-todo-keywords (setq org-todo-keywords
'((sequence "TODO" "BLOCKED" "DONE"))) '((sequence "TODO" "BLOCKED" "DONE")))
(setq org-default-notes-file (f-join (getenv "ORG_DIRECTORY") "notes.org")) (setq org-default-notes-file (f-join org-directory "notes.org"))
(setq org-agenda-files (list (f-join (getenv "ORG_DIRECTORY") "work.org") (setq org-agenda-files (list (f-join org-directory "work.org")
(f-join (getenv "ORG_DIRECTORY") "personal.org"))) (f-join org-directory "personal.org")))
;; TODO: troubleshoot why `wpc/kbds-minor-mode', `wpc/ensure-kbds' aren't ;; TODO: troubleshoot why `wpc/kbds-minor-mode', `wpc/ensure-kbds' aren't
;; enough to override the following KBDs. See this discussion for more context ;; enough to override the following KBDs. See this discussion for more context
;; on where the idea came from: ;; on where the idea came from: