lang/org: preserve TODO keyword on C-RET
Rather than reverting to first TODO keyword.
This commit is contained in:
parent
f70f788df3
commit
7879a93081
1 changed files with 6 additions and 3 deletions
|
@ -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")))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue