Skip to content

Instantly share code, notes, and snippets.

@wallyqs
Created September 24, 2014 05:39
Show Gist options
  • Select an option

  • Save wallyqs/80db1abe1da28442ac87 to your computer and use it in GitHub Desktop.

Select an option

Save wallyqs/80db1abe1da28442ac87 to your computer and use it in GitHub Desktop.
macro implementation notes
#+macro: version 1.0
We have the application running version {{{version}}}.
Notice that it has to be within 3 brackets and no internal spaces.
#+macro: greet Hi $1, how is it going?
Now let's try saying hi: {{{greet(Wally)}}}.
#+macro: greetreply {{{greet($1)}}} - *$1* :: $2
Now let's metagreet: {{{greetreply(Wally, it's going good)}}}
One complain is about multiline macros, though it could be complicated
since the notion of how to implement multiline varies upon
context. For html export that would mean =<br />= but in plain text it
could just be line break.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment