Fix org-capture bug

This commit is contained in:
Antoine Martin 2022-04-11 20:22:23 +02:00
parent eb57efa308
commit abc4af1deb

View file

@ -38,6 +38,7 @@
- [[#org-roam-ui][org-roam-ui]] - [[#org-roam-ui][org-roam-ui]]
- [[#export-backends][Export backends]] - [[#export-backends][Export backends]]
- [[#doom-specific][Doom specific]] - [[#doom-specific][Doom specific]]
- [[#bugfix][Bugfix]]
- [[#magit][Magit]] - [[#magit][Magit]]
- [[#gitlab-ci-skip-flag][Gitlab CI skip flag]] - [[#gitlab-ci-skip-flag][Gitlab CI skip flag]]
- [[#magit-delta][magit-delta]] - [[#magit-delta][magit-delta]]
@ -485,6 +486,23 @@ one. Taken from [[https://github.com/hlissner/doom-emacs/tree/develop/modules/la
(remove-hook 'org-tab-first-hook #'+org-cycle-only-current-subtree-h)) (remove-hook 'org-tab-first-hook #'+org-cycle-only-current-subtree-h))
#+END_SRC #+END_SRC
*** Bugfix
Fix a bug with capture mode not working correctly when agenda is opened, stolen
from https://github.com/hlissner/doom-emacs/issues/5714#issuecomment-1018788028
#+begin_src emacs-lisp
(after! org
(defadvice! dan/+org--restart-mode-h-careful-restart (fn &rest args)
:around #'+org--restart-mode-h
(let ((old-org-capture-current-plist (and (bound-and-true-p org-capture-mode)
(bound-and-true-p org-capture-current-plist))))
(apply fn args)
(when old-org-capture-current-plist
(setq-local org-capture-current-plist old-org-capture-current-plist)
(org-capture-mode +1)))))
#+end_src
* Magit * Magit
** Gitlab CI skip flag ** Gitlab CI skip flag