lang/org: make C-RET create headings instead of error
This commit is contained in:
parent
ea9126a883
commit
73d975de6c
1 changed files with 2 additions and 7 deletions
|
@ -62,10 +62,7 @@
|
||||||
('above (save-excursion (org-shiftmetadown))
|
('above (save-excursion (org-shiftmetadown))
|
||||||
(+org/table-previous-row))))
|
(+org/table-previous-row))))
|
||||||
|
|
||||||
((memq type '(headline inlinetask))
|
((let ((level (or (org-current-level) 1)))
|
||||||
(let ((level (if (eq (org-element-type context) 'headline)
|
|
||||||
(org-element-property :level context)
|
|
||||||
1)))
|
|
||||||
(pcase direction
|
(pcase direction
|
||||||
(`below
|
(`below
|
||||||
(let (org-insert-heading-respect-content)
|
(let (org-insert-heading-respect-content)
|
||||||
|
@ -81,9 +78,7 @@
|
||||||
(org-todo (cond ((eq todo-type 'done)
|
(org-todo (cond ((eq todo-type 'done)
|
||||||
(car (+org-get-todo-keywords-for todo-keyword)))
|
(car (+org-get-todo-keywords-for todo-keyword)))
|
||||||
(todo-keyword)
|
(todo-keyword)
|
||||||
('todo))))))
|
('todo)))))))
|
||||||
|
|
||||||
((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