Skip to content

Instantly share code, notes, and snippets.

@mrvdb
Created July 28, 2020 11:46
Show Gist options
  • Save mrvdb/696d94ff7c8daf0bffffd75199c5b3bd to your computer and use it in GitHub Desktop.
Save mrvdb/696d94ff7c8daf0bffffd75199c5b3bd to your computer and use it in GitHub Desktop.
org-journal configuration
(use-package org-journal
:after org
:bind
(("C-c j" . 'org-journal-new-entry))
:init
;; The expand-file-name is needed, which is odd, because for single
;; files this is not needed.
(setq org-journal-dir (expand-file-name (concat org-directory "journal/"))
;; Bring our config to every journal file
org-journal-file-header "#+SETUPFILE: ~/.emacs.d/org-config.org"
;; Match the journal files (FIXME: make this independent of earlier assignments)
org-agenda-file-regexp "^[0-9]+\\.org"
org-journal-file-format "%Y%m%d.org"
;; Put day on top of file, uses `org-journal-date-format`
org-journal-date-format "%A, %e-%m-%Y"
;; Put day on top of file, uses `org-journal-date-format`
org-journal-date-prefix "#+TITLE: "
;; New entries go at the bottom, make sure we are at top level
org-journal-time-format "[%R] "
org-journal-time-prefix "* "
;; Carry over TODO items and items explicitly marked
org-journal-carryover-items "+carryover|+TODO=\"TODO\""
;; and for this to work, we need agenda integration
org-journal-enable-agenda-integration t
;; Remove empty journals after carryover
org-journal-carryover-delete-empty-journal 'always
;; I want to have encryption, but how do TODO items bubble up then in the agenda
org-journal-enable-encryption nil
org-crypt-disable-auto-save t)
:config
(add-hook 'org-journal-mode-hook 'turn-on-visual-line-mode)
(add-hook 'org-journal-mode-hook 'turn-on-visual-fill-column-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment