diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2010-09-07 19:06:03 +0200 |
---|---|---|
committer | David Maus <dmaus@ictsoc.de> | 2010-09-07 19:36:13 +0200 |
commit | 0f44a6652360116424e3b88dcf6508e2b2472729 (patch) | |
tree | dba155688d38e41bd0e5f22b408c51b9fb7a9565 | |
parent | 7e8aec9c09d86b8a88238235689e51810882ee20 (diff) | |
download | org-mode-0f44a6652360116424e3b88dcf6508e2b2472729.tar.gz |
Don't insert item when tree is folded
* org-list.el (org-insert-item): check invisibility of point at a
meaningful location.
-rw-r--r-- | lisp/org-list.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el index a5160c1..ff6b80b 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -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)) |