Tweak checkbox support in Org DWIM command

This commit is contained in:
Kiana Sheibani 2024-04-09 14:06:12 -04:00
parent 23a2b808fd
commit f64b8df3bf
Signed by: toki
GPG key ID: 6CB106C25E86A9F7

View file

@ -3484,7 +3484,7 @@ Annoyingly, the only good way to fix these issues is to completely override the
#+begin_src emacs-lisp
(defadvice! ~/org-dwim (old-fn &optional arg)
"Only toggle overlays in headlines if there is nothing else to do."
"Various tweaks to the function of the DWIM command."
:override #'+org/dwim-at-point
(if (button-at (point))
(call-interactively #'push-button)
@ -3580,7 +3580,11 @@ Annoyingly, the only good way to fix these issues is to completely override the
(org-element-property :end lineage))
(org-open-at-point arg))))
((guard (org-element-property :checkbox (org-element-lineage context '(item) t)))
(org-toggle-checkbox))
(org-toggle-checkbox)
(unless arg
(org-next-item)
(beginning-of-line)
(re-search-forward "\\[.\\] ")))
(`paragraph
(+org--toggle-inline-images-in-subtree))
(_