lang/org: don't auto-demote headings on C-RET
This can be harder to predict. Instead, use TAB and S-TAB after-the-fact to adjust heading level.
This commit is contained in:
parent
781238f986
commit
f70f788df3
1 changed files with 3 additions and 11 deletions
|
@ -90,24 +90,16 @@
|
||||||
org-insert-heading-respect-content)
|
org-insert-heading-respect-content)
|
||||||
(goto-char (line-end-position))
|
(goto-char (line-end-position))
|
||||||
(org-end-of-subtree)
|
(org-end-of-subtree)
|
||||||
(insert (concat "\n"
|
(insert "\n" (make-string level ?*) " ")))
|
||||||
(when (= level 1)
|
|
||||||
(if at-eol
|
|
||||||
(ignore (cl-incf level))
|
|
||||||
"\n"))
|
|
||||||
(make-string level ?*)
|
|
||||||
" "))))
|
|
||||||
(`above
|
(`above
|
||||||
(org-back-to-heading)
|
(org-back-to-heading)
|
||||||
(insert (make-string level ?*) " ")
|
(insert (make-string level ?*) " ")
|
||||||
(save-excursion
|
(save-excursion (insert "\n"))))
|
||||||
(insert "\n")
|
|
||||||
(if (= level 1) (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))
|
(org-todo (or (car (+org-get-todo-keywords-for todo-keyword))
|
||||||
'todo)))))
|
'todo)))))
|
||||||
|
|
||||||
(t (user-error "Not a valid list, heading or table")))
|
((user-error "Not a valid list, heading or table")))
|
||||||
|
|
||||||
(when (org-invisible-p)
|
(when (org-invisible-p)
|
||||||
(org-show-hidden-entry))
|
(org-show-hidden-entry))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue