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

org-mode MACRO not expanded #3401

Closed
b3 opened this issue Jan 31, 2017 · 4 comments
Closed

org-mode MACRO not expanded #3401

b3 opened this issue Jan 31, 2017 · 4 comments

Comments

@b3
Copy link

b3 commented Jan 31, 2017

When converting from an org-mode file org macros are not expanded (in fact there are not dealt at all).

For instance the following org-mode file:

#+MACRO: foo bar
should be foobar but is foo{{{foo}}}

should be translated by pandoc -f org -t tex macro.org macro.tex to

should be foobar but is foobar

but is translated instead into:

should be foobar but is foo\{\{\{foo\}\}\}
@b3 b3 changed the title org-mode MACRO not expansed org-mode MACRO not expanded Jan 31, 2017
@tarleb
Copy link
Collaborator

tarleb commented Jan 31, 2017

Thanks for the report. Indeed, macros haven't been implemented yet. I hope to get this fixed in time for the upcoming pandoc 2.

@tarleb tarleb added this to the pandoc 2.0 milestone Jan 31, 2017
@tarleb tarleb self-assigned this May 6, 2017
@tarleb
Copy link
Collaborator

tarleb commented May 6, 2017

Emacs org-mode allows arbitrary recursion in macros, meaning that the following document would loop indefinitely:

#+MACRO: test {{{test}}}
{{{test}}}

Doing the same in pandoc would leave trypandoc open to very simple denial of service attacks. I'm going to limit recursion to a depth of 15 for that reason.

@tarleb tarleb closed this as completed in da8c153 May 6, 2017
@jgm
Copy link
Owner

jgm commented May 6, 2017 via email

@b3
Copy link
Author

b3 commented May 6, 2017

It loops and kinda freezes :-/
One should use C-g to stop it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants