From f64b8df3bfe460c026d035ff4d76f486d7a19906 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Tue, 9 Apr 2024 14:06:12 -0400 Subject: [PATCH] Tweak checkbox support in Org DWIM command --- config.org | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config.org b/config.org index 2322c77..201cc20 100644 --- a/config.org +++ b/config.org @@ -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)) (_