diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-08-11 14:09:55 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-08-11 14:09:55 +0200 |
commit | 62e320b8a5669a88b33d82b60fa275354489217e (patch) | |
tree | 8299c99a221fa92265a9b06a9eca3156004350fb | |
parent | feb52f9028e73f0f49390780bb2e61cc9da04303 (diff) | |
download | org-mode-62e320b8a5669a88b33d82b60fa275354489217e.tar.gz |
org-inlinetask: error when trying to nest inline tasks
* lisp/org-inlinetask.el (org-inlinetask-insert-task): error when
trying to nest inline tasks.
-rw-r--r-- | lisp/org-inlinetask.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el index c9a612c..1e95e6e 100644 --- a/lisp/org-inlinetask.el +++ b/lisp/org-inlinetask.el @@ -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 |