emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/embark 629cce948c 3/3: Add action to toggle all checkbo


From: ELPA Syncer
Subject: [elpa] externals/embark 629cce948c 3/3: Add action to toggle all checkboxes in a plain Org list
Date: Tue, 27 Dec 2022 14:57:36 -0500 (EST)

branch: externals/embark
commit 629cce948c562361ddd6136d7cc49c5c981bb610
Author: Omar Antolín Camarena <omar.antolin@gmail.com>
Commit: Omar Antolín Camarena <omar.antolin@gmail.com>

    Add action to toggle all checkboxes in a plain Org list
---
 embark-org.el | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/embark-org.el b/embark-org.el
index 0f11ab9e49..dadc00c016 100644
--- a/embark-org.el
+++ b/embark-org.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]