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)
|
||||
(goto-char (line-end-position))
|
||||
(org-end-of-subtree)
|
||||
(insert (concat "\n"
|
||||
(when (= level 1)
|
||||
(if at-eol
|
||||
(ignore (cl-incf level))
|
||||
"\n"))
|
||||
(make-string level ?*)
|
||||
" "))))
|
||||
(insert "\n" (make-string level ?*) " ")))
|
||||
(`above
|
||||
(org-back-to-heading)
|
||||
(insert (make-string level ?*) " ")
|
||||
(save-excursion
|
||||
(insert "\n")
|
||||
(if (= level 1) (insert "\n")))))
|
||||
(save-excursion (insert "\n"))))
|
||||
(when-let (todo-keyword (org-element-property :todo-keyword context))
|
||||
(org-todo (or (car (+org-get-todo-keywords-for todo-keyword))
|
||||
'todo)))))
|
||||
|
||||
(t (user-error "Not a valid list, heading or table")))
|
||||
((user-error "Not a valid list, heading or table")))
|
||||
|
||||
(when (org-invisible-p)
|
||||
(org-show-hidden-entry))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue