mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-13 13:13:35 -05:00
lang/org: preserve TODO keyword on C-RET
Rather than reverting to first TODO keyword.
This commit is contained in:
@@ -95,9 +95,12 @@
|
|||||||
(org-back-to-heading)
|
(org-back-to-heading)
|
||||||
(insert (make-string level ?*) " ")
|
(insert (make-string level ?*) " ")
|
||||||
(save-excursion (insert "\n"))))
|
(save-excursion (insert "\n"))))
|
||||||
(when-let (todo-keyword (org-element-property :todo-keyword context))
|
(when-let* ((todo-keyword (org-element-property :todo-keyword context))
|
||||||
(org-todo (or (car (+org-get-todo-keywords-for todo-keyword))
|
(todo-type (org-element-property :todo-type context)))
|
||||||
'todo)))))
|
(org-todo (cond ((eq todo-type 'done)
|
||||||
|
(car (+org-get-todo-keywords-for todo-keyword)))
|
||||||
|
(todo-keyword)
|
||||||
|
('todo))))))
|
||||||
|
|
||||||
((user-error "Not a valid list, heading or table")))
|
((user-error "Not a valid list, heading or table")))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user