Bump :lang org
bastibe/org-journal@6671693 -> bastibe/org-journal@24b5879 emacs-straight/org-mode@945f495 -> emacs-straight/org-mode@b76ed65 kaushalmodi/ox-hugo@e8c14e2 -> kaushalmodi/ox-hugo@77050d2 magit/orgit@e147f05 -> magit/orgit@9f09553 org-roam/org-roam@fd73da9 -> org-roam/org-roam@c59d6c4 Closes #3453
This commit is contained in:
parent
fe7ffd759d
commit
28a3d8b908
2 changed files with 15 additions and 11 deletions
|
@ -9,16 +9,16 @@
|
|||
;; delay on the first file the user opens, because calling the autoloaded
|
||||
;; `org-journal-is-journal' pulls all of `org' with it. So, we replace it
|
||||
;; with our own, extra layer of heuristics.
|
||||
(setq magic-mode-alist (assq-delete-all 'org-journal-is-journal magic-mode-alist))
|
||||
(add-to-list 'magic-mode-alist '(+org-journal-p . org-journal-mode))
|
||||
|
||||
(defun +org-journal-p ()
|
||||
(when-let (buffer-file-name (buffer-file-name (buffer-base-buffer)))
|
||||
(and (file-in-directory-p
|
||||
buffer-file-name (expand-file-name org-journal-dir org-directory))
|
||||
(delq! '+org-journal-p magic-mode-alist 'assq)
|
||||
(require 'org-journal nil t)
|
||||
(org-journal-is-journal))))
|
||||
(if (or (featurep 'org-journal)
|
||||
(and (file-in-directory-p
|
||||
buffer-file-name (expand-file-name org-journal-dir org-directory))
|
||||
(delq! '+org-journal-p magic-mode-alist 'assq)
|
||||
(require 'org-journal nil t)))
|
||||
(org-journal-is-journal))))
|
||||
|
||||
;; `org-journal-dir' defaults to "~/Documents/journal/", which is an odd
|
||||
;; default, so we change it to {org-directory}/journal (we expand it after
|
||||
|
@ -27,6 +27,10 @@
|
|||
org-journal-cache-file (concat doom-cache-dir "org-journal"))
|
||||
|
||||
:config
|
||||
;; Remove the orginal journal file detector and rely on `+org-journal-p'
|
||||
;; instead, to avoid loading org-journal until the last possible moment.
|
||||
(setq magic-mode-alist (assq-delete-all 'org-journal-is-journal magic-mode-alist))
|
||||
|
||||
;; `org-journal' can't deal with symlinks, so resolve them here.
|
||||
(setq org-journal-dir (expand-file-name org-journal-dir org-directory)
|
||||
;; Doom opts for an "open in a popup or here" strategy as a default.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue