Bump :lang org
abo-abo/org-download@d248fcb -> abo-abo/org-download@8e12cf0 bastibe/org-journal@524009b -> bastibe/org-journal@a3ff9ce emacs-straight/org-mode@9bc0cc7 -> emacs-straight/org-mode@5454312 hlissner/evil-org-mode@9cf661a -> hlissner/evil-org-mode@2e9c4a2 org-roam/org-roam@e3d101f -> org-roam/org-roam@ea6bd21 org-journal introduces some breaking changes (by shifting away from auto-mode-alist to magic-mode-alist for detecting journal files), and had to be accommodated. Fixes #3199
This commit is contained in:
parent
15a58d5b81
commit
16ecfd3e4f
2 changed files with 33 additions and 25 deletions
|
@ -3,14 +3,33 @@
|
|||
|
||||
(use-package! org-journal
|
||||
:defer t
|
||||
:preface
|
||||
;; HACK `org-journal' adds a `magic-mode-alist' entry for detecting journal
|
||||
;; files, but this causes us lazy loaders a big problem: an unacceptable
|
||||
;; 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 buffer-file-name
|
||||
(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))))
|
||||
|
||||
;; HACK `org-journal-is-journal' doesn't anticipate symlinks, and won't
|
||||
;; correctly detect journal files in an unresolved `org-directory' or
|
||||
;; `org-journal'. `org-journal-dir' must be given the `file-truename'
|
||||
;; treatment later, as well.
|
||||
(defadvice! +org--journal-resolve-symlinks-a (orig-fn)
|
||||
:around #'org-journal-is-journal
|
||||
(let ((buffer-file-name (file-truename buffer-file-name)))
|
||||
(funcall orig-fn)))
|
||||
|
||||
:init
|
||||
(remove-hook 'org-mode-hook #'org-journal-update-auto-mode-alist)
|
||||
|
||||
;; Not using the .org file extension causes needless headache with file
|
||||
;; detection for no compelling reason, so we make it the default, so
|
||||
;; `org-journal' doesn't have to do all its `auto-mode-alist' magic.
|
||||
(defvar org-journal-file-format "%Y%m%d.org")
|
||||
|
||||
;; HACK `org-journal-dir' is surrounded with setters and `auto-mode-alist'
|
||||
;; magic which makes it difficult to create an better default for Doom
|
||||
;; users. We set this here so we can detect user-changes to it later.
|
||||
|
@ -21,20 +40,9 @@
|
|||
;; we wanted to keep visible.
|
||||
org-journal-find-file #'find-file)
|
||||
|
||||
;; HACK `org-journal' does some file-path magic at load time that creates
|
||||
;; duplicate entries in `auto-mode-alist'. We load org-journal in such a
|
||||
;; way that we can generate a final entry after the user could possibly
|
||||
;; customize `org-journal-dir'.
|
||||
(after! org
|
||||
(require 'org-journal)
|
||||
;; Delete duplicate entries in `auto-mode-alist'
|
||||
(setq auto-mode-alist (rassq-delete-all 'org-journal-mode auto-mode-alist))
|
||||
;; ...and exploit `org-journal-dir''s setter to set up
|
||||
;; `org-journal-file-pattern' and call `org-journal-update-auto-mode-alist'
|
||||
;; for us, to create the one-true-entry in `auto-mode-alist.'
|
||||
(setq! org-journal-dir (expand-file-name org-journal-dir org-directory)))
|
||||
|
||||
: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)
|
||||
|
||||
(map! (:map org-journal-mode-map
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
:recipe (:host github
|
||||
:repo "emacs-straight/org-mode"
|
||||
:files ("*.el" "lisp/*.el" "contrib/lisp/*.el"))
|
||||
:pin "9bc0cc7fb3285d9a1eb19bd4ce528e751240311e")
|
||||
:pin "5454312dbfe1d6e3b338c324989d2441e890ddd1")
|
||||
;; ...And prevent other packages from pulling org; org-plus-contrib satisfies
|
||||
;; the dependency already: https://github.com/raxod502/straight.el/issues/352
|
||||
(package! org :recipe (:local-repo nil))
|
||||
|
@ -45,7 +45,7 @@
|
|||
(when (featurep! :editor evil +everywhere)
|
||||
(package! evil-org
|
||||
:recipe (:host github :repo "hlissner/evil-org-mode")
|
||||
:pin "9cf661af8ff8ea768ef1e55045be14d0468a90f5"))
|
||||
:pin "2e9c4a295ee6aea7c97c5b1f3892b1c6e28a32d9"))
|
||||
(when (featurep! :tools pdf)
|
||||
(package! org-pdftools :pin "8cc15bb8014ed1f047eecc0abd8bf447f86c0505"))
|
||||
(when (featurep! :tools magit)
|
||||
|
@ -53,7 +53,7 @@
|
|||
(when (featurep! +brain)
|
||||
(package! org-brain :pin "3ce2a33b81ce611695ad74bf21cb911ef90d9a1a"))
|
||||
(when (featurep! +dragndrop)
|
||||
(package! org-download :pin "d248fcb8f2592a40507682e91eed9a31ead4e4a6"))
|
||||
(package! org-download :pin "8e12cf05a2f529e4859d73dd956a33e7fba8d7ea"))
|
||||
(when (featurep! +gnuplot)
|
||||
(package! gnuplot :pin "f0001c30010b2899e36d7d89046322467e923088")
|
||||
(package! gnuplot-mode :pin "601f6392986f0cba332c87678d31ae0d0a496ce7"))
|
||||
|
@ -62,7 +62,7 @@
|
|||
(when (featurep! +jupyter)
|
||||
(package! jupyter :pin "785edbbff65abb0c929dc2fbd8b8305c77fd529e"))
|
||||
(when (featurep! +journal)
|
||||
(package! org-journal :pin "524009b5daa9ab4740d1c8d91857eb89a6aff07c"))
|
||||
(package! org-journal :pin "a3ff9ce81884bffbe121eba72c7b05589ac91448"))
|
||||
(when (featurep! +noter)
|
||||
(package! org-noter :pin "9ead81d42dd4dd5074782d239b2efddf9b8b7b3d"))
|
||||
(when (featurep! +pomodoro)
|
||||
|
@ -74,7 +74,7 @@
|
|||
(package! org-tree-slide :pin "7bf09a02bd2d8f1ccfcb5209bfb18fbe02d1f44e")
|
||||
(package! org-re-reveal :pin "a9e9d4ef88417b3af7741a8d8f444ece820e7a3b"))
|
||||
(when (featurep! +roam)
|
||||
(package! org-roam :pin "e3d101f4958eee16ded089ae27017e3b14c30ccb")
|
||||
(package! org-roam :pin "ea6bd215fc52c93460c7a96b7c0a0f97d3f5c8f3")
|
||||
(when (featurep! :completion company)
|
||||
(package! company-org-roam :pin "674c2bd493f571c5323d69279557a6c18ccbd14e")))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue