瀏覽代碼

Fix bug in positioning notes.

Patch by James Smith.
Carsten Dominik 16 年之前
父節點
當前提交
a6e5bc531d
共有 2 個文件被更改,包括 8 次插入1 次删除
  1. 6 0
      lisp/ChangeLog
  2. 2 1
      lisp/org.el

+ 6 - 0
lisp/ChangeLog

@@ -1,3 +1,9 @@
+2008-10-19  James TD Smith  <ahktenzero@mohorovi.cc>
+
+	* org.el (org-add-log-setup): Bugfix; code to find insertion point
+	after drawers was skipping ahead one line too many, so notes were
+	inserted after the first note instead of before it.
+
 2008-10-18  Carsten Dominik  <dominik@science.uva.nl>
 
 	* org-table.el (orgtbl-to-html): Bind `html-table-tag' for the

+ 2 - 1
lisp/org.el

@@ -8407,7 +8407,8 @@ EXTRA is additional text that will be inserted into the notes buffer."
 		   (while (looking-at org-drawer-regexp)
 		     (goto-char (match-end 0))
 		     (re-search-forward org-property-end-re (point-max) t)
-		     (forward-line))))
+		     (forward-line))
+		   (forward-line -1)))
 	(unless org-log-states-order-reversed
 	  (and (= (char-after) ?\n) (forward-char 1))
 	  (org-skip-over-state-notes)