Browse Source

Fix bug that could push note into a child.

Reported by Bernt Hansen.
Carsten Dominik 16 years ago
parent
commit
8d8403399e
2 changed files with 5 additions and 2 deletions
  1. 3 0
      lisp/ChangeLog
  2. 2 2
      lisp/org.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2008-10-02  Carsten Dominik  <dominik@science.uva.nl>
 
+	* org.el (org-add-log-setup): Limit searc for drawers to entry
+	text, not to subtree.
+
 	* org-clock.el (org-clock-heading-for-remember): New variable.
 	(org-clock-in): Set `org-clock-heading-for-remember'.
 

+ 2 - 2
lisp/org.el

@@ -8313,7 +8313,8 @@ EXTRA is additional text that will be inserted into the notes buffer."
     (save-excursion
       (when findpos
 	(org-back-to-heading t)
-	(org-narrow-to-subtree)
+	(narrow-to-region (point) (save-excursion 
+				    (outline-next-heading) (point)))
 	(while (re-search-forward
 		(concat "\\(" org-drawer-regexp "\\|" org-property-end-re "\\)")
 		(point-max) t) (forward-line))
@@ -14189,4 +14190,3 @@ Still experimental, may disappear in the future."
 ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
 
 ;;; org.el ends here
-