1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

org-inlinetask: error when trying to nest inline tasks

* lisp/org-inlinetask.el (org-inlinetask-insert-task): error when
  trying to nest inline tasks.
This commit is contained in:
Nicolas Goaziou 2011-08-11 14:09:55 +02:00
parent feb52f9028
commit 62e320b8a5

View File

@ -179,6 +179,12 @@ default, or nil of no state should be assigned."
"Insert an inline task.
If prefix arg NO-STATE is set, ignore `org-inlinetask-default-state'."
(interactive "P")
;; Error when inside an inline task, except if point was at its very
;; beginning, in which case the new inline task will be inserted
;; before this one.
(when (and (org-inlinetask-in-task-p)
(not (and (org-inlinetask-at-task-p) (bolp))))
(error "Cannot nest inline tasks"))
(or (bolp) (newline))
(let ((indent org-inlinetask-min-level))
(if org-odd-levels-only