Fix `org-entry-get' with "TIMESTAMP" or "TIMESTAMP_IA"
* lisp/org.el (org-entry-properties): Fix special property value in current entry, do not leak into next entry. * testing/lisp/test-org.el (test-org/entry-properties): Add test. Reported-by: Samuel Wales <samologist@gmail.com> <http://permalink.gmane.org/gmane.emacs.orgmode/111648>
This commit is contained in:
parent
9f4c77cb6c
commit
c77b658b39
|
@ -15975,12 +15975,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))
|
||||
|
|
|
@ -4392,7 +4392,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"
|
||||
|
|
Loading…
Reference in New Issue