Don't insert item when tree is folded

* org-list.el (org-insert-item): check invisibility of point at a
  meaningful location.
This commit is contained in:
Nicolas Goaziou 2010-09-07 19:06:03 +02:00 committed by David Maus
parent 7e8aec9c09
commit 0f44a66523
1 changed files with 3 additions and 1 deletions

View File

@ -1115,7 +1115,9 @@ If CHECKBOX is non-nil, add a checkbox next to the bullet.
Return t when things worked, nil when we are not in an item, or
item is invisible."
(unless (or (not (org-in-item-p))
(org-invisible-p))
(save-excursion
(goto-char (org-get-item-beginning))
(org-invisible-p)))
(if (save-excursion
(goto-char (org-get-item-beginning))
(org-at-item-timer-p))