Fix recent bug with timestamp properties

Matt Lundin writes

> I believe that commit b8e0d6fdb4 broke
> accessing timestamps with the org-entry-get.
>
> With that commit, several functions I use to check whether an entry has
> a timestamp stopped working.
>
> In other words,
>
> (org-entry-get nil "TIMESTAMP_IA")
>
> or
>
> (org-entry-get nil "TIMESTAMP")
>
> always return nil, even if a timestamp exists.
>
> Strangely, the org-entry-properties alist includes values for TIMESTAMP
> and TIMESTAMP_IA.
>
> I tested this by evaluating the expressions in the sample entry below:
>
> --8<---------------cut here---------------start------------->8---
> * TODO Test							   💻
>  <2009-12-19 Sat>
>  [2009-12-19 Sat 17:47]
>
> (org-entry-get nil "TIMESTAMP_IA")
> (org-entry-get nil "TIMESTAMP")
> (org-entry-properties)
> --8<---------------cut here---------------end--------------->8---
This commit is contained in:
Carsten Dominik 2009-12-20 11:09:05 +01:00
parent 315c9fd1a1
commit feb269826a
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-12-20 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-entry-properties): Add TIMESTAMP properties back
in.
2009-12-18 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-all-time-keywords): New variable.

View File

@ -12497,7 +12497,9 @@ things up because then unnecessary parsing is avoided."
props))
(when (or (not specific) (string= specific "TAGS"))
(push (cons "BLOCKED" (if (org-entry-blocked-p) "t" "")) props))
(when (or (not specific) (member specific org-all-time-keywords))
(when (or (not specific)
(member specific org-all-time-keywords)
(member specific '("TIMESTAMP" "TIMESTAMP_IA")))
(while (re-search-forward org-maybe-keyword-time-regexp end t)
(setq key (if (match-end 1) (substring (org-match-string-no-properties 1) 0 -1))
string (if (equal key clockstr)