Skip to content

Commit

Permalink
Add action to toggle all checkboxes in a plain Org list
Browse files Browse the repository at this point in the history
  • Loading branch information
oantolin committed Dec 27, 2022
1 parent cc289c4 commit 629cce9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion embark-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,22 @@ bound to i."
("r" org-list-repair)
("s" org-sort-list)
("b" org-cycle-list-bullet)
("t" org-list-make-subtree))
("t" org-list-make-subtree)
("c" org-toggle-checkbox))

(add-to-list 'embark-repeat-actions 'org-cycle-list-bullet)

(add-to-list 'embark-keymap-alist '(org-plain-list . embark-org-plain-list-map))

(cl-defun embark-org--toggle-checkboxes
(&rest rest &key run type &allow-other-keys)
(apply (if (eq type 'org-plain-list) #'embark--mark-target run)
:type type
rest))

(cl-pushnew #'embark-org--toggle-checkboxes
(alist-get 'org-toggle-checkbox embark-around-action-hooks))

;;; "Encode" region using Org export in place

(embark-define-keymap embark-org-export-in-place-map
Expand Down

0 comments on commit 629cce9

Please sign in to comment.