فهرست منبع

Bug fix with starting clock at end of buffer.

There was a problem that in this case the first CLOCK time stamp
is entered in the headline.  Reported by Sebastian Rose.
Carsten Dominik 17 سال پیش
والد
کامیت
ef7472779f
2فایلهای تغییر یافته به همراه10 افزوده شده و 1 حذف شده
  1. 5 0
      ChangeLog
  2. 5 1
      org.el

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-03-18  Carsten Dominik  <dominik@science.uva.nl>
+
+	* org.el (org-clock-find-position): Handle special case at end of
+	buffer.
+
 2008-03-17  Carsten Dominik  <dominik@science.uva.nl>
 
 	* org.el (org-scheduled-past-days): Respect

+ 5 - 1
org.el

@@ -18605,7 +18605,11 @@ If necessary, clock-out of the currently active clock."
   "Find the location where the next clock line should be inserted."
   (org-back-to-heading t)
   (catch 'exit
-    (let ((beg (point-at-bol 2)) (end (progn (outline-next-heading) (point)))
+    (let ((beg (save-excursion
+		 (beginning-of-line 2)
+		 (or (bolp) (newline))
+		 (point)))
+	  (end (progn (outline-next-heading) (point)))
 	  (re (concat "^[ \t]*" org-clock-string))
 	  (cnt 0)
 	  first last)