-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add parsing for timestamp syntax #23
Comments
master...whacked:2016-06_exploration has a rough cut of adding timestamp parsing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As far as I can tell, there is no timestamp syntax handling in the current version.
A variety are described in the 8.1 Timestamps, deadlines, and scheduling in the manual (as of 2016-02-24)
The document page does not show other formats like ISO 8601 and similar, though native org parses it as "clock time". Examples:
[2016-02-21 10:07:07-0500]
[2016-02-24]
[2016-02-24 Wed]
[2001-07-08 01:23:45]
Since the datetime cannot span more than one line, I am guessing this needs to be something like a
Syntax.define("date"...)
entry in https://github.com/mooz/org-js/blob/master/lib/org/lexer.js ?The regex for schedule/deadline parsing in daiganio's org-mode-parser.js is here:
https://github.com/daitangio/org-mode-parser/blob/master/lib/org-mode-parser.js#L216-L217
The regex for "clock time" parsing for the same library is in https://github.com/daitangio/org-mode-parser/blob/master/lib/org-mode-parser.js#L226 (however, for org export, clock time does not need to be preceded with the "CLOCK:" string and can occur anywhere)
I am happy to give a try of adding a lexer / exporter entry for a simple version of this, but would like to know what you think.
In particular, if you want larger coverage,
Timestamp with repeater interval
andDiary-style sexp entries
require additional processing after the regex match, so I don't know if mySyntax.define
guess is correct.Thanks!
The text was updated successfully, but these errors were encountered: