Hi folks,

For a while, I have been bugged by the fact that org-mode macros need to 
hardcode the arguments. Among other things, this prevents, macros with a 
variable number of arguments (arguably most useful for “(eval”-style lisp 
macros). Today, I finally implemented this feature (see attached patch). It 
simply substitutes $arg with a list of the macro arguments.

It allows macros like this one: 

#+MACRO: no-op (eval (string-join $args ","))

Which simple outputs its arguments but does not require calls to the macro to 
escape commas.

{{{no-op(Hi there, this macro does nothing)}}} -> Hi there, this macro does 
nothing

Can you have a look to see if this can be included in the org-mode distribution?

    many thanks and best regards,

        holger


Attachment: 0001-add-args-placeholder-to-macros-to-capture-all-argume.patch
Description: 0001-add-args-placeholder-to-macros-to-capture-all-argume.patch

Reply via email to