Skip to content

Commit

Permalink
* layers/+emacs/org/packages.el: Fix org-appear init (#16800)
Browse files Browse the repository at this point in the history
* * layers/+emacs/org/packages.el: Fix org-appear init

* Added myself to CHANGELOG
  • Loading branch information
radrow authored Jan 19, 2025
1 parent 360886c commit a079e1b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.develop
Original file line number Diff line number Diff line change
Expand Up @@ -2980,7 +2980,7 @@ files (thanks to Daniel Nicolai)
flag (thanks to Keith Pinson).
- When =org-appear= is set to be triggered manually and Spacemacs' editing mode is
Vim or hybrid, register relevant =org-appear= commands in Evil hooks for Org
buffers (thanks to Keith Pinson).
buffers (thanks to Keith Pinson and Radosław Rowicki).
- Provide some sane default strategies for enforcing =TODO= dependencies via
=org-todo-dependencies-strategy= (thanks to Keith Pinson).
- Load org-mode email integration (mu4e/notmuch) when org is loaded
Expand Down
20 changes: 14 additions & 6 deletions layers/+emacs/org/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -1048,12 +1048,20 @@ Headline^^ Visit entry^^ Filter^^ Da
org-appear-autoemphasis t
org-appear-autosubmarkers t)
:config
(when (and (eq org-appear-trigger 'manual)
(memq dotspacemacs-editing-style '(vim hybrid)))
(add-hook 'org-mode-hook
(lambda ()
(add-hook 'evil-insert-state-entry-hook #'org-appear-manual-start nil t)
(add-hook 'evil-insert-state-exit-hook #'org-appear-manual-stop nil t))))))
(when (eq org-appear-trigger 'manual)
(when (eq dotspacemacs-editing-style 'vim)
(add-hook 'org-appear-mode-hook
(lambda ()
(add-hook 'evil-insert-state-entry-hook #'org-appear-manual-start nil t)
(add-hook 'evil-insert-state-exit-hook #'org-appear-manual-stop nil t)
)))

(when (eq dotspacemacs-editing-style 'hybrid)
(add-hook 'org-appear-mode-hook
(lambda ()
(add-hook 'evil-hybrid-state-entry-hook #'org-appear-manual-start nil t)
(add-hook 'evil-hybrid-state-exit-hook #'org-appear-manual-stop nil t)
))))))

(defun org/init-org-transclusion ()
(use-package org-transclusion
Expand Down

0 comments on commit a079e1b

Please sign in to comment.