Skip to content
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

Don't preserve brackets in headline@closed #3

Closed
skreutzer opened this issue Nov 20, 2019 · 3 comments
Closed

Don't preserve brackets in headline@closed #3

skreutzer opened this issue Nov 20, 2019 · 3 comments

Comments

@skreutzer
Copy link

@skreutzer skreutzer commented Nov 20, 2019

The brackets in headline@closed are Org-Mode markup and do not need to be preserved in the XML output.

@ndw

This comment has been minimized.

Copy link
Owner

@ndw ndw commented Nov 20, 2019

I see your point, but the goal of org-to-xml is to be as simple and literal as possible. The date values with square brackets aren't distinguished in the org data. Once it's in XML, it's a lot easier to process :-)

@skreutzer

This comment has been minimized.

Copy link
Author

@skreutzer skreutzer commented Nov 21, 2019

If I omit the square brackets, Org-Mode/org-to-xml seems to not recognize the timestamp. If they're present, they're not part of XML nor the timestamp. Assuming that the output XML will be processed by XSLT, then there's a need to use string operations to cut these off, otherwise custom parse/conversion code would be needed to take care of them. But OK, it sounds like org-to-xml dumps the internal Org-Mode AST or object model in a generic way, and if the square brackets are preserved in there too for some reason, I see why/how this can be a non-issue/wont-fix, as the question becomes which component should be responsible for having the piece of code that gets rid of the square brackets, and org-to-xml doesn't necessarily have to be it, depending on purpose/approach (also implementation effort versus capacity). Issue can be closed now.

@ndw

This comment has been minimized.

Copy link
Owner

@ndw ndw commented Nov 21, 2019

Ok. Glad you concur.

There was discussion in the recent past of someone writing a formal BNF grammar for org-mode files. That would give us another angle of attack. I'm not uniformly happy with the XML results I'm getting, but that's at least partly because I'm no longer well versed in the internal emacs data structures.

@ndw ndw closed this Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.