summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2010-07-19 21:07:05 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2010-09-01 19:05:48 +0200
commita42f8066d4ebdbb48713df7b8ad21c8a6f4669ee (patch)
treeca06847638caf2a953fb0046bb1f171754c1afe3
parentfb7183c619d6af216bb6d0983d61930b61790122 (diff)
downloadorg-mode-a42f8066d4ebdbb48713df7b8ad21c8a6f4669ee.tar.gz
Can't insert new item after `org-list-bottom-point' anymore.
-rw-r--r--lisp/org-list.el3
-rw-r--r--lisp/org-timer.el3
2 files changed, 4 insertions, 2 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 29ec67e..614d274 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -697,7 +697,8 @@ new item will be created before the current one. 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))
+ (org-invisible-p)
+ (< (org-list-bottom-point) (point)))
(if (save-excursion
(org-beginning-of-item)
(org-at-item-timer-p))
diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index 33c4c0b..e6b4402 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -203,7 +203,8 @@ it in the buffer."
(cond
;; In a timer list, insert with `org-list-insert-item-generic'.
((and (org-in-item-p)
- (save-excursion (org-beginning-of-item) (org-at-item-timer-p)))
+ (save-excursion (org-beginning-of-item) (org-at-item-timer-p))
+ (>= (org-list-bottom-point) (point)))
(org-list-insert-item-generic
(point) nil (concat (org-timer (when arg '(4)) t) ":: ")))
;; In a list of another type, don't break anything: throw an error.