diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-10-14 11:03:47 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-10-14 11:03:47 +0200 |
commit | 19d695ef8fd27ac1b1ef1b675c3960b9b7d6abdc (patch) | |
tree | d8c67bec59c5daa38349af34b171a3e538ea0c5e | |
parent | d44f065c08b7c160efc8cc24a88d72f1126ebd53 (diff) | |
download | org-mode-19d695ef8fd27ac1b1ef1b675c3960b9b7d6abdc.tar.gz |
Fix heading insertion with C-RET when inline tasks are involved
* lisp/org.el (org-insert-heading): Skip inline tasks when trying to
insert a new heading after the end of the subtree.
-rw-r--r-- | lisp/org.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/org.el b/lisp/org.el index 672070f..c1ca9a6 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6748,6 +6748,12 @@ This is important for non-interactive uses of the command." (cond (org-insert-heading-respect-content (org-end-of-subtree nil t) + (when (featurep 'org-inlinetask) + (while (and (not (eobp)) + (looking-at "\\(\\*+\\)[ \t]+") + (>= (length (match-string 1)) + org-inlinetask-min-level)) + (org-end-of-subtree nil t))) (or (bolp) (newline)) (or (org-previous-line-empty-p) (and blank (newline))) |