Nicolas Goaziou преди 8 години
родител
ревизия
2348d18343
променени са 2 файла, в които са добавени 8 реда и са изтрити 4 реда
  1. 2 3
      lisp/org.el
  2. 6 1
      testing/lisp/test-org.el

+ 2 - 3
lisp/org.el

@@ -15887,12 +15887,11 @@ strings."
 		;; First look for timestamps within headline.
 		(let ((ts (funcall find-ts (line-end-position) nil)))
 		  (if (= (length ts) 2) (setq props (nconc ts props))
-		    (forward-line)
 		    ;; Then find timestamps in the section, skipping
 		    ;; planning line.
-		    (when (looking-at-p org-planning-line-re)
-		      (forward-line))
 		    (let ((end (save-excursion (outline-next-heading))))
+		      (forward-line)
+		      (when (looking-at-p org-planning-line-re) (forward-line))
 		      (setq props (nconc (funcall find-ts end ts) props))))))))
 	  ;; Get the standard properties, like :PROP:.
 	  (when (memq which '(nil all standard))

+ 6 - 1
testing/lisp/test-org.el

@@ -4469,7 +4469,12 @@ Paragraph<point>"
   (should
    (equal "[2014-03-04 tue.]"
 	  (org-test-with-temp-text "* Entry\n<2012-03-29 thu.>[2014-03-04 tue.]"
-	    (cdr (assoc "TIMESTAMP_IA" (org-entry-properties nil "TIMESTAMP_IA"))))))
+	    (cdr (assoc "TIMESTAMP_IA"
+			(org-entry-properties nil "TIMESTAMP_IA"))))))
+  (should-not
+   (equal "<2012-03-29 thu.>"
+	  (org-test-with-temp-text "* Current\n* Next\n<2012-03-29 thu.>"
+	    (cdr (assoc "TIMESTAMP" (org-entry-properties))))))
   ;; Get standard properties.
   (should
    (equal "1"