Browse Source

Can't insert new item after `org-list-bottom-point' anymore.

Nicolas Goaziou 15 years ago
parent
commit
a42f8066d4
2 changed files with 4 additions and 2 deletions
  1. 2 1
      lisp/org-list.el
  2. 2 1
      lisp/org-timer.el

+ 2 - 1
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
 things worked, nil when we are not in an item, or item is
 invisible."
 invisible."
   (unless (or (not (org-in-item-p))
   (unless (or (not (org-in-item-p))
-	      (org-invisible-p))
+	      (org-invisible-p)
+	      (< (org-list-bottom-point) (point)))
     (if (save-excursion
     (if (save-excursion
 	  (org-beginning-of-item)
 	  (org-beginning-of-item)
 	  (org-at-item-timer-p))
 	  (org-at-item-timer-p))

+ 2 - 1
lisp/org-timer.el

@@ -203,7 +203,8 @@ it in the buffer."
   (cond
   (cond
    ;; In a timer list, insert with `org-list-insert-item-generic'.
    ;; In a timer list, insert with `org-list-insert-item-generic'.
    ((and (org-in-item-p)
    ((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
     (org-list-insert-item-generic
      (point) nil (concat (org-timer (when arg '(4)) t) ":: ")))
      (point) nil (concat (org-timer (when arg '(4)) t) ":: ")))
    ;; In a list of another type, don't break anything: throw an error.
    ;; In a list of another type, don't break anything: throw an error.