-
Notifications
You must be signed in to change notification settings - Fork 20
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
A "Hello World"? #38
Comments
I've been meaning to build a 'cookbook' which would probably fill the need you are describing. I've been busy with other things but am hoping to return to that soon. In the meantime, the code that does what you want is this: (org-ml-update-this-headline*
(org-ml-build-special-block
(downcase (car (org-ml-get-property :tags it)))
(org-ml-build-paragraph (org-ml-get-property :raw-value it)))) This is actually an example I hadn't considered yet. I only envisioned |
Thanks much for the response. I see that if I put point on a suitable headline it transforms it. More fundamentally: I dont want to change the file literally; I want to change it "as if" during export (currently latex) I was just perusing the org hooks and there are apparently hundreds!!!!! |
Not sure I understand your use case. Are you trying to recreate what would happen if you exported using the latex exporter? If you don't want to actually change the file you can just emit a string like so:
This (and the above example) are only going to work on headlines with at least one tag; if you want to make it more robust there needs to be logic to check the validity of the tag itself. |
I want to export to latex
|
I don't use the latex exporter very much so I can't say how exactly this would fit into what you want. It seems the exporter should have some built in functionality to map tags to different block names. The only (easy) way I can see org-ml being useful here is to transform your file into a temporary buffer that you then run through the latex exporter. You would basically copy the file and then run something like |
I find this project more promising and accessible than org-element.
Thanks for the efforts!
But is there somewhere a "hello world"?
Yeah I see a good amt of documentation in docs/api-refeence.md
I am looking for a simple end-to-end reference with setting up of hooks, export etc
ie some toy example that uses org-ml API and say transforms some org file into another?
If possible something that transforms:
into
would be wonderful.
But if even a simpler eg is given/pointed out I can hack from there on.
The text was updated successfully, but these errors were encountered: