Provide explanation why batch functions are implemented as macros
commit0837adbec8b78c873f488fd13bc24ee4be68b8b8
authorDavid Maus <dmaus@ictsoc.de>
Wed, 10 Aug 2011 07:07:37 +0000 (10 09:07 +0200)
committerDavid Maus <dmaus@ictsoc.de>
Wed, 10 Aug 2011 07:43:57 +0000 (10 09:43 +0200)
treef25fe90b64f4ca85c03d0ab3c2df18f85b83dc21
parentf0958680db0ffd1aca70d3105c6bdcb32d4b84a0
Provide explanation why batch functions are implemented as macros

,----
| The functions `org-batch-agenda', `org-batch-agenda-csv', and
| `org-batch-store-agenda-views' are implemented as macros to provide
| a conveniant way for extracting agenda information from the command
| line. The Lisp does not evaluate parameters of a macro call; thus
| it is not necessary to quote the parameters passed to one of those
| functions. E.g. you can write:
|
|   emacs -batch -l ~/.emacs -eval '(org-batch-agenda "a" org-agenda-span 7)'
|
| To export an agenda spanning 7 days. If `org-batch-agenda' would
| have been implemented as a regular function you'd have to quote the
| symbol org-agenda-span. Moreover: To use a symbol as parameter
| value you would have to double quote the symbol.
|
| This is a hack, but it works even when running Org byte-compiled.
`----
lisp/org-agenda.el