lang/org: refactor +journal submodule
This commit is contained in:
parent
1916d26c75
commit
1febb5a04e
1 changed files with 9 additions and 9 deletions
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
(use-package! org-journal
|
(use-package! org-journal
|
||||||
:defer t
|
:defer t
|
||||||
:preface
|
:init
|
||||||
;; HACK `org-journal' adds a `magic-mode-alist' entry for detecting journal
|
;; HACK `org-journal' adds a `magic-mode-alist' entry for detecting journal
|
||||||
;; files, but this causes us lazy loaders a big problem: an unacceptable
|
;; files, but this causes us lazy loaders a big problem: an unacceptable
|
||||||
;; delay on the first file the user opens, because calling the autoloaded
|
;; delay on the first file the user opens, because calling the autoloaded
|
||||||
|
@ -29,20 +29,20 @@
|
||||||
(let ((buffer-file-name (file-truename buffer-file-name)))
|
(let ((buffer-file-name (file-truename buffer-file-name)))
|
||||||
(funcall orig-fn)))
|
(funcall orig-fn)))
|
||||||
|
|
||||||
:init
|
;; `org-journal-dir' defaults to "~/Documents/journal/", which is an odd
|
||||||
;; HACK `org-journal-dir' is surrounded with setters and `auto-mode-alist'
|
;; default, so we change it to {org-directory}/journal (we expand it after
|
||||||
;; magic which makes it difficult to create an better default for Doom
|
;; org-journal is loaded).
|
||||||
;; users. We set this here so we can detect user-changes to it later.
|
|
||||||
(setq org-journal-dir "journal/"
|
(setq org-journal-dir "journal/"
|
||||||
org-journal-cache-file (concat doom-cache-dir "org-journal")
|
org-journal-cache-file (concat doom-cache-dir "org-journal"))
|
||||||
|
|
||||||
|
:config
|
||||||
|
;; `org-journal' can't deal with symlinks, so resolve them here.
|
||||||
|
(setq org-journal-dir (file-truename (expand-file-name org-journal-dir org-directory))
|
||||||
;; Doom opts for an "open in a popup or here" strategy as a default.
|
;; Doom opts for an "open in a popup or here" strategy as a default.
|
||||||
;; Open in "other window" is less predictable, and can replace a window
|
;; Open in "other window" is less predictable, and can replace a window
|
||||||
;; we wanted to keep visible.
|
;; we wanted to keep visible.
|
||||||
org-journal-find-file #'find-file)
|
org-journal-find-file #'find-file)
|
||||||
|
|
||||||
:config
|
|
||||||
(setq org-journal-dir (file-truename (expand-file-name org-journal-dir org-directory)))
|
|
||||||
|
|
||||||
(set-popup-rule! "^\\*Org-journal search" :select t :quit t)
|
(set-popup-rule! "^\\*Org-journal search" :select t :quit t)
|
||||||
|
|
||||||
(map! (:map org-journal-mode-map
|
(map! (:map org-journal-mode-map
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue