James
James

Reputation: 1678

Org-journal won't recognize org-journal-dir?

Using the following use-package syntax, Org-journal doesn't recognize the org-journal-dir setting--instead, attempts to create a different directory with query Journal directory ~/Documents/journal not found. Create one?:

(use-package org-journal  
  :ensure t
  :custom
      (setq org-journal-dir "~/Dropbox/logs/journal/")
      (setq org-journal-file-format "%m.%d.%Y.org"))

I see no error messages--it just seems to ignore the directory setting. Is this a simple syntax error? I'm new to the package and to Org mode.

[Update]: Sometimes, I get the following error message on Emacs start:

Error (use-package): org-journal/:catch: Symbol’s value as variable is void: org-journal-dir

Upvotes: 1

Views: 926

Answers (1)

jpkotta
jpkotta

Reputation: 9417

The syntax for :custom is wrong. See https://github.com/jwiegley/use-package#customizing-variables. It should be something like:

:custom
(org-journal-dir "~/Dropbox/logs/journal/")
(org-journal-file-format "%m.%d.%Y.org")

Either that, or use :config (or maybe :init, but probably not) with setq:

:config
(setq org-journal-dir "~/Dropbox/logs/journal/")
(setq org-journal-file-format "%m.%d.%Y.org")

Upvotes: 2

Related Questions