0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-24 21:02:51 +00:00

org-toggle-heading: Use buffer-local keyword settings when possible

* lisp/org.el (org-toggle-heading): Prefer `car' of
`org-done-keywords' and `org-not-done-keywords' when converting
checkboxes to TODO-keywords.

Reported-by: autofrettage <autofrettage@protonmail.ch>
Link: https://orgmode.org/list/87v91vle4u.fsf@gmail.com
This commit is contained in:
Ihor Radchenko 2022-10-08 12:39:31 +08:00
parent 1966a7a8a8
commit fcd3817450
No known key found for this signature in database
GPG key ID: 6470762A7DA11D8B

View file

@ -17755,7 +17755,15 @@ number of stars to add."
(org-list-to-lisp t)
(pcase (org-current-level)
(`nil 1)
(l (1+ (org-reduced-level l)))))
(l (1+ (org-reduced-level l))))
;; Keywords to replace checkboxes.
(list
;; [X]
:cbon (concat (or (car org-done-keywords) "DONE") " ")
;; [ ]
:cboff (concat (or (car org-not-done-keywords) "TODO") " ")
;; [-]
:cbtrans (concat (or (car org-not-done-keywords) "TODO") " ")))
"\n")))
(setq toggled t))
(forward-line)))